The Voyage AI Rerank Retriever is a specialized retriever node that enhances document retrieval by reranking results based on semantic relevance to the query. It uses Voyage AI’s reranking models to improve the quality of retrieved documents.
Name: VoyageAIRerankRetriever
Type: VoyageAIRerankRetriever
Version: 1.0
Category: Retrievers
Type: voyageAIApi
Required Parameters: apiKey
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.
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
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
This approach can significantly improve the quality of retrieved documents, especially for complex or nuanced queries where semantic understanding is crucial.
Enhancing search results in document repositories
Improving question-answering systems by providing more relevant context
Refining information retrieval in research and analysis tasks
The effectiveness of this node depends on the quality of the base retriever and the appropriateness of the chosen Voyage AI model for the specific use case.