A hallucination is a response from a generative model that is fluent and confident yet incorrect or invented, such as a fake citation, a nonexistent function, or a wrong date. It happens because the model generates likely text rather than verifying facts.
Why it matters
Hallucinated content can mislead customers, break code, or create legal and reputational problems when published unchecked. Any workflow that uses an LLM for facts needs verification steps.
Example
Asked for a command flag, a model might invent one:
$ curl --retry-forever https://example.com
curl: option --retry-forever: is unknown
The answer looked authoritative, but the flag does not exist. Checking the official documentation catches it.
Common mistakes
- Treating fluent wording as evidence of accuracy.
- Asking for sources and trusting them without opening the links.
- Believing hallucinations can be eliminated entirely; techniques such as RAG, lower temperature, and review only reduce them.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.