# Reciprocal rank fusion

> Reciprocal rank fusion: Combining several retrievers' rankings by summing 1 / (k + rank) for each document, with k typically 60.

Canonical: https://llmdojo.dev/glossary/reciprocal-rank-fusion

Also called RRF.

Combining several retrievers' rankings by summing 1 / (k + rank) for each document, with k typically 60.

Learn it in the lesson: [Selecting what goes in](https://llmdojo.dev/learn/prompt-context-engineering/context-selection/selecting-by-relevance) (Prompt and Context Engineering · Choosing Context: Selection, Ordering and Compression).

## Interview questions about Reciprocal rank fusion

- [You rank passages with reciprocal rank fusion of BM25 and embeddings, and keep the top one. The passage that answers the query never reaches the model. How?](https://llmdojo.dev/interview/q/you-rank-passages-with-reciprocal-rank-fusion-of-bm25-and-embeddings-and)
- [How does reciprocal rank fusion work, and why use ranks rather than scores?](https://llmdojo.dev/interview/q/how-does-reciprocal-rank-fusion-work-and-why-use-ranks-rather-than)
- [Why combine keyword and embedding search, and where does a reranker fit?](https://llmdojo.dev/interview/q/why-combine-keyword-and-embedding-search-and-where-does-a-reranker-fit)
- [Users search an enterprise catalogue of tables, columns and dashboards by exact name and by meaning. How would you design hybrid retrieval over that metadata?](https://llmdojo.dev/interview/q/users-search-an-enterprise-catalogue-of-tables-columns-and-dashboards-by-exact)
- [Compare tokenization choices and dense versus sparse retrieval for search and RAG, then design and evaluate a hybrid retriever.](https://llmdojo.dev/interview/q/compare-tokenization-choices-and-dense-versus-sparse-retrieval-for-search-and-rag)
- [Design the retrieval and ranking pipeline behind a RAG assistant, including indexing, access control and the metrics you'd evaluate it with.](https://llmdojo.dev/interview/q/design-the-retrieval-and-ranking-pipeline-behind-a-rag-assistant-including-indexing)

## Related
- [Lost in the middle](https://llmdojo.dev/glossary/lost-in-the-middle)
- [Needle in a haystack](https://llmdojo.dev/glossary/needle-in-a-haystack)
- [BM25](https://llmdojo.dev/glossary/bm25)
- [Glossary of every term](https://llmdojo.dev/glossary)
