通过检查关键事实一致性,高效检测大模型生成文本中的幻觉。
Consistency Is the Key: Detecting Hallucinations in LLM Generated Text By Checking Inconsistencies About Key Facts
- 利用同一模型或不同模型对事实探针的回答一致性判断幻觉
- 仅需少量API调用,在多个数据集上准确率更高
- 无需外部知识库,适合资源受限的API使用场景
大语言模型虽具备强大的文本生成能力,但常产生与现实不符的幻觉内容,尤其在医疗、金融等高风险领域带来严重隐患。当前多数幻觉检测方法依赖多次API调用,导致延迟高、成本大。本文提出CONFACTCHECK,基于单一模型内及跨模型间对事实探针回答的一致性原理,不依赖外部知识库,实现高效幻觉检测。在覆盖事实生成与开放生成的多个数据集上进行严格评估,结果表明其以更少资源消耗获得更高准确率,优于同类受限条件下现有基线方法。代码已开源。
原文摘要 · Abstract (English)
Large language models (LLMs), despite their remarkable text generation capabilities, often hallucinate and generate text that is factually incorrect and not grounded in real-world knowledge. This poses serious risks in domains like healthcare, finance, and customer support. A typical way to use LLMs is via the APIs provided by LLM vendors where there is no access to model weights or options to fine-tune the model. Existing methods to detect hallucinations in such settings where the model access is restricted or constrained by resources typically require making multiple LLM API calls, increasing latency and API cost. We introduce CONFACTCHECK, an efficient hallucination detection approach that does not leverage any external knowledge base and works on the simple intuition that responses to factual probes within the generated text should be consistent within a single LLM and across different LLMs. Rigorous empirical evaluation on multiple datasets that cover both the generation of factual texts and the open generation shows that CONFACTCHECK can detect hallucinated facts efficiently using fewer resources and achieves higher accuracy scores compared to existing baselines that operate under similar conditions. Our code is available here.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。