Reciprocal rank fusion

Reciprocal rank fusion merges several ranked result lists into one by scoring each result on its rank position.

Category

Industry concept

See all terms

What is reciprocal rank fusion?

Reciprocal rank fusion combines two or more ranked lists of results into a single ranked list by scoring each item on where it sits in each list, then summing those scores across lists and re-sorting. A list's top result gets a high score and every position after it gets a slightly lower one, so a result that ranks high in any one list carries real weight in the final list regardless of which method found it.
This solves the problem of comparing lists that don't measure the same thing. A keyword search assigns a term-frequency score and a semantic search assigns a similarity score, and neither number means anything next to the other. Scoring by rank position instead of by raw score solves that comparison.

How does reciprocal rank fusion differ from combining raw scores?

Reciprocal rank fusion is different from combining raw scores directly: a weighted-score approach multiplies each list's raw scores by a fixed weight and adds them together, which only works if the scores sit on comparable scales and those weights get tuned per dataset. Reciprocal rank fusion never looks at the raw score, only the rank position, so it merges lists the same way regardless of what produced each one or how its scores are distributed.

How does reciprocal rank fusion work?

Each result gets a score equal to 1 divided by a constant plus its rank in a given list, with the constant there to keep the top few ranks from dominating the total. Scores for the same result get summed across every list it appears in, then results get re-sorted by that combined score. A result ranked first in one list and eighth in another still ends up near the top, since a low rank in one list doesn't erase a high rank in another.
Qontext uses reciprocal rank fusion to merge results inside hybrid search, one of the context repository's core read operations, so an agent gets one ranked list.

FAQ

What is the formula for reciprocal rank fusion?

Why use reciprocal rank fusion instead of averaging scores?

What does the k constant do in reciprocal rank fusion?

Does reciprocal rank fusion work with more than two ranked lists?

Is reciprocal rank fusion the same as hybrid search?

Make your company AI-native.