修复检索增强生成中的幻觉,提供从删减到重写的三种修复策略。
Detecting and Repairing Hallucinations in Retrieval-Augmented Generation
- 将错误答案拆解为独立事实陈述,逐项比对检索来源。
- 重写策略保留80.1%原文,删除策略仅保留64.3%但效果最佳。
- 修复常影响看似正确的答案,需人工判断实用性而非依赖自动指标。
语言模型越来越多地通过查阅检索文档而非仅依赖记忆来回答问题,这种设计已广泛应用于搜索引擎和企业知识工具中。尽管基于检索的内容能减少不实陈述,但仍无法完全消除,且读者难以区分真实与虚构内容。现有研究多止步于检测,但标记错误无法帮助读者理解,也缺乏后续处理的指导。本文使用RAGTruth基准,该数据集的手工标注了未支持的段落,将每个被标记的答案拆分为单独的事实主张,逐一核对检索来源,并对比不作处理与三种逐步增强的修复策略:删除不支持的陈述、用源文本替换、重写。三类不同家族的语言模型评估了916个修复后的答案。所有策略均降低被判定含不支持内容的比例,三位评判者意见一致。删除策略在保留原文字数64.3%的情况下效果最好,重写策略保留80.1%但改善最少。修复不仅作用于错误答案,83.5%的标注为正确答案也被修改。这些策略代表的是可信性与原始信息保留之间的权衡,而非质量排序,选择应依赖关于回答有用性的证据,而自动指标无法提供此类信息。
原文摘要 · Abstract (English)
Language models increasingly answer questions by consulting retrieved documents rather than memory alone, a design now common in search assistants and enterprise knowledge tools. Grounding a model in retrieved text reduces unsupported statements but does not eliminate them, and a reader cannot tell a grounded sentence from an invented one. Most research on this problem stops at detection, yet flagging a faulty answer changes nothing for the person reading it, and little is known about which action should follow. Using RAGTruth, a benchmark whose unsupported passages are annotated by hand, we split each flagged answer into individual factual claims, check each against the retrieved source, and compare leaving the answer untouched with three repair strategies of increasing richness: deleting an unsupported claim, replacing it with source text, and rewriting it. Three language models from different families judge the 916 repaired answers. Every strategy reduces the proportion of answers judged to contain unsupported content, and all three judges agree on the ordering. Deletion achieves the largest reduction while retaining least of the original answer, at 64.3% of the text, whereas rewriting retains 80.1% and reduces least. Repair is not confined to faulty answers: 83.5% of answers annotated clean are edited too. The strategies occupy different points on a grounding preservation trade-off rather than forming a quality ranking, and choosing between them needs evidence about answer usefulness that automatic metrics cannot supply.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。