Fuse the two lists by rank, with RRF
Here is one fusion worked by hand. BM25 returns P7, P2, P9, P4, P1. Dense retrieval, the vector search, returns P2, P5, P7, P1, P8.
| Policy | BM25 rank | Dense rank | RRF score at k = 60 |
|---|---|---|---|
| P2 | 2 | 1 | 1/62 + 1/61 = 0.03252 |
| P7 | 1 | 3 | 1/61 + 1/63 = 0.03227 |
| P1 | 5 | 4 | 1/65 + 1/64 = 0.03101 |
| P5 | 2 | 1/62 = 0.01613 | |
| P9 | 3 | 1/63 = 0.01587 | |
| P4 | 4 | 1/64 = 0.01563 | |
| P8 | 5 | 1/65 = 0.01538 |
BM25 scores and cosine similarities sit on different scales, and neither is calibrated across queries. Reciprocal rank fusion, or RRF, skips the scores and uses only ranks. Cormack, Clarke and Büttcher's formula:
is the set of ranked lists, and is document 's rank in list . Each list adds 1 over plus that rank. A list that doesn't contain adds nothing. So P5, second in dense retrieval only, scores 1/62 = 0.01613.
Every policy both retrievers found beats every policy only one found, even P1, which neither ranked above fourth. At , rank 1 and rank 5 inside one list differ only a little, 1/61 against 1/65. Showing up in both lists nearly doubles the score.
That's the constant's job. The paper says softens the effect of a high rank from an outlier system. Set and P5, second in one list, scores 0.50 and passes P1's 0.45, though both retrievers found P1.
The authors fixed during a pilot and didn't change it afterward. Their pilot showed 60 was near-optimal, and that the choice wasn't critical.
In the editor, write rrf(rankings, k=60): the formula above, for any number of ranked lists. The table's two lists make a good test.