Reranking strategies
There are two common approaches for reranking search results from multiple sources.- Score-based: Calculate final relevance scores from the individual search algorithm scores. Examples: Reciprocal Rank Fusion (the default in LanceDB), mean reciprocal rank fusion, and weighted linear combination of semantic and keyword-based search scores.
- Relevance-based: Discards the existing scores and calculates the relevance of each search result-query pair. Example: Cross Encoder models
If you call
.rerank() on a hybrid query without passing a reranker, LanceDB defaults to
RRFReranker() — a score-based reranker that uses Reciprocal Rank Fusion. This is the
score-based path most readers encounter first; LinearCombinationReranker is an alternative
score-based strategy you opt into explicitly._relevance_score. Pass return_score="all" when a reranker
supports it, and you also need the original vector or FTS scores for debugging.
Evaluation code can rely on returned rows being ordered by descending _relevance_score. Empty
reranked result sets still include the _relevance_score column.
The hybrid rerank(...) method also accepts a normalize argument that controls how the raw
vector and FTS scores are made comparable before reranking:
normalize="score"(the default) — normalizes the raw vector and FTS scores directly.normalize="rank"— converts each result list to ranks first, then normalizes.
LinearCombinationReranker), so
when you evaluate score-based strategies, treat normalize as a tunable hyperparameter
alongside the reranker itself.
For score-based evaluation, the main built-in knobs are:
RRFReranker(K=60): rank fusion with a positive smoothing constant.MRRReranker(weight_vector=0.5, weight_fts=0.5): weighted reciprocal rank fusion where the weights must sum to1.0.LinearCombinationReranker(weight=0.7, fill=1.0): blends vector and FTS scores directly;fillcontrols how strongly to penalize a result missing from one side.