hal·lu·ci·na·tion
/həˌluː.sɪˈneɪ.ʃən/ (huh-loo-sih-NAY-shun) noun
- Output from a language model that is fluent and confident but not supported by its input or by fact, such as an invented function, citation or API. The assistant's fix imported
fs.readFileAsync, a hallucination: no such function exists in Node.
Origin
From Latin hallucinari, 'to wander in the mind'. Used in computer vision from about 2000 for invented image detail, and for fabricated model output by the late 2010s.
In practice
Treat any API, flag or package an assistant names as a claim to verify. Type checkers, tests and a lockfile catch most hallucinated code before it ships; giving the model the real docs prevents much of it.
Say to your AI
Use only functions that exist in the attached docs. If something you need isn't there, say so instead of inventing it.
In plain words
- the AI makes things up
- it invented a function that doesn't exist
- made-up citations
- confidently wrong answers
- it called a library method that isn't real
See also grounding eval sycophancy