article · Nature · 2024
Detecting hallucinations in large language models using semantic entropy
Sebastian Farquhar, Jannik Kossen, Lorenz Kuhn, Yarin Gal
Cited by 437Open access
Abstract
Large language model (LLM) systems, such as ChatGPT<sup>1</sup> or Gemini<sup>2</sup>, can show impressive reasoning and question-answering capabilities but often 'hallucinate' false outputs and unsubstantiated answers<sup>3,4</sup>. Answering unreliably or without the necessary information prevents adoption in diverse fields, with problems including fabrication of legal precedents<sup>5</sup> or untrue facts in news articles<sup>6</sup> and even posing a risk to human life in medical domains such as radiology<sup>7</sup>. Encouraging truthfulness through supervision or reinforcement has been only partially successful<sup>8</sup>. Researchers need a general method for detecting hallucinations in LLMs that works even with new and unseen questions to which humans might not know the answer. Here we develop new methods grounded in statistics, proposing entropy-based uncertainty estimators for LLMs to detect a subset of hallucinations-confabulations-which are arbitrary and incorrect generations. Our method addresses the fact that one idea can be expressed in many ways by computing uncertainty at the level of meaning rather than specific sequences of words. Our method works across datasets and tasks without a priori knowledge of the task, requires no task-specific data and robustly generalizes to new tasks not seen before. By detecting when a prompt is likely to produce a confabulation, our method helps users understand when they must take extra care with LLMs and opens up new possibilities for using LLMs that are otherwise prevented by their unreliability.
Cite this paper
Farquhar, S., Kossen, J., Kuhn, L., & Gal, Y. (2024). Detecting hallucinations in large language models using semantic entropy. Nature, 630(8017), 625–630. https://doi.org/10.1038/s41586-024-07421-0
Farquhar, Sebastian, et al. “Detecting hallucinations in large language models using semantic entropy.” Nature, vol. 630, no. 8017, 2024, pp. 625–30, https://doi.org/10.1038/s41586-024-07421-0.
Farquhar, Sebastian, Jannik Kossen, Lorenz Kuhn, and Yarin Gal. 2024. “Detecting hallucinations in large language models using semantic entropy.” Nature 630 (8017): 625–30. https://doi.org/10.1038/s41586-024-07421-0.
Farquhar, S. et al. (2024) ‘Detecting hallucinations in large language models using semantic entropy’, Nature, 630(8017), pp. 625–630. Available at: https://doi.org/10.1038/s41586-024-07421-0.
@article{farquhar2024detecting,
title = {{Detecting hallucinations in large language models using semantic entropy}},
author = {Farquhar, Sebastian and Kossen, Jannik and Kuhn, Lorenz and Gal, Yarin},
journal = {Nature},
volume = {630},
number = {8017},
pages = {625--630},
year = {2024},
doi = {10.1038/s41586-024-07421-0}
}Made from the index record. Check names, capitalisation and page numbers against the paper. Need another style? AI for Research has over 10,000.