Retrieval & Search

What Is Reciprocal Rank Fusion (RRF)?

A way to merge ranked result lists into one by scoring each item on its position in each list, not its raw score, so different search methods can be combined.

Hybrid search runs vector search and keyword search and gets two ranked lists back. Their scores can't be compared: a cosine similarity and a full-text score sit on different scales, so adding them lets one method drown out the other. Reciprocal rank fusion ignores the scores and uses only each item's position.

Each item earns 1 / (k + rank) from every list it appears in, and the totals set the final order. The constant k (60 in the original 2009 RRF paper by Cormack, Clarke and Büttcher) keeps first place ahead without making tenth place worthless. An item that ranks well in both lists beats one that tops only one of them.

RRF needs no training or score tuning, which is why several search engines offer it built in. It only merges, though: judging whether anything answers the question is the job of a reranker. For a longer walk-through, read Hybrid search explained.

In Kelu

How Kelu uses this

Kelu merges its pgvector and PostgreSQL full-text lists with weighted RRF, using k = 60. By default the vector list counts more than the full-text one, and lists from rewritten versions of the question count less than the user's own words, so a rewrite informs the ranking without outvoting what was asked. The fused list then goes to the reranker.

From definition to deployment

Connect a knowledge source and see cited AI answers on your own content in minutes — free, no credit card required.

Free to start · No credit card required