What is Hallucination?
Also called: AI hallucination
The short answer
A hallucination is when an AI states something false with confidence, such as a function that does not exist, a wrong fact or an invented source.
Hallucination, explained
In code it shows up as calls to APIs or packages that do not exist. Type checking, running the code and testing catch most of it.
Questions people ask about Hallucination
What is Hallucination?
A hallucination is when an AI states something false with confidence, such as a function that does not exist, a wrong fact or an invented source.
Related terms
A large language model is an AI system trained on vast amounts of text to predict and generate language, including code, which powers chatbots and coding agents.
Reviewing AI-generated codeReviewing AI-generated code means checking what an AI wrote before it ships: that it does what was asked, handles errors, stays secure and does not quietly break other things.
Automated testingAutomated tests are code that checks other code: unit tests check small functions, and end-to-end tests drive a real browser through whole user flows.
Vibe codingVibe coding is building software by describing what you want to an AI in plain language and iterating on what it produces, rather than writing the code line by line yourself.
Part of the Web Encyclopedia by Apex Flow Digital. Definitions are general knowledge, kept current, with no invented statistics.