Skip to main content
QUICK REVIEW

[论文解读] Trapping LLM Hallucinations Using Tagged Context Prompts

Philip Feldman, James R. Foulds|arXiv (Cornell University)|Jun 9, 2023
Topic Modeling被引用 13
一句话总结

本文提出带标签的上下文提示来检测并减少 LLM 的幻觉,在通过在上下文提示中嵌入源标签的测试设定中,几乎完全消除幻觉(≈98.88%)。

ABSTRACT

Recent advances in large language models (LLMs), such as ChatGPT, have led to highly sophisticated conversation agents. However, these models suffer from "hallucinations," where the model generates false or fabricated information. Addressing this challenge is crucial, particularly with AI-driven platforms being adopted across various sectors. In this paper, we propose a novel method to recognize and flag instances when LLMs perform outside their domain knowledge, and ensuring users receive accurate information. We find that the use of context combined with embedded tags can successfully combat hallucinations within generative language models. To do this, we baseline hallucination frequency in no-context prompt-response pairs using generated URLs as easily-tested indicators of fabricated data. We observed a significant reduction in overall hallucination when context was supplied along with question prompts for tested generative engines. Lastly, we evaluated how placing tags within contexts impacted model responses and were able to eliminate hallucinations in responses with 98.88% effectiveness.

研究动机与目标

  • 在实际 AI 部署中激发和解决 LLM 幻觉问题。
  • 开发一种识别超出模型知识领域的输出并将其标记为潜在幻觉的方法。
  • 评估上下文和嵌入的源标签如何影响跨模型的 LLM 响应及幻觉率。

提出的方法

  • 创建多样化的问题集,并搭配来自概述的维基百科文章和作者著作的上下文提示,以测试上下文效应。
  • 在上下文提示中嵌入唯一的源标签(source x),以引导模型回答。
  • 使用上下文无关与上下文丰富的提示测试多个 GPT 系列模型,包括带标签上下文。
  • 将结果存储为结构化 JSON,并使用正则表达式将原始响应与清理后响应分离,以便面向用户的输出。

实验结果

研究问题

  • RQ1在不同模型中提供上下文信息是否能降低 LLM 响应中的幻觉?
  • RQ2在上下文提示中嵌入的源标签是否提高了对提供源的回答的扎根性?
  • RQ3上下文相关性(匹配 vs. 不匹配)如何影响幻觉率和来源使用?

主要发现

  • 上下文提示显著减少幻觉,未有上下文的设置中 URL 为 2,445,启用上下文后降至 48。
  • 带标签的上下文几乎完全缓解幻觉,在带标签的上下文中仅观察到 2 例 URL 幻觉(约 99.88% 的减幅)。
  • 大多数带标签的响应引用提供的来源;在 244 条带标签的响应中,只有一个实例无法通过自动评估验证。
  • 在不匹配上下文的情况下,尽管相关性不足,仍出现了一些正确的来源引用,表明需要进一步研究的边缘情形。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。