LuAITools.com
提交工具
🔗AI
Merging rankings by reciprocal rank

Reciprocal Rank Fusion

Reciprocal Rank Fusion merges several retrieval lists into one ranking, scoring by reciprocal rank — simple, noise-tolerant, and a common hybrid-search strategy.

What is reciprocal rank fusion?

A good search often asks several judges at once — keyword search, vector search, semantic search — each handing back its own ranking. The problem: the three lists disagree. Which do you trust? Reciprocal rank fusion (RRF) is an algorithm that merges several rankings into one, with no extra training and a nice resistance to noise.

Why does it work?

One score: the reciprocal of the rank
RRF scores a document in a dead-simple way: rank 1 gets 1/1, rank 2 gets 1/2, rank 3 gets 1/3 — the higher up, the bigger the score. Then it sums those scores for each document across every list, and the highest total wins.
Why not use the raw relevance scores?
Different retrievers' scores can't be compared directly — a 0.9 from keyword search and a 0.7 from vector search aren't the same currency. RRF only looks at rank, which sidesteps that problem entirely. That's why it's so easy to use and port.

What's good about it?

Zero cost, zero tuning
No training data, no weights to dial in — a few lines of code and you're done.
Robust to a bad list
If one retriever has an off day and buries a document, the reciprocal score stops it from wrecking the whole ranking.
Easy to add retrievers
Want another retriever in the mix? Just convert its ranks to scores and add them in. Very extensible.

Where is it used?

RRF is a star in hybrid search: it fuses sparse keyword results with dense vector results, balancing exact matching and semantic understanding. It's the default fusion strategy in many RAG systems.

Bottom line: RRF doesn't care where a score came from, only where a document ranked. It turns several rankings into one better list.

Comments