AI & LLMs
What is an AI hallucination?
An AI hallucination is output that a model presents as fact but that is false, invented, or unsupported: a confident answer with nothing behind it.
New to Bolt? Sign up free.
Technical definition
An AI hallucination is generated content that is not grounded in the model's input or in fact, yet is produced with the same fluency and confidence as correct output. Hallucinations arise because generative models predict likely continuations rather than retrieve verified records. When the likely continuation and the true one diverge, the model produces the likely one.
In code generation, hallucinations take specific and recognizable forms: calls to library functions that do not exist, imports of packages that were never published, API parameters invented to fit the shape of a request, and references to files or variables the project does not contain.
In plain terms
The AI made something up and did not tell you. It is not lying, and it does not know it is wrong. It produced the thing that looked most like a right answer.
Hallucinations are hard to catch for one reason: they read exactly like the correct output. There is no hedge, no warning, and no change in tone.
Why it matters
Confidence is the whole problem. A hallucination that looked uncertain would be harmless. Instead it ships.
If you are building your own software, this is the single habit that protects you: test the behavior rather than trusting the description. Click the button. Submit the form. Check that the record saved. A hallucinated feature will describe itself as working and fail on contact.
The stakes rise with what the code touches. A wrong color is a nuisance. A payment flow or a permission check that only appears to work is a real problem.
