用检索增强逻辑推理,提前识别假前提,防止大模型幻觉。
Don't Let It Hallucinate: Premise Verification via Retrieval-Augmented Logical Reasoning
- 将用户问题转为逻辑形式,通过检索事实源验证每个前提真伪。
- 在生成前完成验证,显著降低幻觉率,提升输出准确性。
- 无需模型梯度或大规模微调,适合实时应用。
大型语言模型(LLMs)虽能生成流畅且符合语境的回应,但在用户提问包含一个或多个错误前提时,容易产生幻觉输出——即生成与事实矛盾的内容。现有方法如预训练、微调或推理时修正,通常依赖模型输出概率(logits),或在幻觉发生后才处理,存在计算开销大、需大量数据、缺乏主动预防等问题。本文提出一种基于检索的框架,在生成前识别并纠正错误前提。首先将用户查询转化为逻辑表示,再利用检索增强生成(RAG)从外部事实源验证各前提的真假;最后将验证结果融入提示(prompt),引导模型生成一致的输出。实验表明,该方法有效减少幻觉,提升事实准确性,且无需访问模型logits或大规模微调,适用于实时场景。
原文摘要 · Abstract (English)
Large language models (LLMs) have shown substantial capacity for generating fluent, contextually appropriate responses. However, they can produce hallucinated outputs, especially when a user query includes one or more false premises-claims that contradict established facts. Such premises can mislead LLMs into offering fabricated or misleading details. Existing approaches include pretraining, fine-tuning, and inference-time techniques that often rely on access to logits or address hallucinations after they occur. These methods tend to be computationally expensive, require extensive training data, or lack proactive mechanisms to prevent hallucination before generation, limiting their efficiency in real-time applications. We propose a retrieval-based framework that identifies and addresses false premises before generation. Our method first transforms a user's query into a logical representation, then applies retrieval-augmented generation (RAG) to assess the validity of each premise using factual sources. Finally, we incorporate the verification results into the LLM's prompt to maintain factual consistency in the final output. Experiments show that this approach effectively reduces hallucinations, improves factual accuracy, and does not require access to model logits or large-scale fine-tuning.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。