Replies: 2 comments
-
To create a custom retriever with a FAISS vector database that returns similarity scores and works in your retriever tool, follow these steps:
This setup will allow you to create a custom retriever with a FAISS vector database that returns similarity scores and integrates with your retriever tool. You can also specify additional search parameters, such as threshold scores and top-k, to fine-tune the retrieval process. The |
Beta Was this translation helpful? Give feedback.
-
@hwchase17, the bot answer is not addressing the part of my question about passing the vector_store to the retriever function (I do not have it as a global variable). Can you suggest a solution? |
Beta Was this translation helpful? Give feedback.
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
In my graph I am using a retriever as a tool, I already made a custom retriever tool for this. Currently this tool makes use of a standard retriever (see code; vectorstore.as_retriever). Given that I want to store the similarity scores I want to create a custom retriever as well. I found in the LangChain documentation an example with a @chain decorator. However, this does not work for me since I cannot pass the vectorstore to this function. Can someone help me out on how I can create a custom retriever that has these functionalities and will work in my retriever tool?
System Info
windows - python 3.12.4
langchain == 0.2.7
langchain-community == 0.2.7
langchain-core == 0.2.19
langchain-openai == 0.1.16
langchain-text-splitters == 0.2.2
langgraph == 0.1.8
Beta Was this translation helpful? Give feedback.
All reactions