TL;DR
This paper explores a novel method for LLMs to self-detect hallucinations by using an information retrieval system to find supporting evidence. The LLM then verifies its own generated answer against this evidence, achieving a promising but not perfect accuracy of 70-80%. This approach offers a practical step towards more trustworthy LLM outputs.
What Problem Does This Paper Address?
Large Language Models (LLMs) have become incredibly adept at generating human-like text, excelling in tasks like question answering. However, a significant challenge is their tendency to "hallucinate" – confidently producing incorrect or fabricated information. This makes it crucial to verify LLM-generated answers against external, reliable sources, especially in critical applications. The paper tackles the question of whether LLMs can be trained or prompted to perform this verification themselves, acting as their own fact-checkers.
Methods
The core of the proposed method involves a three-step pipeline:
- Answer Generation: An LLM is prompted to answer a given question.
- Evidence Retrieval: The original question is combined with the LLM's generated answer to form a "combined query." This query is then used to search a comprehensive corpus (MS MARCO in this case) to retrieve relevant passages that might support the LLM's answer. The paper experiments with three retrieval approaches:
- BM25: A traditional, efficient keyword-based retrieval method.
- Neural Stack: A more sophisticated approach combining sparse (SPLADE) and dense (ANCE) retrieval, followed by neural rerankers (MonoT5, DuoT5).
- Neural Stack + Reader: The neural stack is augmented with an LLM acting as a "reader" to extract a more concise answer from the retrieved passage.
- Self-Verification: The LLM is then presented with the original question, its generated answer, and the retrieved passage (or the reader-extracted answer). It's prompted to classify whether the retrieved evidence supports its generated answer. The LLM is asked to categorize the relationship into "Yes" (supported), "No" (hallucination/contradiction), or "Not Related" (requires clarification).
Datasets
The experiments are based on the MS MARCO (V1) test collection, specifically using the small development set containing 6980 questions. This dataset is well-suited for this task as it provides passages that can be used for retrieval and answer verification. No new benchmarks were introduced; the focus was on evaluating the LLM's self-verification capabilities on an existing, large-scale dataset.
Key Insights and Ideas
- LLMs can be prompted to self-verify: The most significant insight is that LLMs, when provided with relevant retrieved evidence, can indeed be prompted to assess the veracity of their own generated answers. This opens up possibilities for building more self-aware AI systems.
- Combined query is key: Using a combined query (question + generated answer) for retrieval is crucial. This ensures that the retrieved passages are not only relevant to the question but also directly related to the specific answer the LLM produced, making the verification process more targeted.
- Numbers are a challenge: The LLM struggles most with verifying answers that involve exact numbers. This is illustrated by examples where the LLM incorrectly classifies different phone numbers as "Yes" (supported), highlighting a specific weakness in its numerical reasoning and comparison capabilities.
- Retrieval method matters, but not drastically: While the neural retrieval stack generally yields higher quality passages, the choice between BM25 and the neural stack doesn't drastically alter the LLM's classification agreement rate. This suggests that even simpler retrieval methods can be effective for this verification task.
- Reader improves conciseness: Using an LLM as a reader to extract concise answers from retrieved passages can improve the LLM's ability to compare its own answer, as it leads to more comparable answer formats.
Key Results
- Overall Accuracy: The proposed self-verification approach achieves an accuracy of roughly 70-80% in detecting hallucinations.
- "Yes" Classification: The LLM correctly identifies its generated answer as supported by retrieved evidence in over 80% of cases.
- Hallucination Detection: The LLM correctly identifies contradictions (hallucinations) in less than 10% of cases.
- "Not Related" Category: The "Not Related" category, used for answers requiring clarification, is important for handling cases where the LLM explicitly states it doesn't know or needs more information.
- Reader Impact: Using the "Neural + Reader" pipeline showed a slight improvement in classification results, with the reader making mistakes in only 6.7% of cases.
Limitations and Future Work
The authors acknowledge several limitations:
- Single LLM Used: Experiments were conducted using only one LLM (gpt-3.5-turbo), chosen for API accessibility. Future work could explore other LLMs and prompt engineering techniques.
- Potential Training Data Overlap: It's possible that the MS MARCO dataset was included in the LLM's training data, which could inflate performance. The authors consider this a "best-case scenario" if it's true.
- Simple Prompting: Minimal prompt engineering was used. More advanced prompting might yield better results.
Future work directions include:
- Summarizing Top-K Passages: Having the LLM summarize multiple retrieved passages instead of just one.
- Investigating "Combined Query" vs. Original Question: Further analyzing the impact of the combined query strategy.
- Human Evaluation: Incorporating human labelers to assess more data samples.
- LLM Verification Against Official Solutions: Exploring LLM verification against known correct answers.
The paper concludes that retrieving supporting evidence offers a promising avenue for detecting and mitigating LLM hallucinations, though it's not yet a foolproof solution.
Summary updated