Are there any plans to implement "Sentence Window Retrieval" and/or "Auto-merging Retrieval" similar to what is available in llamaindex library? #17656
Replies: 4 comments 2 replies
-
🤖 Hey there @peterlitvak! Great to see you back with another insightful question. Hope you're doing awesome! Based on the current version of LangChain (v0.1.7), it appears that the framework does not support retrieval algorithms similar to "Sentence Window Retrieval" and "Auto-merging Retrieval" as found in the llamaindex library. The retrieval algorithms currently implemented in LangChain include:
The TFIDFRetriever is a term frequency-inverse document frequency (TF-IDF) based retriever. You can find more details about these retrievers in the google_vertex_ai_search.py and tfidf.py files in the repository. As for the implementation of "Sentence Window Retrieval" and "Auto-merging Retrieval" in LangChain, I'm unable to provide a definitive answer as I don't have access to the roadmap or future plans for the LangChain repository. It would be best to reach out to the repository maintainers or contributors for more accurate information. If you have more details about the specific functionalities of the "Sentence Window Retrieval" and "Auto-merging Retrieval" algorithms, it would be helpful to understand how they could potentially be integrated into LangChain. Sources
|
Beta Was this translation helpful? Give feedback.
-
As far as I can see, the Sentence Window Retrieval is a pretty good retriever and I'm trying to rewrite the code from the llama-index to make it fit LangChain (hopefully Langchain will extend its Retrieval). If you want to find 1 retriever similar to the sentence window, then I suggest using ContextualCompressionRetriever. ✌️ |
Beta Was this translation helpful? Give feedback.
-
is there any update here? |
Beta Was this translation helpful? Give feedback.
-
@ayseozgun I have created a PR to implement Sentence window retrieval. Its only implemented for FAISS vector store yet. But the core code should be the same for all vector databased. Can check the PR here : #20392 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
There are two very interesting retrieval algorithms that are implemented in llamaindex library, the "Sentence Window Retrieval" and "Auto-merging Retrieval". They appear to improve relevance quite a bit.
Are there any plans to implement these in LangChain?
System Info
n/a
Beta Was this translation helpful? Give feedback.
All reactions