RRF

RRF

RRF (Reciprocal Rank Fusion) is a scoring method that integrates ranking results returned by multiple retrieval methods. By summing the reciprocal ranks from each method, it enables the fusion of different scoring systems without normalization.

In RAG pipelines, a hybrid configuration combining keyword search via BM25 and vector search (semantic search) is common. However, since BM25 scores and cosine similarity differ entirely in scale and distribution, simply adding them together does not produce a meaningful integration.

RRF solves this problem simply. It uses only the "rank" of documents returned by each search method, summing the 1 / (k + rank) score across all methods. The constant k (typically 60) is a parameter that adjusts rank weighting — the larger the value, the smaller the gap between higher and lower ranks.

Calculation Example

If a document appears at rank 3 in BM25 and rank 7 in vector search:

RRF score = 1/(60+3) + 1/(60+7) = 0.0159 + 0.0149 = 0.0308

Documents that rank reasonably well in both searches tend to score higher than documents that only appear in one. This contributes to the stability of hybrid search.

Implementation Notes

Since RRF does not use the absolute values of original scores, it has the advantage of requiring no score calibration between search engines; however, care must be taken when many documents share the same rank or when handling long-tail documents. Major vector databases including Elasticsearch 8.x and later, Weaviate, and Qdrant natively support RRF.