Skip to main content

Reciprocal Rank Fusion Reranker

This is the default reranker used by LanceDB hybrid search. Reciprocal Rank Fusion (RRF) is an algorithm that evaluates the search scores by leveraging the positions/rank of the documents. The implementation follows this paper.
Note: Supported query type – Hybrid search.

Accepted Arguments

ArgumentTypeDefaultDescription
Kint60A constant used in the RRF formula (default is 60). Experiments indicate that k = 60 was near-optimal, but that the choice is not critical.
return_scorestr"relevance"Options are “relevance” or “all”. The type of score to return. If “relevance”, will return only the _relevance_score. If “all”, will return all scores from the vector and FTS search along with the relevance score.

Supported Scores for each query type

You can specify the type of scores you want the reranker to return. The following are the supported scores for each query type:
return_scoreStatusDescription
relevance✅ SupportedReturned rows only have the _relevance_score column.
all✅ SupportedReturned rows have vector(_distance) and FTS(score) along with Hybrid Search score(_relevance_score).