Retrieval-Augmented Generation (RAG) systems represent a significant advancement over traditional Large Language Models (LLMs). RAG systems enhance their generation ability by incorporating external data retrieved through an Information Retrieval (IR) phase, overcoming the limitations of standard LLMs, which are restricted to their pre-trained knowledge and limited context window. Most research in this area has predominantly concentrated on the generative aspect of LLMs within RAG systems. Our study fills this gap by thoroughly and critically analyzing the influence of IR components on RAG systems. This paper analyzes which characteristics a retriever should possess for an effective RAG's prompt formulation, focusing on the type of documents that should be retrieved. We evaluate various elements, such as the relevance of the documents to the prompt, their position, and the number included in the context. Our findings reveal, among other insights, that including irrelevant documents can unexpectedly enhance performance by more than 30% in accuracy, contradicting our initial assumption of diminished quality. These findings call for developing specialized approaches tailored to the specific demands of integrating retrieval with language generation models and pave the way for future research. These results underscore the need for developing specialized strategies to integrate retrieval with language generation models, thereby laying the groundwork for future research in this field.
翻译:检索增强生成(Retrieval-Augmented Generation, RAG)系统相较于传统大语言模型(Large Language Models, LLMs)是一项重大进步。RAG系统通过引入信息检索(Information Retrieval, IR)阶段获取的外部数据来增强其生成能力,从而克服了标准LLM受限于预训练知识和有限上下文窗口的局限。该领域的大多数研究主要集中于RAG系统中LLM的生成方面。我们的研究通过深入批判性地分析IR组件对RAG系统的影响填补了这一空白。本文剖析了为实现有效的RAG提示构建,检索器应具备哪些特征,重点关注应检索的文档类型。我们评估了多种要素,例如文档与提示的相关性、文档位置以及上下文中所包含的文档数量。我们的发现揭示了诸多见解,其中特别指出:包含不相关的文档竟能意外地将准确率提升超过30%,这与我们最初关于质量下降的假设相悖。这些发现呼吁开发专门化的方法,以适应将检索与语言生成模型相结合的特殊需求,并为未来研究铺平了道路。这些结果强调了制定专门策略以整合检索与语言生成模型的必要性,从而为这一领域的后续研究奠定基础。