Ensemble Retriever
What's an Ensemble Retriever?
Ensemble Retriever combines multiple retrievers and merges their results using weighted Reciprocal Rank Fusion (RRF). This enables hybrid retrieval by fusing rankings from different retrieval strategies (e.g., vector search and keyword search) into a unified ranked result set.
Best For:
Hybrid retrieval combining semantic and lexical signals
Combining different retriever types (vector + fulltext)
Weighted fusion of multiple ranking strategies
Improving result diversity and coverage
Key Features:
Weighted Reciprocal Rank Fusion (RRF) for result merging
Support for 2+ retrievers
Configurable weights for each retriever
Tunable rank constant and minimum candidate settings
Single-query or batch-query retrieval
Use Cases:
Hybrid search (semantic + keyword)
Multi-strategy search combining different data stores
Ensemble methods for improved search quality
Combining specialized retrievers for specific domains
Prerequisites
You should be familiar with:
Retriever concepts and types
At least two retriever implementations (e.g., Vector Retriever and Fulltext Retriever)
Basic understanding of ranking and fusion algorithms
Installation
What it does
The Ensemble Retriever takes a list of base retrievers and executes them in parallel, then fuses their results using weighted Reciprocal Rank Fusion. This combines the strengths of different retrieval strategies into a single ranked output.
Usage
Combine two or more retrievers with weights:
Configuring Weights and Fusion
Adjust the balance between retrievers using weights and tuning parameters:
Implementation Notes:
Weights are automatically normalized if they don't sum to 1.0
rank_constant(default 60) is added to ranks in RRF, controlling the importance of positionmin_candidateensures each retriever contributes at least a minimum number of candidatesThreshold filtering is applied after fusion
Last updated
Was this helpful?