影响力引导的上下文选择用于高效检索增强生成
Influence Guided Context Selection for Effective Retrieval-Augmented Generation
AI总结:
针对RAG中低质量上下文损害性能的问题,提出上下文影响力值(CI value)量化上下文质量,并开发分层代理模型预测该值,在8个NLP任务上显著优于现有基线。
摘要:
检索增强生成(RAG)通过将响应基于外部知识来缓解大型语言模型(LLM)的幻觉问题,但其有效性常因检索到的上下文质量不佳(包含无关或噪声信息)而受损。现有方法尝试基于预定义的上下文质量评估指标进行上下文选择以提升性能,但相较于标准RAG,其改进有限。我们将此局限性归因于这些方法未能整体利用可用信息(查询、上下文列表和生成器)进行全面质量评估。受近期数据选择领域进展的启发,我们将上下文质量评估重新概念化为一个推理时的数据估值问题,并引入上下文影响力值(CI value)。这一新指标通过衡量从列表中移除每个上下文时性能的下降程度来量化上下文质量,有效整合了查询感知的相关性、列表感知的独特性和生成器感知的对齐性。此外,CI值通过仅保留具有正CI值的上下文,消除了复杂的选择超参数调优。为解决标签依赖和计算开销的实际挑战,我们开发了一个参数化代理模型用于推理时的CI值预测。该模型采用分层架构,同时捕获局部查询-上下文相关性和全局上下文间交互,并通过Oracle CI值监督和端到端生成器反馈进行训练。在8个NLP任务和多个LLM上的大量实验表明,我们的上下文选择方法显著优于最先进的基线,有效过滤低质量上下文同时保留关键信息。代码可在https://github.com/SJTU-DMTai/RAG-CSM获取。
英文摘要:
Retrieval-Augmented Generation (RAG) addresses large language model (LLM) hallucinations by grounding responses in external knowledge, but its effectiveness is compromised by poor-quality retrieved contexts containing irrelevant or noisy information. While existing approaches attempt to improve performance through context selection based on predefined context quality assessment metrics, they show limited gains over standard RAG. We attribute this limitation to their failure in holistically utilizing available information (query, context list, and generator) for comprehensive quality assessment. Inspired by recent advances in data selection, we reconceptualize context quality assessment as an inference-time data valuation problem and introduce the Contextual Influence Value (CI value). This novel metric quantifies context quality by measuring the performance degradation when removing each context from the list, effectively integrating query-aware relevance, list-aware uniqueness, and generator-aware alignment. Moreover, CI value eliminates complex selection hyperparameter tuning by simply retaining contexts with positive CI values. To address practical challenges of label dependency and computational overhead, we develop a parameterized surrogate model for CI value prediction during inference. The model employs a hierarchical architecture that captures both local query-context relevance and global inter-context interactions, trained through oracle CI value supervision and end-to-end generator feedback. Extensive experiments across 8 NLP tasks and multiple LLMs demonstrate that our context selection method significantly outperforms state-of-the-art baselines, effectively filtering poor-quality contexts while preserving critical information. Code is available at https://github.com/SJTU-DMTai/RAG-CSM.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。