Vector Retriever
What's a Vector Retriever?
Vector Retriever is the most commonly used retriever type for document-based applications. Vector Retriever retrieves documents and information from vector databases using semantic similarity search.
Best For:
Document search and retrieval
Semantic similarity matching
Large-scale text corpora
Unstructured data search
Key Features:
Embedding-based similarity search
Support for multiple vector databases (Chroma, Elasticsearch, Redis)
Metadata filtering and scoring
Configurable similarity thresholds
Use Cases:
Document Q&A systems
Content recommendation engines
Semantic search applications
Knowledge base retrieval
Installation
What it does
The Vector Retriever is a component that retrieves relevant documents from a vector database based on semantic similarity to a query. It provides a standardized interface for document retrieval operations in Gen AI applications.
Inputs
Query: A text string representing the search query
Data Store: A vector data store instance (e.g., Chroma, Elasticsearch, Redis)
Top-k: Maximum number of documents to retrieve (optional, defaults to system default)
Retrieval Parameters: Additional parameters for fine-tuning the search (optional)
Outputs
List of Chunks: A list of
Chunkobjects containing the retrieved documents with their metadata
Save and Retrieve Data
Instead of relying solely on a string for semantic queries, we can also apply metadata filtering through the retrieval_params parameter following the retrieval params provided by that specific data store. For example, if we are using ChromaVectorDataStore, the retrieval parameter can be used as follows:
Last updated