What Is Hallucination?
Hallucination happens when a language model generates plausible-sounding but incorrect or ungrounded information. Instead of returning fact-based answers, the model “dreams up” details based on its training distribution rather than your prompt or real-world data.
Example: When Hallucinations Occur
Consider this simple QA:
Strategies to Prevent Hallucination
Providing explicit context and instructions up front can dramatically reduce model errors and hallucinations.
Even the best prompts can’t replace real-world verification. Always cross-check critical facts.

Live Example: Adding Context
Without context the model may respond with an apology rather than an answer:Live Example: Handling Recent Events
LLMs trained up to 2021 lack awareness of later events: