arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.00641cs.CL
收藏

在LLMs中减少上下文幻觉的概率保证

Probabilistic Guarantees for Reducing Contextual Hallucinations in LLMs

University of Hamburg(汉堡大学)

Nils Rautenberg, Sven Schippkus

AI总结:

通过引入LLM作为判断者和多数投票机制,提供概率保证以降低LLM在固定输入下的上下文幻觉概率。

摘要:

大型语言模型(LLMs)经常产生上下文幻觉,即生成的内容与提示中明确陈述的信息相矛盾或忽略。此类错误在确定性自动化工作流程中尤为严重,因为输入固定且正确性无歧义。我们引入了一个简单且模型无关的框架,为减少这种情况下幻觉的概率提供了显式的概率保证。我们正式定义了一个特定任务,由固定的输入和确定性的正确性标准定义,并展示在独立的上下文窗口中发出相同的提示会使得所有模型输出错误的概率呈指数级减少。为了在重复运行中识别正确答案,我们结合了LLM作为判断者,并证明判断流程失败的概率衰减率由判断者的真正和假阳性概率决定。当判断者不完美时,我们通过多数投票独立判断调用来加强它,从而获得在投票数量上呈指数衰减的集合级错误率。这为管道选择幻觉答案的概率提供了显式的界限。在受控提取任务中使用合成噪声判断者进行的实验与这些预测完全一致:管道失败概率随着重复次数的增加呈指数衰减,而幻觉选择概率随着集合中判断者的数量呈指数衰减。这些结果提供了一种轻量级、模块化且理论上有根据的方法,用于在固定输入的LLM工作流程中将幻觉概率任意降低,而无需修改模型权重、解码策略或提示工程。

英文摘要:

Large language models (LLMs) frequently produce contextual hallucinations, where generated content contradicts or ignores information explicitly stated in the prompt. Such errors are particularly problematic in deterministic automation workflows, where inputs are fixed and correctness is unambiguous. We introduce a simple and model-agnostic framework that provides explicit probabilistic guarantees for reducing hallucinations in this setting. We formalize the notion of a specific task, defined by a fixed input and a deterministic correctness criterion, and show that issuing the same prompt in independent context windows yields an exponential reduction in the probability that all model outputs are incorrect. To identify a correct answer among repeated runs, we incorporate an LLM-as-a-judge and prove that the probability that the judged pipeline fails decays at a rate determined by the judge's true- and false-positive probabilities. When the judge is imperfect, we strengthen it through majority vote over independent judge calls, obtaining ensemble-level error rates that decrease exponentially in the number of votes. This yields an explicit bound on the probability that the pipeline selects a hallucinated answer. Experiments on controlled extraction tasks with synthetic noisy judges match these predictions exactly: pipeline failure decreases exponentially with the number of repetitions, and hallucination-selection decreases exponentially with the number of judges in the ensemble. Together, these results provide a lightweight, modular, and theoretically grounded method for driving hallucination probabilities arbitrarily low in fixed-input LLM workflows-without modifying model weights, decoding strategies, or prompt engineering.

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

↑