arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.15852cs.CLcs.AIcs.LG

大型语言模型的自我矛盾幻觉:评估、检测与缓解

Self-contradictory Hallucinations of Large Language Models: Evaluation, Detection and Mitigation

ETH Zurich(苏黎世联邦理工学院)

Niels Mündler, Jingxuan He, Slobodan Jenko, Martin Vechev

AI总结:

本研究针对大型语言模型的自我矛盾幻觉,提出基于提示的检测与缓解框架,在ChatGPT上实现约80% F1分数,并识别出17.7%的矛盾句子,无需外部知识即可应用。

摘要:

大型语言模型(大型LM)容易生成包含幻觉内容的文本。该问题的一个重要实例是自我矛盾,即语言模型在同一上下文中生成两个相互矛盾的句子。在本工作中,我们对各种指令微调的语言模型进行了关于自我矛盾的全面研究,涵盖评估、检测和缓解。我们的主要评估任务是开放域文本生成,但也展示了我们的方法在较短问答任务中的适用性。我们的分析揭示了自我矛盾的普遍性,例如,在ChatGPT生成的所有句子中,有17.7%存在自我矛盾。随后,我们提出了一种新颖的基于提示的框架,旨在有效检测和缓解自我矛盾。我们的检测器实现了高准确率,例如,在提示ChatGPT时,F1分数约为80%。缓解算法迭代地精炼生成的文本,以去除矛盾信息,同时保持文本的流畅性和信息量。重要的是,我们的整个框架适用于黑盒语言模型,且不需要检索外部知识。相反,我们的方法补充了基于检索的方法,因为很大一部分自我矛盾(例如,ChatGPT的35.2%)无法通过在线文本进行验证。我们的方法在实践中有效,并已作为一键式工具发布,以惠及公众,网址为https://chatprotect.ai/。

英文摘要:

Large language models (large LMs) are susceptible to producing text that contains hallucinated content. An important instance of this problem is self-contradiction, where the LM generates two contradictory sentences within the same context. In this work, we present a comprehensive investigation into self-contradiction for various instruction-tuned LMs, covering evaluation, detection, and mitigation. Our primary evaluation task is open-domain text generation, but we also demonstrate the applicability of our approach to shorter question answering. Our analysis reveals the prevalence of self-contradictions, e.g., in 17.7% of all sentences produced by ChatGPT. We then propose a novel prompting-based framework designed to effectively detect and mitigate self-contradictions. Our detector achieves high accuracy, e.g., around 80% F1 score when prompting ChatGPT. The mitigation algorithm iteratively refines the generated text to remove contradictory information while preserving text fluency and informativeness. Importantly, our entire framework is applicable to black-box LMs and does not require retrieval of external knowledge. Rather, our method complements retrieval-based methods, as a large portion of self-contradictions (e.g., 35.2% for ChatGPT) cannot be verified using online text. Our approach is practically effective and has been released as a push-button tool to benefit the public at https://chatprotect.ai/.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑