
Node Details
- Name: VoyageAIRerankRetriever
- Type: VoyageAIRerankRetriever
- Version: 1.0
- Category: Retrievers
Credentials
- Type: voyageAIApi
- Required Parameters: apiKey
Input Parameters
-
Vector Store Retriever (required)
- Type: VectorStoreRetriever
- Description: The base retriever to enhance with reranking
-
Model Name (optional)
- Type: options
-
Options:
- rerank-lite-1
- rerank-1
- Default: rerank-lite-1
-
Query (optional)
- Type: string
- Description: Specific query to use for retrieval. If not provided, the user’s question will be used.
-
Top K (optional)
- Type: number
- Description: Number of top results to fetch. Defaults to the TopK of the Base Retriever or 4 if not specified.
Outputs
-
Voyage AI Rerank Retriever
- Type: VoyageAIRerankRetriever, BaseRetriever
- Description: The configured retriever object
-
Document
- Type: Document, json
- Description: Array of document objects containing metadata and pageContent
-
Text
- Type: string, json
- Description: Concatenated string from pageContent of retrieved documents
Functionality
The node works by wrapping a base vector store retriever with a ContextualCompressionRetriever. This compression retriever uses a VoyageAIRerank compressor to reorder the documents retrieved by the base retriever according to their semantic relevance to the query. The process involves:- Retrieving documents from the base vector store
- Applying the Voyage AI reranking model to these documents
- Returning the reordered results
Use Cases
- Enhancing search results in document repositories
- Improving question-answering systems by providing more relevant context
- Refining information retrieval in research and analysis tasks