HybridRetriever
Retriever that combines multiple retrieval strategies using reciprocal rank fusion (RRF).
RRF is a rank-based fusion method that does not require score normalization across retrievers. It works well when combining retrievers with incompatible scoring scales (e.g., cosine similarity from a vector store with BM25 scores from keyword search).
Reference: Cormack, Clarke, Buettcher. “Reciprocal Rank Fusion outperforms Condorcet and individual Rank Learning Methods.” (2009)
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new HybridRetriever(options): HybridRetriever;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”HybridRetriever
Methods
Section titled “Methods”retrieve()
Section titled “retrieve()”retrieve(query, options?): Promise<RetrievalResult[]>;Retrieve relevant content for a query.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”Promise<RetrievalResult[]>