What is RAG Fusion?
RAG Fusion is a retrieval technique that generates multiple variations of a query, retrieves results for each variation independently, and then intelligently combines and re-ranks the results to produce a final ranked list. By searching from multiple perspectives, RAG Fusion improves retrieval robustness and coverage, capturing relevant documents that might be missed by any single query formulation. The fusion process emphasizes results that appear across multiple query variations, using agreement as a signal of relevance.
The approach typically uses an LLM to generate several semantically similar but differently phrased queries from the original user question. Each query is processed through the retrieval system independently, producing separate result sets. These results are then fused using algorithms like Reciprocal Rank Fusion (RRF), which gives higher scores to documents that rank well across multiple query variations. This fusion step produces a final ranking that is often more robust than any single query's results.
RAG Fusion addresses the brittleness of single-query retrieval, where the specific phrasing of a query can significantly impact which documents are retrieved. By diversifying queries and fusing results, the technique becomes more resilient to vocabulary mismatch, ambiguity, and query formulation quality. It's particularly valuable for complex questions where users might not know optimal search terms, or where relevant information could be described in multiple ways. The main tradeoff is increased computational cost from multiple retrievals, though this can be mitigated by parallelizing the searches.