Uppsats

Detection of Large Language Model (LLM) Hallucination With Cross Prompting

Master-uppsats

Stockholms universitet/Institutionen för data- och systemvetenskap

Publicerad: 2026

Språk: Engelska

Sammanfattning

Introduction In the era of information, information is easy to generate but difficult to verify, especially with the widespread use of large language models (LLMs). Since LLMs can produce hallucinated or unreliable responses,particularly in high-stakes domains such as legal services and healthcare, information generated by a single LLM cannot be fully trusted. To illustrate this problem, this thesis proposes Cross Prompting, a samplingbased method that uses multiple prompt interactions over two distinct LLMs to assess response consistency and decide whether to answer or abstain. Research Question This thesis investigates“To what extentdoes prompting with diverse, semantically equivalent user question formulations improve the robustness of hallucination detection in LLMs compared with a single-prompt semantic entropy baseline?”The results of the research question will prove whether Cross Prompting improves hallucination detection compared to the state-of-the-art approach. Method This thesis adopts a quantitative approach using a verified subsetof TriviaQA dataset. For each original question, Cross Prompting generates multiple semantically equivalent variants which are subsequently verified and answered using two distinct LLMs. The answers are assigned to different clusters using a Natural Language Inference (NLI) classifier, and semantic entropy scores are computed to estimate responses consistency for hallucination detection. Accuracy, AUROC, and AURAC are used to evaluate the improvements of the proposed method. Results Cross Prompting achieves the lowest counts in consistent hallucination cases, and makes significant improvements over the weaker baseline with mean increments of 0.0654 in hallucination accuracy, 0.0992 in correctness accuracy,0.0699 in AUROC,and 0.1689 in AURAC.It also achieves comparable performance to the stronger baseline,with mean scores of 0.8612, 0.7198, 0.8011, and 0.7156 across the same metrics, respectively. Discussion The results demonstrate that Cross Prompting provides a simple and useful cross-model framework for hallucination detection from both end-user and industrial application perspectives. However,its performance can be influenced by the quality and diversity of paraphrased invariants, and the semantic entropy should be interpreted as an uncertainty signal rather than a direct signal of factual correctness. Future work can explore methods for generating high-quality and diversity paraphrased invariants, as well as integrating semantic entropy with external evidence for better hallucination detection.

Information

Författare
Hu, Junqi
Lärosäte / institution
Stockholms universitet/Institutionen för data- och systemvetenskap
Publiceringsdatum
2026
Uppsatstyp
Master-uppsats
Språk
Engelska

Utforska vidare

Liknande uppsatser

Uppsatser med liknande ämnen och nyckelord.