A single-query RAG system can miss an answer that is already in its corpus. “Why is my internet slow?” may not retrieve a document about packet loss; a multi-part question may retrieve only one facet. RAG-Fusion addresses this coverage problem by searching from several perspectives, then merging the ranked results before answer generation. section 8.1 section 8.0
The query-time pipeline has three retrieval steps:
- Generate queries for distinct facets or interpretations, not merely synonyms. “Best laptop for college” could become searches about durability, portability, price, and battery life. section 8.2
- Retrieve a ranked document list for each query, with the searches run in parallel. section 8.0
- Merge the lists with Reciprocal Rank Fusion (RRF), which uses document ranks rather than raw retrieval scores. Pass the fused documents to the answer generator. section 8.0 section 8.4
Product search: “warm winter jacket”
A single search returns close wording matches such as “Men’s Warm Winter Jacket.” Facet-specific searches also surface down parkas and fleece-lined ski jackets. The fused list offers more kinds of relevant options, though a broader list is not automatically more precise. section 8.5 section 8.6
Start with a small set of distinct queries: three to five variants is a suggested tuning range. More variants add retrieval work and can introduce spurious results. Tune query count and the RRF k constant against the application’s goals; assess coverage with Recall@k and, where facets matter, diversity-aware measures rather than Precision@k alone. section 8.6
Table 8.2 RAG-Fusion versus standard RAG
|
Query type
|
Top results (simulated)
|
Analysis
|
|
Standard RAG
|
1. doc_01: "Men's Warm Winter Jacket"
2. doc_02: "Women's Warm Winter Jacket"
3. doc_03: "The Warmest Jacket for Winter"
|
All results are semantic matches for "warm
jacket." Fails to capture user intent.
|
|
RAG-Fusion
|
1. doc_05: "Men's Expedition Down Parka"
2. doc_09: "Women's Fleece-Lined Ski Jacket"
3. doc_01: "Men's Warm Winter Jacket"
|
Surfaces different categories (parkas, fleeces) that
satisfy the user's intent, moving from relevance-matching to discovery.
|
The side-by-side simulated results show how fusion changes a narrow set of wording matches into a broader product selection. section 8.5
