1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
51 small wins to finish your pathNext question →
How do you fuse results in hybrid search? Explain Reciprocal Rank Fusion (RRF).
30-second answerSay your answer out loud first, then reveal.
RRF formula
RRF(d) = Σ over retrievers r of 1 / (k + rank_r(d)) (k ≈ 60)Worked example (k = 60)
| Doc | BM25 rank | Vector rank | RRF score |
|---|---|---|---|
| A | 1 | 5 | 1/61 + 1/65 = 0.0318 |
| B | 3 | 1 | 1/63 + 1/61 = 0.0323 |
| C | 2 | — (not retrieved) | 1/62 = 0.0161 |
B wins because it's strong in both lists. C, which appears in only one list, falls behind.
RRF vs weighted score fusion
| RRF | Weighted (α·dense + (1−α)·sparse) | |
|---|---|---|
| Needs score normalisation | No | Yes |
| Tuning | Almost none (k) | α must be tuned per dataset |
| Uses score magnitude | No (a big score gap is ignored) | Yes |
| Robustness | High; good default | Can be better if tuned well |
Practical pipeline: BM25 top-50 + vector top-50 → RRF → top-50 fused → cross-encoder rerank → top-5 to the LLM.
Follow-ups to expect
- Why k = 60? It's an empirically chosen constant from the original RRF paper (Cormack et al., 2009) that dampens the effect of top ranks. Results aren't very sensitive to it.
Related
Every expert started right here.