GPTCrunch
Back to AI Glossary
Fundamentals

Hallucination

When an AI model generates information that sounds plausible and confident but is factually incorrect, fabricated, or not grounded in the provided context. A major reliability challenge in AI applications.

Hallucination refers to a language model producing statements that are factually wrong, fabricated, or unfounded — while presenting them with the same confidence as accurate information. A model might invent fake citations, describe events that never happened, attribute quotes to the wrong people, or generate plausible-sounding statistics from nowhere. This is one of the most significant challenges in deploying AI systems, because the errors can be subtle and hard to detect.

Hallucinations occur because of how language models work. They are trained to predict the most likely next token given the context, not to verify the truthfulness of their output. The model has no internal fact-checker — it generates text that is statistically consistent with its training data patterns. When asked about topics where it has limited training data, or when multiple conflicting facts exist in its training corpus, the model may confidently interpolate or fabricate details rather than expressing uncertainty.

The severity and frequency of hallucinations vary by model, task, and domain. Frontier models like GPT-4 and Claude 3 hallucinate less frequently than smaller models, but they are not immune. Hallucinations are more common when asking about obscure topics, requesting very specific details (dates, numbers, URLs), generating content in low-resource languages, or when the model is asked to "fill in" information it does not actually know. Long outputs tend to accumulate more hallucinations than short ones.

Mitigating hallucinations requires multiple strategies. RAG (retrieval-augmented generation) grounds responses in actual source documents. Asking the model to cite sources and then verifying those citations helps catch fabrications. Setting lower temperature reduces creative embellishment. Prompts that explicitly say "If you are not sure, say so" can reduce confident fabrications. For critical applications, implementing human review or automated fact-checking pipelines is essential. Guardrails and output validation can catch common hallucination patterns before they reach users.

Explore more AI concepts in the glossary

Browse Full Glossary