What Is RRF in RAG? Align Document IDs Before You Fuse Two Search Lists
Follow a three-document fixture to see how reciprocal rank fusion combines list positions and why shared result IDs matter.

At a glance
Reciprocal rank fusion combines results by list position. Decide how your pipeline identifies the same document or chunk across result lists before you add the contributions.
In this guide
Reciprocal rank fusion combines several ranked result lists. In a retrieval-augmented generation system, that can bring text-search and vector-search results into one order before later stages choose context. A result that appears in both lists can receive a contribution from each, provided the system recognizes it as the same item.
Read contributions from rank positions
In this example, each appearance contributes one divided by its rank plus a constant. Use 60 as the constant and count the first position as rank one. A result at rank one contributes 1/61. A result at rank two contributes 1/62. The original text and vector scores do not have to use the same numeric scale.
Record the list positions that were actually passed into the fuse step. A result outside a configured retrieval window may not contribute, even if the larger index would have returned it farther down.

For the rank-based contribution formula, see Hybrid Search Scoring: Reciprocal Rank Fusion.
Choose a shared result unit
Decide whether your app returns documents, chunks or another stable unit. If one system returns whole documents and the other returns passages, map both to the unit your pipeline needs before interpreting a combined result. Do this with known source metadata. Two entries with similar titles may still refer to different pages or different editions.
If your app returns passages, two chunks from one page can stay separate. If it returns documents, decide how to handle several chunks from the same document in one list. Keep that decision visible when comparing retrieval runs.

Run the same result with aligned and split IDs
Use two fictional lists. Text returns A then B. Vector returns C then B. A and C contribute 1/61 each. The matched B earns 1/62 twice, or 2/62. B comes first. If the system instead receives B-text and B-vector and treats them as separate identifiers, each earns one 1/62 contribution. A and C both remain ahead.
Keep the query, list positions and constant the same during this comparison. That isolates the effect of the identity mapping.
| Result | Text rank | Vector rank | Combined score |
|---|---|---|---|
| A | 1 | Absent | 1/61 |
| B | 2 | 2 | 2/62 |
| C | Absent | 1 | 1/61 |

The second result appears in both lists
Shared identifier
B gets 1/62 from both lists. The two contributions put it ahead of A and C in the fixture.
Separate identifiers
B-text and B-vector each get 1/62. They sit below the two first-ranked entries.
For another worked fusion list, see Reciprocal Rank Fusion.
Check what the fused order is used for
After fusion, inspect the actual passages that the next stage receives. If a particular claim needs evidence, verify that the selected passage supports it. Record the candidate identity, rank and downstream source text in separate fields. The list order helps explain which sources were considered during retrieval.

Verify the combined list
- Pick a consistent result unit.
- Map IDs using known metadata.
- Record contributions from both lists.
- Review the fetched source text separately.
For where this step fits in a RAG workflow, see Develop a RAG Solution on Azure: Information Retrieval.
For the related task, see Review retrieval-augmented generation.
Sources: Microsoft
Frequently asked questions
Do the original similarity scores get averaged?
RRF uses positions in ranked lists. The original scoring methods can use different scales.
Should chunks from the same URL always be combined?
Decide what the pipeline returns. At chunk level, two passages on the same page can be separate results. At document level, use a verified mapping and an explicit ranking rule.
Does a high fused result prove its contents support the answer?
The score orders retrieval candidates. Open the retrieved text and compare it to the claim before treating it as evidence.
Does the example select a correct k for every system?
The chosen value makes the example reproducible. Check your implementation and retrieval objective before comparing configurations.
Read how fusion differs from reranking
Keep the candidate combination separate from the next ranking stage.
Compare fusion with the next reranking stageContinue with a related guide
- Read how fusion differs from reranking
Keep the candidate combination separate from the next ranking stage.
- Review retrieval-augmented generation
Locate the retrieval stage before the final answer is drafted.
- Evaluate a citation detector separately
Use an explicit source rule and keep missed cases visible.