AI agent glossary
Hallucination
When a model states something false or made up with the same confidence as a fact, such as an invented citation, function, or statistic.
Language models generate text that is plausible given what they have seen. Most of the time plausible and true line up. When they do not, the model can produce a confident, fluent, and wrong answer. That is a hallucination.
Common examples include citing papers that do not exist, calling software functions that are not in a library, and inventing specific numbers. Hallucinations are more likely when the model is asked about obscure details, recent events, or information it was never given.
The best defenses are giving the model real sources to work from, letting it use tools to look things up and run code, telling it plainly that 'I don't know' is acceptable, and verifying important claims with tests or checks.
A coding agent writes a call to a date-parsing method that sounds right but does not exist. Running the tests surfaces the error, and the agent looks up the real API.
Learn more in the course
Related terms
Go from definitions to doing
Learn to use and build AI agents in 65 practical lessons.