通过解码提示词降低幻觉,让大模型在错误前提下仍保持准确回答。
DecoPrompt : Decoding Prompts Reduces Hallucinations when Large Language Models Meet False Premises
- 用大模型自身解码错误提示,避免直接生成幻觉内容。
- 在两个数据集上验证,显著减少不同大模型的幻觉率。
- 方法可跨模型迁移,适合大模型或无日志场景使用。
尽管大语言模型(LLMs)能力不断增强,但其生成内容与事实不符的幻觉问题日益突出。本文聚焦于一种重要幻觉场景:当模型具备正确答案所需的事实知识时,仍因错误前提误导而产生幻觉。受错误前提提示熵与其诱发幻觉概率密切相关这一现象启发,提出新提示方法DecoPrompt。该方法利用大模型对错误提示进行‘解码’,而非直接生成响应,从而避免触发幻觉。在两个数据集上的实验表明,DecoPrompt能有效减少多种大模型的幻觉输出。此外,该方法具备跨模型迁移能力,适用于模型规模大或无法获取模型日志的场景。
原文摘要 · Abstract (English)
While large language models (LLMs) have demonstrated increasing power, they have also called upon studies on their hallucinated outputs that deviate from factually correct statements. In this paper, we focus on one important scenario of false premises, where LLMs are distracted by misaligned claims although the model possesses the required factual knowledge to answer original questions accurately. Inspired by the observation that entropy of the false-premise prompt is closely related to its likelihood to elicit hallucination generation, we propose a new prompting algorithm, named DecoPrompt, to mitigate hallucination. DecoPrompt leverages LLMs to "decode" the false-premise prompts without really eliciting hallucination output from LLMs. We perform experiments on two datasets, demonstrating that DecoPrompt can reduce hallucinations effectively on outputs from different LLMs. Moreover, DecoPrompt exhibits cross-model transferability, which facilitates its applications to scenarios such as LLMs of large sizes or unavailable model logits.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。