Skip to content
AI Dev Toolkit.
Esc
  • AI Token CounterCount tokens for GPT, Claude, Gemini, DeepSeek, Qwen and more.Tool
  • LLM API Cost CalculatorEstimate per-request, daily and monthly API costs.Tool
  • AI Model ComparisonCompare prices, context windows and features across models.Tool
  • AI Model Pricing PagesSpecs, real costs and cheaper alternatives for popular models.Tool
  • Context Window CheckerSee whether your text fits each model’s context window.Tool
  • Subscription vs API CalculatorFind out whether a chat plan or the API is cheaper for you.Tool
  • GPU / VRAM CalculatorCheck how much VRAM a local model needs and which GPUs fit.Tool
  • Prompt Caching CalculatorEstimate savings from prompt caching.Tool

AI glossary · Models and context

What is an AI hallucination?

Also called: AI hallucination, LLM hallucination

Definition

A hallucination is a confident, plausible-sounding statement from a language model that is false or unsupported by its input, such as an invented citation, date, function or quote.

Explained

How it works

A model writes a likely continuation of its context; nothing in it checks that a sentence is true. Hallucinations can contradict the input you supplied, such as misreading a document, or the world, such as citing a paper that doesn’t exist. In one example from the research below, an open-weights model asked for a researcher’s birthday “if you know” gave three different wrong dates in three tries.

A 2025 paper by OpenAI and Georgia Tech researchers, “Why Language Models Hallucinate”, gives two causes. In pretraining, errors arise from ordinary statistical pressure whenever true and false statements can’t be told apart, even with error-free data. Afterwards, most benchmarks grade answers right or wrong and give nothing for “I don’t know”, so guessing scores better and models are tuned to be good test-takers.

Example

Why guessing wins under right-or-wrong grading

The paper proposes stating a confidence threshold t in the task: a right answer scores 1, “I don’t know” scores 0, and a wrong answer loses t ÷ (1 − t) points. Take a model that is 30% sure of an answer.

Under plain right-or-wrong grading, guessing is worth 0.30 on average and abstaining 0, so the model should always guess. With t = 0.5 or 0.9, the same guess is worth −0.40 or −6.00, and “I don’t know” wins. The paper argues leaderboards mostly use the first rule, so models learn to bluff.

Expected score for a guess made with 30% confidence
GradingPoints lost for a wrong answerGuessSay “I don’t know”
Right or wrong (t = 0)00.300.00
Confidence target t = 0.51−0.400.00
Confidence target t = 0.99−6.000.00

Computed from the scoring rule in the paper; the 30% confidence is an illustration.

Cost and quality

Why it matters

Hallucinations are the main reason to check model output before it reaches users or runs as code. The fixes that work are about evidence, not settings: ground answers in documents you supply (RAG), ask for direct quotes or citations and drop claims without one, and say explicitly that “I don’t know” is acceptable. Anthropic’s guide to reducing hallucinations recommends all three.

We don’t quote hallucination rates here: they depend heavily on the task and benchmark, and change with every model release. Test on your own questions.

Don’t mix up

Common confusions

Hallucination vs invalid output
Broken JSON or a reply cut off at the token limit is a format failure, fixed with structured outputs or a higher cap. A hallucination can be perfectly formatted and still false; a schema guarantees the shape, not the facts.
Hallucination vs temperature
Lowering temperature makes output more repeatable, not more true: a model can give the same wrong answer every time.

Go deeper

Try it and read more

Related

All 40 terms in the AI glossary

Written by Tahir Nazir. Checked .

How this was checked: Causes, the birthday example and the confidence-target scoring rule checked against the paper (arXiv 2509.04664) on 2026-10-11; expected scores computed on this page. Mitigations checked against Anthropic’s guide on the same day. OpenAI’s blog post about the paper blocked automated access, so we cite the paper itself.