FusionRetriever
Retriever that fuses BM25 keyword search with vector similarity search using weighted linear combination of min-max normalized scores.
Unlike HybridRetriever (which uses rank-based RRF and is agnostic to the underlying retriever type), FusionRetriever is purpose-built for the BM25+vector combination. It runs both searches in parallel, normalizes scores to [0,1] via min-max, and combines them with configurable weights.
An optional reranker can refine results after fusion.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new FusionRetriever(options): FusionRetriever;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”FusionRetriever
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[]>