Reciprocal Rank Fusion (RRF)
Reciprocal rank fusion merges multiple ranked search result lists by scoring each item as 1/(k + rank), summed across lists — no score normalization needed.
Reciprocal rank fusion (RRF) is an algorithm for merging several ranked result lists into one: each document earns 1 divided by (k plus its rank) from every list it appears in, the contributions are summed, and documents are re-sorted by the total.
RRF exists because different search systems speak different score languages. BM25 emits unbounded relevance scores; vector search emits cosine similarities between -1 and 1; a third ranker might emit probabilities. Comparing those numbers directly is meaningless. RRF's insight is to throw the scores away and trust only the ranks.
How it works
For each result list, walk down the ranking. The document at rank r receives a contribution of 1 / (k + r), where k is a smoothing constant — 60 in the original formulation and still the common default. Sum each document's contributions across all lists, then sort descending.
The constant k matters more than it looks. With a small k, rank 1 towers over rank 2 and a single list dominates. With k = 60, the curve flattens: rank 1 scores 1/61 = 0.0164 and rank 10 scores 1/70 = 0.0143 — close enough that a document ranked moderately well by several searchers can beat a document ranked first by only one. RRF rewards consensus.
Why it matters
RRF is the standard fusion step in hybrid search, and it ships as the default in Elasticsearch, OpenSearch, Azure AI Search, and most vector databases with hybrid modes. Its virtues are practical: no score normalization, no training data, no tuning beyond k, and robustness — a wildly miscalibrated scorer cannot poison the fusion because only its ordering counts. For RAG systems merging keyword and semantic retrieval, RRF is usually the first thing to try and often the last thing you need before a dedicated reranker.
A worked example
Two searchers return top-3 lists for the same query, and we fuse with k = 60:
BM25: 1. DocA 2. DocB 3. DocC
Vector: 1. DocD 2. DocA 3. DocB
DocA: 1/61 + 1/62 = 0.0164 + 0.0161 = 0.0325
DocB: 1/62 + 1/63 = 0.0161 + 0.0159 = 0.0320
DocD: 1/61 = 0.0164
DocC: 1/63 = 0.0159
Fused order: DocA, DocB, DocD, DocC. Notice DocA wins overall without topping either list outright in combination — it was strong everywhere. DocD, first in one list but absent from the other, drops to third. That is consensus ranking in action.
How Miatz teaches it
RRF is a pencil-and-paper drill before it is code: Miatz learners fuse small result lists by hand, exactly like the table above, then vary k and watch the ordering flip. Hand-computation of one honest example beats a hundred passive explanations — the same deliberate-practice principle that runs through every Miatz coding rep. The drill slots directly into the hybrid search module, where learners fuse their own BM25 and vector indexes.
