الانتقال إلى المحتوى
أساسيات الـ AIمفاهيم الـ AI· 6 دقائق للقراءة

Why LLMs Hallucinate, and Why a Bigger Model Won't Simply Fix It

Rare facts and tests that reward guessing make confident errors predictable, so design for them.

ReadIn

مقال كل يوم يفرق معاك

21 نوفمبر 2026
  • كاتب موثّق
محتويات المقال

A developer asks the team's coding assistant how to enable caching in an internal library and gets a tidy answer: a config key, its default value and a code sample. The key doesn't exist. In the retro, someone says the next, bigger model will fix it. The authors of Why Language Models Hallucinate ran a cleaner test: they asked DeepSeek-V3, a 600-billion-parameter model, for one author's birthday, adding "If you know, just respond with DD-MM". Three attempts returned three different wrong dates.

The common misconception

"Hallucinations are rare bugs that the next, bigger model will eliminate." It's a reasonable extrapolation:

  • Bigger models really do know more, so it's tempting to imagine one that knows everything.
  • On well-known facts, models are usually right. The paper notes that large models seldom err on frequently referenced facts such as Einstein's birthday, so errors feel like edge cases.
  • In software, "bug" means something a patch will fix.

The half-truth is that some errors do shrink with better models. But the two main causes of hallucination have nothing to do with size: what the training data contains, and how models are scored.

What actually happens

Two kinds of hallucination

A large survey by Huang and colleagues splits into two families. Factuality hallucinations contradict verifiable facts about the world or invent them: the fake config key, a citation that doesn't exist. Faithfulness hallucinations diverge from what you gave the model: ignoring an instruction, adding something the source document never said, or contradicting itself. The second family matters because it survives even when you supply the right documents.

Pretraining: some facts can't be learned from patterns

Kalai and colleagues show that hallucinations "originate simply as errors in binary classification": if a model can't reliably tell a false statement from a true one, generating text will sometimes produce the false one. Spelling and syntax follow patterns, so a good model gets them right. Arbitrary facts, such as a person's birthday, follow no pattern, and a fact that appears once in the training data gives the model nothing to generalize from.

The paper turns that into a lower bound. If 20% of birthday facts appear exactly once in the pretraining data, expect a base model to hallucinate on at least 20% of birthday facts. A larger model doesn't change how often a fact appears in the data.

Post-training: tests reward guessing

Fine-tuning after pretraining could teach a model to say "I don't know" more often. But most benchmarks grade answers right or wrong: 1 point for a correct answer, 0 for a wrong one, 0 for "I don't know". Under that scheme, the paper notes, abstaining is strictly suboptimal, so models tuned to top the leaderboards learn to be good test-takers who bluff, like students guessing on a multiple-choice exam.

What a misfire looks like inside

Anthropic's interpretability team found that Claude's default circuit says it can't answer, and a "known entity" signal switches that default off when it recognizes a name. When that signal fires for a name the model recognizes but knows little about, the refusal is suppressed and a plausible, untrue answer comes out.

What size fixes, and what it doesn't

Better models do fix "poor model" errors: the paper shows a reasoning model reliably counting letters that a standard model got wrong. They also know more facts. They don't fix facts that are rare or absent in training data, your private data, or the incentive to guess. Retrieval reduces factual errors too, but the paper calls search and reasoning "not panaceas": when search finds nothing confident, binary grading still rewards a guess. What does stop hallucination is abstention. The paper points out that a system that answers a fixed set of questions and says "I don't know" to everything else never hallucinates.

The arithmetic of guessing

This script computes the expected score of answering, compared with "I don't know", under binary grading and under the paper's proposal: state a confidence target t in the instructions and charge t/(1−t) points for a wrong answer.

Python guessing_math.py
def expected_points(confidence, wrong_penalty):    # +1 if right, -wrong_penalty if wrong; "I don't know" always scores 0    return confidence - (1 - confidence) * wrong_penaltyt = 0.9  # confidence target stated in the instructionspenalty = t / (1 - t)  # Kalai et al.: a wrong answer costs t/(1-t) pointsfor p in [0.3, 0.6, 0.95]:  # how likely the model's best guess is right    binary = expected_points(p, wrong_penalty=0)    target = expected_points(p, wrong_penalty=penalty)    choice = "answer" if target > 0 else "say I don't know"    print(f"{p:.2f}: binary {binary:+.2f}, target {target:+.2f}, {choice}")

Under binary grading, even a 30% guess is worth +0.30 against 0 for honesty, so guessing always wins. With a 90% target, guessing at 30% or 60% costs −6.00 and −3.00, and only the 95% answer is worth giving. Same model, same knowledge: the scoring rule decides whether bluffing pays.

MythReality
Hallucinations are rare glitchesThey follow from rare facts in training data and from scoring that rewards guessing
A bigger model will remove themIt knows more, but rare facts, private data and the incentive to guess remain
Retrieval solves itIt reduces factual errors; the model can still guess or contradict your documents
A confident answer is a known answerA 600-billion-parameter model gave three different wrong birthdays
A prompt can switch it offPermission to abstain and quotes reduce it; nothing eliminates it

How to apply it in your project

  1. Allow and accept "I don't know"Say in the prompt that "I don't have enough information" is a valid answer, and treat it as a normal outcome in your UI and metrics, not a failure.
  2. Ground answers in sourcesPass the relevant documents, ask for quotes or citations for factual claims, and drop claims that have no support.
  3. Verify what code can verifyRun generated code, check that imports and config keys exist, and compare IDs, prices and dates with your database.
  4. Score confident errors worse than abstentionsIn your evals, give a point for a right answer, zero for an abstention and a penalty for a wrong answer. Otherwise you'll pick the model or prompt that bluffs best.

Key takeaways

  • Hallucinations are a predictable result of how models are trained and scored, not rare glitches.
  • Facts that appear once or never in training data can't be learned from patterns, and model size doesn't change the data.
  • Binary grading makes a guess score better than "I don't know"; penalize confident errors to stop rewarding bluffs.
  • Permission to abstain, grounding and citations reduce hallucinations; verification catches what's left.

📚 المصادر

  1. Kalai, Nachum, Vempala and Zhang, Why Language Models Hallucinate, arXiv:2509.04664
  2. Huang et al., A Survey on Hallucination in Large Language Models (ACM TOIS), arXiv:2311.05232
  3. Reduce hallucinations — Claude API Docs
  4. Tracing the thoughts of a large language model — Anthropic

التعليقات (0)