AgentFusion: A Multi-Agent Approach to Accurate Text Generation
Yasser Saeid, Thomas Kopinski · 2024
The rise of large language models (LLMs) like Chat-GPT has significantly transformed the field of natural language processing (NLP). These models are now central to many companies' operations due to their capabilities in generating human-like text, understanding context, and responding to queries with high fluency. However, LLMs are not without flaws. They sometimes generate inaccurate or even completely fabricated information-a phenomenon known as “hallucination.” This issue underscores the increasing importance of Retrieval-Augmented Generation (RAG) systems, which aim to enhance the accuracy of LLM outputs by incorporating data from external sources. RAG systems are especially valuable when dealing with non-English content, such as German-language tasks, where high-quality data retrieval is crucial for achieving accurate results. Developing an effective RAG system, however, is complex and requires careful consideration of several critical elements. In this paper, we present a new approach to RAG, which we refer to as an “agentic RAG” system. This system utilizes three distinct agents that collaborate to optimize the output. We rigorously tested this system across various types of embeddings and benchmarked its performance against GPT-4. Our results indicate that the agentic RAG system significantly improves accuracy, particularly for German-language content, achieving a 24/25 accuracy score in tasks related to reactor decommissioning, finance, and sports domains. These results demonstrate the broad applicability and performance gains of agentic RAG systems in multilingual NLP tasks.