Skip to content

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.

new FusionRetriever(options): FusionRetriever;
Parameter Type

options

FusionRetrieverOptions

FusionRetriever

retrieve(query, options?): Promise<RetrievalResult[]>;

Retrieve relevant content for a query.

Parameter Type

query

string

options?

RetrievalOptions

Promise<RetrievalResult[]>

Retriever.retrieve