RAG-Fusion is a retrieval-augmented generation technique in which a language model rewrites one user question into several related queries, a retriever runs each query separately, and the resulting ranked lists are merged with reciprocal rank fusion (RRF) before the top passages are passed to the generator. In the Retrieval & knowledge part of artificial intelligence, it addresses a familiar weakness of single-query RAG: one phrasing of a question rarely matches every relevant document.
The method combines two older ideas, query expansion and rank fusion, and packages them as a lightweight layer in front of an existing retriever. It requires no retraining of the embedding model and works with dense, sparse or hybrid search.
How the RAG-Fusion pipeline works
The RAG-Fusion pipeline works in four sequential stages: query generation, parallel retrieval, reciprocal rank fusion and grounded generation. Each stage can be tuned independently, which makes the technique easy to add to an existing RAG stack.
- Query generation: a language model produces typically three to five reformulations of the original question, covering synonyms, sub-aspects and different levels of specificity.
- Parallel retrieval: each query, often including the original, is sent to the retriever, which returns its own top-k list.
- Reciprocal rank fusion: the lists are merged by summing 1 / (k + rank) for every document across lists, with the constant k commonly set to 60.
- Grounded generation: the highest-scoring fused passages form the context for the final answer.
Reciprocal rank fusion is the core of the method because it uses ranks rather than raw scores. Similarity scores from different queries are not directly comparable, but ranks are, so a document that appears near the top of several lists rises above a document that ranks first in only one.
A short calculation shows the effect. With k set to 60, a document ranked first in one list receives 1/61, or about 0.0164. A document ranked third in each of three lists receives three times 1/63, or about 0.0476, and therefore wins clearly. This behavior explains why the method favors broadly relevant passages over passages that match only one narrow phrasing of the question.
Key parameters and their effects
The key parameters of RAG-Fusion control how broadly it searches and how strictly it fuses. Poorly chosen values either waste latency on redundant queries or dilute the context with off-topic passages.
| Parameter | Typical value | Effect of increasing it |
|---|---|---|
| Number of generated queries | 3 to 5 | Higher recall, more latency and cost |
| Top-k per query | 10 to 50 | More candidates, more noise |
| RRF constant k | 60 | Flatter weighting across ranks |
| Final context size | 4 to 10 passages | More coverage, longer prompts |
| Query generation temperature | 0.3 to 0.8 | More diverse, less faithful variants |
A common refinement is to keep the original query in the fused set and sometimes give it a higher weight. This protects precision when the generated variants drift away from the user intent.
RAG-Fusion compared with related retrieval techniques
RAG-Fusion differs from related techniques mainly in where diversity comes from and how results are combined. It shares the query side with query expansion and HyDE, and the merging side with hybrid search.
| Technique | Core idea | Difference from RAG-Fusion |
|---|---|---|
| Standard RAG | One query, one ranked list | No reformulation or fusion |
| Query expansion | Adds terms to one query | Produces one enriched query, not several lists |
| HyDE | Embeds a hypothetical answer | Generates a document, not query variants |
| Hybrid search | Fuses dense and sparse retrievers | Diversity from retrievers, not queries |
| Query decomposition | Splits a question into sub-questions | Answers parts separately, often sequentially |
| Reranking | Rescores candidates with a cross-encoder | Complementary step after fusion |
These techniques are often combined rather than chosen exclusively. A production pipeline may fuse multi-query results from a hybrid retriever and then apply a cross-encoder reranker to the fused top 50.
When to use RAG-Fusion
RAG-Fusion is most useful when user questions are short, ambiguous or phrased differently from the source documents. It is less useful when queries are already precise and the corpus uses the same vocabulary as the users.
| Situation | Recommendation | Reason |
|---|---|---|
| Vague customer support questions | Use RAG-Fusion | Variants cover different phrasings |
| Exact part number lookup | Avoid it | Lexical search already matches exactly |
| Strict latency budget below 300 ms | Use cautiously | Extra LLM call adds delay |
| Multi-aspect research questions | Combine with decomposition | Fusion alone may miss sub-questions |
| Corpus with heavy jargon | Use RAG-Fusion | Variants bridge user and expert terms |
Before adoption, teams should build a small evaluation set from real user questions and compare the fused pipeline with the single-query baseline. If the corpus is small or well curated, the single query may already retrieve everything relevant, and the extra stage only adds cost. If users regularly report that the assistant cannot find documents that clearly exist, multi-query retrieval is a strong candidate for closing that gap.
Limitations and common mistakes
The main limitations of RAG-Fusion are added latency, added cost and the risk of query drift. Each request requires an extra model call and several retrieval calls, which can double end-to-end response time when retrieval is not parallelized.
- Query drift: generated variants may introduce assumptions that the user never made, pulling in irrelevant passages.
- Redundant variants: near-identical reformulations add cost without adding recall.
- Overconfidence in fusion: RRF rewards consensus, so a uniquely relevant document found by one query may be ranked too low.
- Missing evaluation: gains should be verified with recall@k or nDCG on a labeled query set, not assumed.
Reported improvements vary widely by corpus and query type. Teams should treat RAG-Fusion as a hypothesis to test against a baseline, measuring both retrieval metrics and answer quality.
Put simply
Think of asking a librarian a question. You might say it one way, but the right book uses different words. A good librarian asks the question several ways. Then the librarian checks which books keep coming up. RAG-Fusion does the same thing for an AI assistant.
The assistant writes a few versions of your question. It searches with each version. Books that appear in many searches rise to the top. The answer then rests on sources that several searches agree on. This usually finds more of the right material, at the cost of a little extra time.
In practice
An internal help desk assistant at a mid-sized software company answers employee questions from about 12,000 policy and IT documents. Employees ask short questions such as “laptop broken what now”, while the documents use terms like “hardware replacement procedure”. A single embedding search often misses the right page.
The team adds RAG-Fusion with four generated queries, top 20 per query and RRF with k = 60, followed by a reranker. On a test set of 300 labeled questions, recall@5 rises from about 0.62 to 0.78, while median latency grows by roughly 400 milliseconds. The team accepts the delay because fewer questions are escalated to human support staff.