arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.16133cs.LGcs.IR
收藏

用于检索增强生成的上下文感知门控

Context Awareness Gate For Retrieval Augmented Generation

University of Isfahan(伊斯法罕大学)

Mohammad Hassan Heydari, Arshia Hemmat, Erfan Naman, Afsaneh Fatemi

AI总结:

针对RAG中无关检索内容损害LLM输出的问题,提出CAG架构及独立于LLM、可扩展的Vector Candidates统计方法,以动态决定是否引入外部上下文。

摘要:

检索增强生成(Retrieval Augmented Generation,RAG)已成为一种被广泛采用的方法,用于缓解大型语言模型(LLM)在回答领域特定问题时的局限。以往研究主要集中于提升所检索数据块的准确性和质量,以改善生成流水线的整体性能。然而,尽管相关进展持续推进,检索无关信息这一关键问题却极少受到关注;这类信息会削弱模型有效利用其内部知识的能力。在本研究中,我们考察了开放域问答中检索无关信息所造成的影响,强调其对 LLM 输出质量具有显著损害。为应对这一挑战,我们提出 Context Awareness Gate(CAG,上下文感知门控)架构,这是一种根据用户查询是否需要外部上下文检索来动态调整 LLM 输入提示的新型机制。此外,我们提出 Vector Candidates 方法,它是 CAG 的核心数学组成部分,具有统计性、独立于 LLM 且高度可扩展的特点。我们进一步考察了上下文与问题之间关系的分布,并对这些分布给出统计分析。该分析可用于改进检索增强生成(RAG)系统中的上下文检索过程。

英文摘要:

Retrieval Augmented Generation (RAG) has emerged as a widely adopted approach to mitigate the limitations of large language models (LLMs) in answering domain-specific questions. Previous research has predominantly focused on improving the accuracy and quality of retrieved data chunks to enhance the overall performance of the generation pipeline. However, despite ongoing advancements, the critical issue of retrieving irrelevant information -- which can impair the ability of the model to utilize its internal knowledge effectively -- has received minimal attention. In this work, we investigate the impact of retrieving irrelevant information in open-domain question answering, highlighting its significant detrimental effect on the quality of LLM outputs. To address this challenge, we propose the Context Awareness Gate (CAG) architecture, a novel mechanism that dynamically adjusts the LLMs' input prompt based on whether the user query necessitates external context retrieval. Additionally, we introduce the Vector Candidates method, a core mathematical component of CAG that is statistical, LLM-independent, and highly scalable. We further examine the distributions of relationships between contexts and questions, presenting a statistical analysis of these distributions. This analysis can be leveraged to enhance the context retrieval process in Retrieval Augmented Generation (RAG) systems.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑