[Paper Review] Trapping LLM Hallucinations Using Tagged Context Prompts
The paper proposes tagged context prompts to detect and reduce LLM hallucinations, achieving near-complete hallucination elimination (≈98.88%) in tested setups by embedding source tags within context prompts.
Recent advances in large language models (LLMs), such as ChatGPT, have led to highly sophisticated conversation agents. However, these models suffer from "hallucinations," where the model generates false or fabricated information. Addressing this challenge is crucial, particularly with AI-driven platforms being adopted across various sectors. In this paper, we propose a novel method to recognize and flag instances when LLMs perform outside their domain knowledge, and ensuring users receive accurate information. We find that the use of context combined with embedded tags can successfully combat hallucinations within generative language models. To do this, we baseline hallucination frequency in no-context prompt-response pairs using generated URLs as easily-tested indicators of fabricated data. We observed a significant reduction in overall hallucination when context was supplied along with question prompts for tested generative engines. Lastly, we evaluated how placing tags within contexts impacted model responses and were able to eliminate hallucinations in responses with 98.88% effectiveness.
Motivation & Objective
- Motivate and address the problem of LLM hallucinations in practical AI deployments.
- Develop a method to recognize outputs outside model domain knowledge and flag them as potential hallucinations.
- Evaluate how context and embedded source tags influence LLM responses and hallucination rates across models.
Proposed method
- Create a diverse question set paired with contextual prompts derived from summarized Wikipedia articles and an author’s book to test context effects.
- Embed unique source tags (source x) within context prompts to guide model responses.
- Test multiple GPT-family models with context-free vs. context-rich prompts, including tagged contexts.
- Store results in structured JSON and use regex to separate raw vs. cleaned responses for user-facing outputs.
Experimental results
Research questions
- RQ1Does providing contextual information reduce hallucinations in LLM responses across different models?
- RQ2Do embedded source tags within context prompts increase grounding of answers to supplied sources?
- RQ3How does context relevance (matched vs. mismatched) affect hallucination rates and source usage?
Key findings
- Contextual prompts substantially reduce hallucinations, with URLs dropping from 2,445 in no-context setups to 48 in context-enabled setups.
- Tagged contexts yield near-complete mitigation of hallucinations, with only 2 URL hallucinations observed in tagged contexts (≈99.88% reduction).
- Most tagged responses reference supplied sources; only one instance could not be verified by automated evaluation out of 244 tagged responses.
- In mismatched-context cases, some correct source references appeared despite irrelevance, indicating edge-case behavior needing further study.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.