用统计方法精准过滤冗余信息,提升大模型问答准确性
Principled Context Engineering for RAG: Statistical Guarantees via Conformal Prediction
- 引入置信预测框架,按目标覆盖率筛选相关文本
- 减少2-3倍上下文长度,关键证据保留率超预期
- 不依赖模型自身判断,适合对可靠性要求高的场景
检索增强生成(RAG)通过引入检索证据提升大语言模型的事实准确性,但当长或噪声过多的上下文超出模型有效注意力范围时,性能会下降。现有预过滤方法依赖启发式规则或未经校准的模型置信度,无法保证保留证据的统计控制。本文采用置信预测框架进行上下文工程,在NeuCLIR和RAGTIME数据集上验证其有效性。该方法使用基于嵌入和基于LLM的评分函数,能稳定实现目标覆盖范围,确保指定比例的相关片段被保留。相比未过滤检索,上下文量减少2-3倍。在NeuCLIR上,严格过滤下下游事实准确率(ARGUE F1)提升,中等覆盖率下保持稳定,表明多数被丢弃内容为冗余或无关。结果证明,置信预测可实现可靠、可控的上下文缩减,提供一种模型无关且原理严谨的上下文优化方法。
原文摘要 · Abstract (English)
Retrieval-Augmented Generation (RAG) enhances factual grounding in large language models (LLMs) by incorporating retrieved evidence, but LLM accuracy declines when long or noisy contexts exceed the model's effective attention span. Existing pre-generation filters rely on heuristics or uncalibrated LLM confidence scores, offering no statistical control over retained evidence. We evaluate and demonstrate context engineering through conformal prediction, a coverage-controlled filtering framework that removes irrelevant content while preserving recall of supporting evidence. Using both embedding- and LLM-based scoring functions, we test this approach on the NeuCLIR and RAGTIME collections. Conformal filtering consistently meets its target coverage, ensuring that a specified fraction of relevant snippets are retained, and reduces retained context by 2-3x relative to unfiltered retrieval. On NeuCLIR, downstream factual accuracy measured by ARGUE F1 improves under strict filtering and remains stable at moderate coverage, indicating that most discarded material is redundant or irrelevant. These results demonstrate that conformal prediction enables reliable, coverage-controlled context reduction in RAG, offering a model-agnostic and principled approach to context engineering.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。