Reciprocal Rank Fusion (RRF).
Reciprocal Rank Fusion (RRF) is a simple, robust way to merge several ranked lists (e.g. from vector search and keyword search) into one. Each document gets a score from each list based on its rank: score(d) = Σ 1 / (k + rank_i(d)), where k is a constant (often 60) and rank_i(d) is the document’s rank in the i-th list. Documents are then sorted by the sum. No need to normalize or calibrate the original scores—only ranks matter. It is the default choice in many hybrid pipelines when score scales differ.
Summary
- Reciprocal Rank Fusion (RRF) merges ranked lists (e.g. vector + keyword) with
score(d) = Σ 1 / (k + rank_i(d))(often k = 60); only ranks matter, no score normalization. - Popular in hybrid search because vector and keyword scores are on different scales; take top-n from each, add reciprocal-rank contributions; documents in multiple lists get a boost.
- Easy to implement, stable across systems, works well in practice. For finer control use weighted score fusion when scores are comparable, or learn a combiner.
- Pipeline: run vector and keyword search → take top-n per list → for each document sum 1/(k + rank) across lists → sort by sum. Trade-off: RRF ignores score magnitude; weighted fusion can emphasize one signal but needs normalized scores.
- Practical tip: use k = 60 as default; increase k if you want lower ranks to matter more relative to the top.
How RRF works
RRF is popular in hybrid search because vector and keyword engines return scores on different scales (e.g. cosine vs. BM25). Rather than tuning weights or normalizing scores, you take top-n from each list, assign reciprocal-rank contributions, and add. Documents that appear in multiple lists get a boost; documents that rank well in one list but not the other still contribute.
The constant k smooths the impact of rank: larger k reduces the gap between top and lower ranks. Pipeline: run vector and keyword search → take top-n per list → for each document compute score(d) = Σ 1/(k + rank_i(d)) → sort by score descending.
When to use RRF
RRF is not optimal in a learning-to-rank sense but is easy to implement, stable across systems, and works well in practice. For finer control you can use weighted score fusion when you have comparable scores, or learn a combiner over features from both rankers.
Trade-off: RRF ignores score magnitude, so you cannot emphasize one list over the other by weight without moving to weighted fusion. Practical tip: use k = 60 as default; increase k if you want lower ranks to matter more relative to the top.
Frequently Asked Questions
What is RRF?
Reciprocal Rank Fusion merges several ranked lists by scoring each document with score(d) = Σ 1 / (k + rank_i(d)) (often k = 60). Documents are sorted by the sum; no need to normalize original scores. See hybrid search.
Why use RRF instead of combining scores directly?
Vector and keyword engines return scores on different scales (e.g. cosine vs. BM25). RRF uses only ranks, so you avoid tuning weights or normalizing. When you have comparable scores, weighted score fusion gives more control.
What does the constant k do?
Larger k smooths the impact of rank (reduces the gap between top and lower ranks). A typical value is 60; you can tune for your use case.
When should I use weighted fusion instead of RRF?
When both rankers return normalized or comparable scores and you want to emphasize one signal (e.g. more vector or more keyword), use weighting scores in hybrid search. For learning-to-rank, you can train a combiner over features from both rankers.