Reciprocal rank fusion

Also known as: RRF

On this page 7

Reciprocal rank fusion (RRF) is a rank aggregation method that combines several ranked result lists into one by giving each document a score of 1 divided by (k plus its rank) in every list and summing those scores. In artificial intelligence, and specifically in the retrieval & knowledge layer of search and RAG systems, it is the default way to merge keyword and vector results in hybrid search.

The method was introduced in 2009 as an unsupervised fusion technique for information retrieval experiments, and it outperformed more elaborate learned approaches on standard benchmarks. Its appeal is that it ignores raw scores entirely: a BM25 score of 14.2 and a cosine similarity of 0.83 live on incompatible scales, but their ranks are directly comparable.

How reciprocal rank fusion computes a combined score

Reciprocal rank fusion assigns every document a fused score equal to the sum of 1/(k + r) over all input lists, where r is the document’s 1-based rank in a list and k is a smoothing constant. A document missing from a list simply contributes nothing for that list. The final ranking sorts documents by fused score in descending order.

The reciprocal shape gives steep rewards at the top of each list and a long, flat tail below. Moving from rank 1 to rank 2 changes the contribution far more than moving from rank 50 to rank 51. The constant k softens this curve, so that a single first-place finish does not overwhelm consistent mid-list appearances across several retrievers.

The table below shows how the contribution of a single list decays with rank under the widely used default of k = 60.

Rank in listContribution 1/(60 + r)Relative to rank 1
10.01639100%
20.0161398%
50.0153894%
100.0142987%
500.0090955%
1000.0062538%
Per-list contribution at k = 60

The numbers reveal a property that surprises many engineers: with k = 60 the curve is remarkably flat near the top. A document ranked first in one list and absent from the other usually loses to a document ranked fifth in both, which is exactly the consensus behavior that makes RRF robust.

The k constant and other tuning parameters

The constant k controls how strongly top ranks dominate the fused result. Small values make RRF behave almost like a winner-takes-all vote for first places, while large values make it approximate a count of how many lists contain the document. The original value of 60 was chosen empirically, and most search engines and vector databases ship it as the default.

Value of kRank 1 versus rank 10 ratioPractical behavior
k = 15.5 to 1Top positions dominate strongly
k = 101.9 to 1Noticeable preference for top hits
k = 601.15 to 1Balanced, consensus-oriented default
k = 2001.05 to 1Close to counting list membership
Effect of different k values

Two further parameters matter in production. The candidate depth, meaning how many results each retriever returns before fusion, is typically between 20 and 200. Many implementations also support weighted RRF, which multiplies each list’s contribution by a weight, for example 1.0 for dense retrieval and 0.7 for keyword retrieval, when one retriever is known to be stronger for a given corpus.

  • Candidate depth too small removes documents that would have gained consensus.
  • Candidate depth too large adds latency with little effect, because deep ranks contribute little.
  • Weights should be set on a labeled evaluation set, not by intuition.

Reciprocal rank fusion compared with score-based fusion

RRF belongs to the family of rank-based fusion methods, which differ from score-based methods that normalize and add raw relevance scores. The key distinction is whether the method needs the retrievers’ scores to be calibrated against each other.

MethodInput usedNeeds score normalizationMain weakness
Reciprocal rank fusionRanks onlyNoDiscards score margins
CombSUMRaw or normalized scoresYesSensitive to score scale
CombMNZScores times hit countYesOverrewards frequent but weak hits
Convex combinationMin-max or z-score normalized scoresYesNeeds tuning of the mixing weight
Borda countRanks onlyNoLinear decay ignores top importance
Common fusion methods for hybrid search

Because RRF uses only ranks, it discards information about confidence. If the vector retriever is extremely sure about its first result and only marginally sure about its second, RRF treats both nearly the same. Studies of hybrid retrieval show that a well-tuned convex combination of normalized scores can match or exceed RRF when labeled data exist, whereas RRF wins when no tuning data are available.

RRF should also be distinguished from reranking. Fusion only reorders candidates using their positions, while a cross-encoder reranker reads the query and each document together and produces a new relevance judgment. In practice the two are complementary: RRF merges candidates cheaply, and a reranker refines the top 20 to 50 fused results.

Where reciprocal rank fusion is used

The dominant application of reciprocal rank fusion is hybrid search, which merges a sparse retriever such as BM25 with a dense retriever based on embeddings. Sparse retrieval excels at exact terms, codes and rare names, while dense retrieval captures paraphrases and meaning, and RRF lets each compensate for the other without score engineering.

Other uses include fusing the results of multiple rewritten queries, as in query expansion and RAG-Fusion patterns, combining results from several indexes or shards, and merging retrieval over different fields such as titles and body text. The decision table below summarizes typical choices.

SituationRecommended approachReason
No relevance labels availableRRF with k = 60Robust without any tuning
Labeled queries availableCompare RRF with convex combinationTuned score fusion may win
One retriever clearly strongerWeighted RRFPreserves the stronger signal
Several query rewritesRRF across rewrite resultsRewards documents found repeatedly
Latency budget allows itRRF followed by a cross-encoderCheap merge, precise final order
Choosing a fusion strategy

Limitations and common mistakes

Reciprocal rank fusion is simple, but several implementation errors silently degrade results. Most of them concern how ranks are counted and how candidates are deduplicated, rather than the formula itself.

  • Using 0-based ranks shifts every contribution and changes the effective k.
  • Failing to deduplicate chunks that represent the same document splits its score across identifiers.
  • Fusing a weak retriever with equal weight can pull irrelevant documents into the top results.
  • Treating the fused score as a probability is wrong, because RRF scores have no absolute meaning and cannot be thresholded reliably.
  • Mixing lists of very different depths biases results toward the deeper list.

A deeper limitation is that RRF cannot fix poor candidates. If neither retriever returns the relevant passage within its candidate depth, no fusion method can surface it, which is why evaluation should measure recall at the candidate stage separately from final ranking quality metrics such as nDCG and mean reciprocal rank.

In everyday language

Imagine asking two librarians for the best books on a topic. One searches by exact words in titles, the other by general meaning. Each gives you a ranked list, but they rate books in completely different ways, so their scores cannot be compared.

Reciprocal rank fusion ignores the scores and looks only at positions. A book near the top of both lists earns the most points, and a book that only one librarian liked earns fewer. The books both experts agree on rise to the top, which is usually what you want.

Seen in the real world

A support team at a software company builds a RAG assistant over 40,000 help articles. Pure vector search handles questions such as how to reset access well, but it misses queries containing exact error codes like E-4012, which BM25 finds instantly. The engineers retrieve the top 100 results from each retriever and merge them with RRF at k = 60.

On a test set of 500 real support questions, the hybrid setup raises recall at 10 from 71% to 86% compared with vector search alone. Adding a cross-encoder reranker over the top 30 fused results improves answer accuracy further, and the team never needs to normalize BM25 and cosine scores against each other.