Retriever
The retrieval component of a RAG system, responsible for recalling the text chunks most relevant to a user query from a vector store. Commonly used evaluation metrics include Recall@k and MRR.
Timeline (last 90 days)
`VectorStore` is responsible for vector storage and similarity retrieval (such as `similarity_search`) and is a relatively low-level storage interface; `Retriever` is a more general retrieval interface that only exposes `get_relevant_documents` (or `invoke` in newer versions), and any object that can return documents based on a query can be a Retriever, not necessarily a vector store.
`asRetriever()` merely adapts a VectorStore into a Retriever, and strategies such as MMR, similarity thresholds and multi-query rewriting can also be inserted in between.
The Retriever is responsible for quickly recalling candidate passages from a large-scale document library, and common implementations include dense retrieval, sparse retrieval, and hybrid retrieval.
Replacing the Retriever or Reranker directly changes the context fed into the model, which in turn affects the output quality of the entire RAG system, so any component change requires evaluating whether retrieval quality has degraded.
Through Retriever, Document Loader, and VectorStore integration, LangChain carries the retrieval-splicing-generation process of injecting external private data into the context in the form of prompts.
All Facts (5)
`VectorStore` is responsible for vector storage and similarity retrieval (such as `similarity_search`) and is a relatively low-level storage interface; `Retriever` is a more general retrieval interface that only exposes `get_relevant_documents` (or `invoke` in newer versions), and any object that can return documents based on a query can be a Retriever, not necessarily a vector store.
50%Unverified`asRetriever()` merely adapts a VectorStore into a Retriever, and strategies such as MMR, similarity thresholds and multi-query rewriting can also be inserted in between.
50%UnverifiedThe Retriever is responsible for quickly recalling candidate passages from a large-scale document library, and common implementations include dense retrieval, sparse retrieval, and hybrid retrieval.
50%UnverifiedReplacing the Retriever or Reranker directly changes the context fed into the model, which in turn affects the output quality of the entire RAG system, so any component change requires evaluating whether retrieval quality has degraded.
50%UnverifiedThrough Retriever, Document Loader, and VectorStore integration, LangChain carries the retrieval-splicing-generation process of injecting external private data into the context in the form of prompts.
50%