Preprint
Machine Learning

Rag-Fusion: A New Take on Retrieval Augmented Generation

Zackary Rackauckas
February 28, 2024International Journal on Natural Language Computing110 citations

110

Citations

12

Influential Citations

International Journal on Natural Language Computing

Venue

2024

Year

Abstract

Infineon has identified a need for engineers, account managers, and customers to rapidly obtain product information. This problem is traditionally addressed with retrieval-augmented generation (RAG) chatbots, but in this study, I evaluated the use of the newly popularized RAG-Fusion method. RAG-Fusion combines RAG and reciprocal rank fusion (RRF) by generating multiple queries, reranking them with reciprocal scores and fusing the documents and scores. Through manually evaluating answers on accuracy, relevance, and comprehensiveness, I found that RAG-Fusion was able to provide accurate and comprehensive answers due to the generated queries contextualizing the original query from various perspectives. However, some answers strayed off topic when the generated queries' relevance to the original query is insufficient. This research marks significant progress in artificial intelligence (AI) and natural language processing (NLP) applications and demonstrates transformations in a global and multiindustry context.

Analysis

Why This Paper Matters

This paper addresses a critical need in industrial settings: rapid access to product information for engineers, account managers, and customers. Traditional RAG chatbots often rely on a single query, which may miss nuanced or multi-faceted information. RAG-Fusion introduces a novel approach by generating multiple queries from the original, thereby capturing different perspectives and improving retrieval comprehensiveness. This is particularly significant for companies like Infineon with vast product catalogs, where precision and breadth of information are paramount.

The study also highlights a practical trade-off: while multi-query generation enriches context, it can introduce noise if queries diverge too far from the original intent. This insight is valuable for practitioners deploying RAG systems in production, as it underscores the need for careful query generation tuning.

Technical Contributions

  • Multi-Query Generation: Expands the original query into several related queries to cover different aspects of the information need.
  • Reciprocal Rank Fusion (RRF): Reranks documents from all queries using reciprocal rank scores, giving higher weight to documents that appear in top positions across multiple query results.
  • Fusion of Documents and Scores: Combines the reranked documents and their scores to produce a final answer, leveraging diverse evidence.
  • Manual Evaluation Framework: Assesses answers on accuracy, relevance, and comprehensiveness, providing a qualitative measure beyond automated metrics.

Results

The paper reports that RAG-Fusion yields accurate and comprehensive answers, attributed to the contextual diversity from multiple generated queries. However, it also notes that some answers become off-topic when the generated queries have insufficient relevance to the original query. No quantitative metrics (e.g., F1, BLEU) are provided; evaluation is based on manual assessment. The trade-off between coverage and precision is a key finding.

Significance

This work demonstrates a practical evolution of RAG systems, moving from single-query to multi-query retrieval. It has implications for any domain requiring rapid, accurate information retrieval from large corpora, such as customer support, technical documentation, and knowledge management. The identification of the off-topic limitation provides a clear direction for future research: improving query generation relevance or incorporating relevance feedback loops. Overall, RAG-Fusion represents a step forward in making AI-driven information access more robust and context-aware.