create_history_aware_retriever with a single retriever node #27233
Abraham-Martin-at-ANYVERSE
announced in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checked
Feature request
The create_history_aware_retriever function, which can be imported like this:
from langchain.chains.history_aware_retriever import create_history_aware_retriever
has a problem that makes TruLens evaluation tests for RAG context documents unusable for LangChain pipelines: it adds a retriever two times to the chain, so TruLens cannot find out which one to use for evaluations related to context documents. Some example code:
Running this through TruLens gives the following error:
I understand that TruLens can make things better, but I think that LangChain can make things easier not for TruLens, but for other tools that can have the same issue assuming pipelines with only one retriever.
So, I ask for chaging create_history_aware_retriever in a way that TruLens, and eventually other tools, doesn't fail.
Motivation
TruLens doesn't work for context-retrieved documents' evaluations when create_history_aware_retriever is used
Proposal (If applicable)
I propose to change the implementation of create_history_aware_retriever from this:
to this:
Where we only have one retriever node, which is less error-prone for external tools such as TruLens.
Beta Was this translation helpful? Give feedback.
All reactions