Trapping LLM Hallucinations Using Tagged Context Prompts

Philip Feldman, James R. Foulds, Shimei Pan
6/9/2023
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{feldman2023trapping,
  title  = {Trapping LLM Hallucinations Using Tagged Context Prompts},
  author = {Philip Feldman and James R. Foulds and Shimei Pan},
  year   = {2023},
  eprint = {2306.06085},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2306.06085v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2306.06085.svg)](https://codeofpaper.com/paper/2306.06085)

Discussion