[论文解读] RAGTruth: A Hallucination Corpus for Developing Trustworthy Retrieval-Augmented Language Models
本文介绍了 RAGTruth,这是一个大规模、人工标注的语料库,包含 18,000 个 RAG 生成的回复,涵盖多种任务和模型,且在词级别上标注了幻觉。实验表明,将较小的 LLM(如 Llama-2-13B)在 RAGTruth 上进行微调,可实现与基于 GPT-4 的提示方法相媲美的幻觉检测性能,通过选择性采样显著降低了生成输出中的幻觉率。
Retrieval-augmented generation (RAG) has become a main technique for alleviating hallucinations in large language models (LLMs). Despite the integration of RAG, LLMs may still present unsupported or contradictory claims to the retrieved contents. In order to develop effective hallucination prevention strategies under RAG, it is important to create benchmark datasets that can measure the extent of hallucination. This paper presents RAGTruth, a corpus tailored for analyzing word-level hallucinations in various domains and tasks within the standard RAG frameworks for LLM applications. RAGTruth comprises nearly 18,000 naturally generated responses from diverse LLMs using RAG. These responses have undergone meticulous manual annotations at both the individual cases and word levels, incorporating evaluations of hallucination intensity. We not only benchmark hallucination frequencies across different LLMs, but also critically assess the effectiveness of several existing hallucination detection methodologies. Furthermore, we show that using a high-quality dataset such as RAGTruth, it is possible to finetune a relatively small LLM and achieve a competitive level of performance in hallucination detection when compared to the existing prompt-based approaches using state-of-the-art large language models such as GPT-4.
研究动机与目标
- 为解决在检索增强生成(RAG)场景中评估幻觉时缺乏高质量、大规模数据集的问题。
- 利用自然生成的回复,在多种 LLM 的 RAG 设置下,对幻觉频率进行基准测试。
- 评估现有幻觉检测方法在 RAG 环境中,于篇章和词级别上的有效性。
- 开发并验证一种基于微调的幻觉检测方法,其性能优于使用大型模型的提示方法。
- 证明经过微调的小型 LLM 可有效抑制 LLM 输出中的幻觉,即使在 GPT-4 这类本身幻觉率较低的模型中亦然。
提出的方法
- 从多个领域和任务中的主流开源与闭源 LLM 中收集了近 18,000 个自然生成的 RAG 回复。
- 进行了细致的词级别人工标注,对幻觉进行标注并附带强度评分,确保高质量、细粒度的评估数据。
- 在 RAGTruth 语料库上对多种现有幻觉检测方法(包括 GPT-4-turbo)进行了跨度级别幻觉检测的基准测试。
- 在 RAGTruth 训练数据上对 Llama-2-13B 模型进行微调,构建专用的幻觉检测模型。
- 提出了两种采样策略:选择幻觉跨度更少的回复,或选择未检测到幻觉跨度的回复。
- 通过比较随机选择、基于检测器的选择与基线模型的幻觉率,评估了幻觉抑制性能。
实验结果
研究问题
- RQ1在不同任务和领域中,不同 LLM 在 RAG 框架下生成回复时,其幻觉率如何变化?
- RQ2现有幻觉检测方法(包括 GPT-4-turbo)在识别 RAG 生成内容中的词级别幻觉方面,表现如何?
- RQ3在高质量幻觉语料(如 RAGTruth)上微调小型 LLM,能否实现与使用 GPT-4 等先进模型的提示方法相媲美的检测性能?
- RQ4基于微调的幻觉检测器是否能通过响应采样策略有效降低 LLM 输出中的幻觉率?
- RQ5在 RAG 环境中,不同类型幻觉跨度(如明显 vs. 隐蔽)的可检测性有何差异?
主要发现
- RAGTruth 语料库包含近 18,000 个完全标注的、自然生成的 RAG 回复,涵盖多样化任务与模型,并在词级别上提供了详细的幻觉标注。
- GPT-4-turbo 在 RAGTruth 上的跨度级别 F1 得分为 48.4%,精确率为仅 24%,表明其在跨度级别检测幻觉方面表现欠佳。
- 在 RAGTruth 上微调 Llama-2-13B 达到了 48.4% 的竞争性 F1 得分,证明小型模型可达到与基于提示的 GPT-4 方法相当的性能。
- 使用微调后的检测器对两个回复进行采样,使 Llama-2-7B-chat 的幻觉率降低了 56.6%,GPT-4 的幻觉率降低了 52.9%,即使在本身幻觉率较低的模型中也显著有效。
- 对明显幻觉的检测效果显著优于对隐蔽幻觉的检测,凸显了识别隐蔽事实不一致的难度。
- 基于选择未检测到幻觉跨度回复的采样策略,优于基于最小化检测到跨度数量的策略,尤其在低幻觉率模型中表现更优。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。