Compute the RRF score for a candidate ranked 3 by dense and 5 by BM25
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
A candidate document is ranked at position 3 by the dense retriever and position 5 by BM25. Using Reciprocal Rank Fusion with the standard k=60, compute the candidate's RRF score. Express as a decimal rounded to 5 decimal places.
Plug rank 3 and rank 5 with k=60 into 1/(k+rank); sum 1/63 + 1/65 ≈ 0.01587 + 0.01538 ≈ 0.03126.
Imagine two judges each list contestants in order of preference. A contestant comes third on one list and fifth on the other. To combine the lists fairly, each judge gives that contestant a small bonus. The bonus is one divided by a smoothing number plus the position. The smoothing number is 60 by convention, so the bonuses are about one over sixty-three and one over sixty-five. Add the two bonuses. You get about three hundredths. Notice how close the two bonuses are even though the positions differ by two slots. That closeness is the whole point: the smoothing number 60 keeps the early ranks from dwarfing each other.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
60s: write the formula, plug in ranks 3 and 5 with k=60, compute 1/63 + 1/65 ≈ 0.03126, then explain why the two contributions are so close (k=60 smoothing) and what that buys you in hybrid retrieval.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Forgetting the smoothing constant in the denominator and computing one over 3 plus one over 5 instead. That gives 0.533, an order of magnitude wrong, and ignores the smoothing role of the constant.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.