Source-linked AI summary

RAG-Fusion: a New Take on Retrieval-Augmented Generation

Zackary Rackauckas

arXiv:2402.03367v2cs.IRcs.LG

TL;DR

Infineon needed engineers, account managers, and customers to find product information quickly. This paper evaluates RAG-Fusion, which generates multiple queries and reranks retrieved documents with reciprocal rank fusion. The chatbot produced more accurate and comprehensive answers than traditional RAG, though the supplied evaluation passages also note limits to automated assessment.

  • Problem

    Infineon’s engineers, account managers, and customers needed rapid access to product information found in lengthy product guides and datasheets.

    Source: Introduction · p. 1
  • Method

    The paper evaluates a chatbot changed from traditional RAG to RAG-Fusion, which generates multiple queries and uses reciprocal rank fusion to rerank retrieved documents.

    Source: Introduction · p. 2, Conclusion · p. 7
  • Results

    RAG-Fusion provided more accurate and comprehensive answers than traditional RAG for technical, sales-strategy, and customer-oriented product questions.

    Source: Conclusion · p. 7
  • Takeaways & Limitations

    The authors attribute answers from multiple angles to query generation and give higher priority in answer generation to the most relevant retrieved documents through RRF reranking.

    Source: Conclusion · p. 7

    Automated evaluation metrics are less effective for sales- and customer-oriented answers, whose correct outputs can vary in structure and content.

    Source: Challenges of RAG-Fusion · p. 6

Abstract

from arXiv · show

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 multi-industry context.

Introduction

Infineon’s long product guides created demand for rapid product information, and the chatbot was developed to serve engineers, account managers, and customers. The paper tests RAG-Fusion, which combines multiple generated queries with reciprocal-rank document reranking, as a more comprehensive alternative to traditional RAG.

Introduction

  • Infineon engineers and account managers needed rapid access to sales-oriented product information scattered across product guides and datasheets that can run hundreds of pages.The paper describes chatbot development as a response to that need.Source: Introduction · p. 1
  • Reranking in RAG can improve retrieval results and the accuracy, relevance, and comprehensiveness of answers.Traditional RAG ranks documents by query relevance, usually using vector distances.Source: Introduction · p. 1
  • RAG-Fusion uses reciprocal rank fusion (RRF) to combine document ranks from multiple sources into one reranked list.RRF had been found to outperform many reranking methods, while remaining sensitive to its parameters.Source: Introduction · pp. 1–2
  • The chatbot shifted from traditional RAG to RAG-Fusion to address customer and distributor needs alongside engineers’ questions, testing technical, sales-strategy, and customer-product queries.The evaluation focused on MEMS microphones and MOSFETs.Source: Introduction · p. 2

RAG vs RAG-Fusion

Traditional RAG retrieves documents for the original query and sends them with that query to a language model. RAG-Fusion adds generated search queries and fuses documents through reciprocal-rank scoring before answer generation.

Traditional RAG

  • Traditional RAG retrieves the n documents nearest to the original query by vector distance, then sends them with the query to a language model for a response.The workflow first gathers product documents and stores text embeddings in a vector database.Source: RAG vs RAG-Fusion · p. 2

RAG-Fusion

  • RAG-Fusion generates additional search queries from the original query, such as questions about how MEMS microphones work and their advantages.The new queries are sent to the language model before retrieval.Source: RAG vs RAG-Fusion · p. 2
  • Rather than pass each retrieval directly to the language model, RAG-Fusion assigns document scores with reciprocal rank fusion and combines the retrieved documents into a reranked list.The model sends reranked results alongside the generated and original queries to the language model.Source: RAG vs RAG-Fusion · p. 2
  • Figure 1 presents a diagram illustrating the high-level process of RAG-Fusion, starting with the original query IM72D128 IP Rating, as described in its caption.Source: Figure 1 · p. 3

Infineon Chatbot for Engineers

The engineer evaluation compared RAG-Fusion answers with Infineon forum solutions and found examples of correct, more contextual answers as well as gaps in product-specific guidance. Missing documentation and general troubleshooting responses constrain the answers’ usefulness.

Infineon Chatbot for Engineers

  • The engineer-question evaluation optimized forum questions and compared chatbot answers with Infineon experts’ forum solutions.Optimization included correcting spelling and grammar, converting statements into questions, and splitting multi-part questions.Source: Infineon Chatbot for Engineers · p. 3
  • For the IM72D128 IP-rating query, the chatbot correctly returned IP57 and added an explanation of the rating and microphone design beyond the forum solution.The paper says generated queries supplied added context, although the response omitted the microphone-level protection detail tied to Sealed Dual Membrane MEMS technology.Source: Infineon Chatbot for Engineers · pp. 3–4
  • For PDM-interface troubleshooting, five of the chatbot’s six listed steps were mainly general guidance, while one matched the expert solution’s I2S data-format instruction.Source: Infineon Chatbot for Engineers · p. 4
  • A missing slave-receive-mode instruction in the product database left the chatbot without product-specific guidance, so it supplemented its answer with general troubleshooting steps.The paper suggests adding correct troubleshooting and product-use documentation to the database.Source: Infineon Chatbot for Engineers · p. 4

Infineon Chatbot for Account Managers

The chatbot performed best on sales-oriented questions, using multiple queries to build product-specific sales strategies. It also gives account managers application-related information and can reduce their reliance on engineers and long datasheets.

Infineon Chatbot for Account Managers

  • The chatbot performed best on sales-oriented questions, which address product benefits and sales strategies.These questions are typically asked by account managers or inside sales representatives.Source: Infineon Chatbot for Account Managers · p. 4
  • For a 100V OptiMOS Linear FET sales prompt, generated queries cover market trends, customer preferences, product value, and pitching strategies.The answer combines product specifications and benefits with advice to understand customer needs and provide technical support.Source: Infineon Chatbot for Account Managers · p. 4
  • Sales-oriented question answering reduces account managers’ need to ask engineers or sift through 100-page datasheets.The paper says this saves time and increases the account manager’s ability to sell, resulting in more sales and higher revenue.Source: Infineon Chatbot for Account Managers · p. 4
  • Inside sales representatives need product-specific information about applications and product validation, rather than engineering details such as voltage and current density.Source: Infineon Chatbot for Account Managers · p. 4
  • For an application query about the IM73A135V01, the response notes that documents do not specify applications, then suggests possible audio-device uses based on product features.The response describes the microphone as dust- and water-resistant, with high-quality audio pickup, a flat frequency response, and low distortion.Source: Infineon Chatbot for Account Managers · pp. 4–5

Infineon Chatbot for Customers

The chatbot answers customer product-fit questions by combining product attributes from multiple documents. For an outdoor surveillance camera query, it argues that the IM72D128V01’s resistance and audio performance suit the use case.

Infineon Chatbot for Customers

  • Customer product-fit answers address whether a product suits a planned application, such as using Infineon microphones in a camera.The camera example came from a real question on the developer community.Source: Infineon Chatbot for Customers · p. 5
  • For an outdoor surveillance camera query, the chatbot cites the IM72D128V01’s IP57 resistance, audio performance, and extended temperature range as supporting its suitability.The answer draws on three documents, including one describing the microphone’s indoor and outdoor automotive applications.Source: Infineon Chatbot for Customers · p. 5
  • The paper says the camera answer helps the customer understand product fit and may increase the chance of a sale.Source: Infineon Chatbot for Customers · p. 5

Benefits of a Chatbot

The paper presents chatbots as useful for handling multi-part questions and drawing on both product documents and pretrained language-model knowledge. Its MEMS microphone example combines product recommendations with practical recording trade-offs.

Benefits of a Chatbot

  • Users often ask several questions at once, while experts may answer only the main one; a chatbot can address the questions separately.Source: Benefits of a Chatbot · p. 5
  • For a question about MEMS microphones in wooden instruments or studios, the bot combined pretrained knowledge and its microphone database to give a useful, comprehensive answer.The response describes advantages alongside handling-noise and frequency-response challenges, then names microphones to consider and advises matching selection to the instrument and desired sound.Source: Benefits of a Chatbot · pp. 5–6

Challenges of RAG-Fusion

RAG-Fusion faces challenges in runtime, answer evaluation, relevance, prompt specificity, and definitive negative responses. Its added latency is mostly attributed to a second LLM call, while generated queries can stray from the original intent.

Challenges of RAG-Fusion

  • RAG-Fusion averaged 34.62 seconds per query versus RAG’s 19.52 seconds in ten back-to-back runs, with the slowdown mostly attributed to its second LLM call.That call processes multiple queries and more documents; local LLM hosting or generating fewer queries are proposed ways to reduce latency.Source: Challenges of RAG-Fusion · p. 6
  • Standard automated metrics are less effective for sales- and customer-oriented answers because correct responses may vary in structure and content.The paper identifies human ratings of accuracy, relevance, and comprehensiveness as the evaluation method that reflects the chatbot’s goals.Source: Challenges of RAG-Fusion · p. 6
  • Manual evaluation found that answers could stray from the original question when generated queries differed too much from its intent.The author notes that users sometimes need more specific, comprehensible prompts to elicit appropriate queries.Source: Challenges of RAG-Fusion · p. 7
  • When product information is absent from the database, the chatbot may express uncertainty rather than provide a firm negative answer.The example concerns sleep and wake-up functions that the forum solution says the microphone does not have.Source: Challenges of RAG-Fusion · p. 7

Conclusion

The conclusion reports that RAG-Fusion provided more accurate and comprehensive answers across technical, sales, and customer-oriented questions, while also noting longer runtime and relevance challenges. It identifies multilingual support, improved document representation, evaluation, and performance as future work.

Conclusion

  • RAG-Fusion provided more accurate and comprehensive answers than traditional RAG across technical, sales, and customer-oriented questions.The author attributes this to multiple query perspectives and RRF reranking, which gives the most relevant retrieved documents highest priority.Source: Conclusion · p. 7
  • The conclusion identifies longer runtime, off-track answers from irrelevant generated queries, and occasional prompt engineering as challenges.The author attributes longer runtime to a more complex LLM call involving multiple queries and more documents.Source: Conclusion · p. 7
  • The author plans to expand answers beyond English, especially to Japanese and Mandarin Chinese, because translation may lose context in customer questions.The multilingual plan is linked to questions from customers and distributors in non-English-speaking countries.Source: Conclusion · p. 7
  • Future work includes representing multimodal PDF datasheets as text for more granular retrieval, with the stated aim of improving specific product-information accuracy and reducing hallucinations.The author also plans to adapt RAGElo and Ragas to the chatbot’s accuracy and performance goals.Source: Conclusion · p. 7
  • Other planned work includes real-time performance optimization, automated quality assurance, and integration into internal and external web platforms.Source: Conclusion · p. 8
Loading 2402.03367v2…