Replies: 1 comment
-
I had a similar use case; however, I used a different chain. Have look at this, it helped me with my project. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
I am using ConversationalRetrievalQAChain in typescript. I have created two vector stores and I want the query from ConversationalRetrievalQAChain to be compared against both vector stores and results from both vector stores to be used to create the final answer.
So I have decided to create two retrievers
const retriever1 = vectorstore1.asRetriever(!!sourceCount ? sourceCount : 6)
const retriever2 = vectorstore2.asRetriever(!!sourceCount ? sourceCount : 10)
How can I now override the Retriever class so that when the query is compared against my custom_retriever, it is compared against documents from both retrievers, and documents from both retrievers are used to create the prompt.
Note: i don't want to merge the vectorstores because that messes up the similarity search.
System Info
"langchain": "^0.1.34"
Beta Was this translation helpful? Give feedback.
All reactions