A Stitch in Time Saves Nine: Detecting and Mitigating Hallucinations of LLMs by Validating Low-Confidence Generation
Neeraj Varshney, Wenlin Yao, Hongming Zhang, Jianshu Chen, and Dong Yu

TL;DR
This paper presents a method to detect and reduce hallucinations in large language models during text generation, significantly improving their reliability and trustworthiness.
Contribution
The work introduces an active detection and mitigation approach for hallucinations in LLMs, validated on GPT-3.5 and other models, enhancing output accuracy without introducing new errors.
Findings
Detection recall of ~88%
Mitigation reduces hallucinations from 47.5% to 14.5%
Mitigation does not generate new hallucinations
Abstract
Recently developed large language models have achieved remarkable success in generating fluent and coherent text. However, these models often tend to 'hallucinate' which critically hampers their reliability. In this work, we address this crucial problem and propose an approach that actively detects and mitigates hallucinations during the generation process. Specifically, we first identify the candidates of potential hallucination leveraging the model's logit output values, check their correctness through a validation procedure, mitigate the detected hallucinations, and then continue with the generation process. Through extensive experiments with GPT-3.5 (text-davinci-003) on the 'article generation task', we first demonstrate the individual efficacy of our detection and mitigation techniques. Specifically, the detection technique achieves a recall of ~88% and the mitigation technique…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Artificial Intelligence in Healthcare and Education · Text Readability and Simplification
MethodsAttention Is All You Need · Cosine Annealing · Linear Layer · Byte Pair Encoding · Refunds@Expedia|||How do I get a full refund from Expedia? · Linear Warmup With Cosine Annealing · 15 Ways to Contact How can i speak to someone at Delta Airlines · Multi-Head Attention · Attention Dropout · Weight Decay
