arXiv:2506.22486cs.CLcs.AI2025-06被引 1

用多个小模型检测大模型幻觉,提升问答可靠性。

Hallucination Detection with Small Language Models

  • 拆分回答为句子,用多小模型判断是否可信
  • 在100+真实数据集上提升10%的检测准确率
  • 适合需要高可靠性的实际应用和研究场景

自ChatGPT问世以来,大型语言模型(LLMs)在各类任务中展现出显著价值,如通过检索增强生成回答。上下文可通过向量化数据库检索获得,作为生成响应的基础。然而,响应中的幻觉会损害LLMs在实际应用中的可靠性,且在缺乏真实答案的情况下难以检测,尤其在问答场景中。本文提出一种框架,利用多个小型语言模型对由向量化数据库检索到的上下文生成的回应进行验证。通过将回应分解为单个句子,并利用多个模型在给定问题、回应及相关上下文下的“是”类标记生成概率,实现幻觉检测。该框架在包含超过100组问题、答案与上下文的真实数据集上进行了实验验证,涵盖完全正确和部分正确的句子。结果表明,与检测幻觉相比,正确回应的检测F1分数提升了10%,表明多个小型语言模型可有效用于回答验证,为学术与实际应用提供了一种可扩展、高效的解决方案。

原文摘要 · Abstract (English)

Since the introduction of ChatGPT, large language models (LLMs) have demonstrated significant utility in various tasks, such as answering questions through retrieval-augmented generation. Context can be retrieved using a vectorized database, serving as a foundation for LLMs to generate responses. However, hallucinations in responses can undermine the reliability of LLMs in practical applications, and they are not easily detectable in the absence of ground truth, particularly in question-and-answer scenarios. This paper proposes a framework that integrates multiple small language models to verify responses generated by LLMs using the retrieved context from a vectorized database. By breaking down the responses into individual sentences and utilizing the probability of generating "Yes" tokens from the outputs of multiple models for a given set of questions, responses, and relevant context, hallucinations can be detected. The proposed framework is validated through experiments with real datasets comprising over 100 sets of questions, answers, and contexts, including responses with fully and partially correct sentences. The results demonstrate a 10\% improvement in F1 scores for detecting correct responses compared to hallucinations, indicating that multiple small language models can be effectively employed for answer verification, providing a scalable and efficient solution for both academic and practical applications.

幻觉检测小模型问答系统验证机制

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。