Prompt-Guided Internal States for Hallucination Detection of Large Language Models

Fujie Zhang, Peiqi Yu, Biao Yi, Baolei Zhang, Tong Li +1 more
11/7/2024
cs.CL

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

Large Language Models (LLMs) have demonstrated remarkable capabilities across a variety of tasks in different domains. However, they sometimes generate responses that are logically coherent but factually incorrect or misleading, which is known as LLM hallucinations. Data-driven supervised methods train hallucination detectors by leveraging the internal states of LLMs, but detectors trained on specific domains often struggle to generalize well to other domains. In this paper, we aim to enhance the cross-domain performance of supervised detectors with only in-domain data. We propose a novel framework, prompt-guided internal states for hallucination detection of LLMs, namely PRISM. By utilizing appropriate prompts to guide changes to the structure related to text truthfulness in LLMs' internal states, we make this structure more salient and consistent across texts from different domains. We integrated our framework with existing hallucination detection methods and conducted experiments on datasets from different domains. The experimental results indicate that our framework significantly enhances the cross-domain generalization of existing hallucination detection methods.

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. 2 weaker matches are hidden by default — 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{zhang2024promptguided,
  title  = {Prompt-Guided Internal States for Hallucination Detection of Large Language Models},
  author = {Fujie Zhang and Peiqi Yu and Biao Yi and Baolei Zhang and Tong Li and Zheli Liu},
  year   = {2024},
  eprint = {2411.04847},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.04847v3}
}

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/2411.04847.svg)](https://codeofpaper.com/paper/2411.04847)

Discussion