← Back to Cooldecode
AI Watch · LLM fundamentals

Hallucinations: why models guess instead of saying "I don't know"

A hallucination is a confident, fluent statement that is false. It isn't a random glitch — it falls out of how models are trained, how they're graded, and how their internal "do I know this?" machinery can misfire. Understanding the three causes tells you which fixes actually work.

1. What a hallucination is (and isn't)

A language model generates the most plausible next piece of text given what came before. When the text it produces states something untrue — an invented citation, a function that doesn't exist in a library, a wrong date — as if it were fact, that's a hallucination. The problem isn't that the output is wrong; it's that the tone doesn't change. A made-up answer reads exactly like a correct one.

Two kinds are worth separating. Closed-book hallucinations happen when the model answers from memory and its memory is missing or blurry. Grounded hallucinations happen even when you hand it the source — it summarizes a document and adds a claim the document never made. They have different fixes.

2. Cause 1: pretraining can't tell fact from plausible

Research from OpenAI and collaborators (Why Language Models Hallucinate, Sept 2025) frames hallucinations as ordinary statistical errors. During pretraining the model only sees positive examples of fluent text. It never gets a label saying "this sentence is false." If it can't reliably distinguish valid statements from plausible-looking invalid ones, then errors appear through plain statistical pressure — the same way a classifier makes mistakes on cases it has little evidence about.

The practical consequence: facts that appear rarely in training data are the most likely to be hallucinated. A famous event is stated correctly thousands of times; a one-off detail — a minor person's birthday, an obscure API parameter — appears once or never, so the model has patterns but no firm memory, and fills the gap with something that fits the pattern.

3. Cause 2: the way models are graded rewards guessing

The same research makes a sharper point: hallucinations persist because most benchmarks and training signals give credit for correct answers and give no credit for "I don't know." Think of a multiple-choice exam with no penalty for wrong answers: the best strategy is always to guess. A model optimized against such scores learns to be a good test-taker, not an honest one.

Grading schemeAnswer rightSays "I don't know"Answer wrongBest strategy
Accuracy only (most leaderboards)+100Always guess
Penalize confident errors+10negativeGuess only when likely right

The authors' proposed fix is socio-technical rather than a new algorithm: change the scoring of the existing, widely used evaluations so that confident errors cost more than abstentions, instead of adding yet another separate "hallucination benchmark" that nobody optimizes for.

Why this matters to you: when you compare models by a single accuracy number, you're partly rewarding the model that guesses more. A lower-scoring model that abstains more often can be the safer one to build on.

4. Cause 3: what happens inside — a "known entity" misfire

Anthropic's interpretability work on Claude ("Tracing the thoughts of a large language model", March 2025, with the companion papers on circuit tracing) looked at this from the inside. Their finding: in Claude, declining to answer is the default behavior. A circuit that says "I can't answer this" is on unless something switches it off. What switches it off is a "known entity" feature — an internal signal that fires when the model recognizes the thing being asked about.

Hallucination happens when that recognition signal misfires: the name or topic feels familiar enough to suppress the default refusal, but the model doesn't actually hold the facts. The reported example was an invented name ("Michael Batkin") — the model treated it as a known person and then produced fabricated details to match. So the failure isn't "the model doesn't know it doesn't know"; it's "the familiarity check said yes when it should have said no."

This also explains an odd experience: models hallucinate more about things that are almost familiar — a plausible-sounding library name, a real author with a fake book — than about things that are clearly unfamiliar.

5. What reduces hallucinations in practice

6. What doesn't fix it

Takeaway: hallucinations come from three places — training that can't label falsehoods, grading that rewards guessing, and a familiarity check that sometimes fires wrongly. You can't remove them by instruction; you reduce them by changing the task: ground it in a source, allow "I don't know", require evidence, and verify what matters.

Sources

Note: the Anthropic and OpenAI primary pages were not read directly in this run; findings are taken from the paper abstract/HTML and from secondary coverage that quotes the Anthropic work.

IA Watch · Fundamentos de LLMs

Alucinações: por que os modelos chutam em vez de dizer "não sei"

Uma alucinação é uma afirmação confiante, fluente e falsa. Não é um defeito aleatório — ela nasce de como os modelos são treinados, de como são avaliados e de como o mecanismo interno de "eu conheço isso?" pode falhar. Entender as três causas mostra quais correções realmente funcionam.

1. O que é (e o que não é) uma alucinação

Um modelo de linguagem gera o próximo trecho de texto mais plausível dado o que veio antes. Quando o texto produzido afirma algo falso — uma citação inventada, uma função que não existe numa biblioteca, uma data errada — como se fosse fato, isso é uma alucinação. O problema não é só a resposta estar errada; é que o tom não muda. Uma resposta inventada soa exatamente como uma correta.

Vale separar dois tipos. As alucinações de livro fechado acontecem quando o modelo responde de memória e a memória está ausente ou borrada. As ancoradas acontecem mesmo quando você entrega a fonte — ele resume um documento e acrescenta uma afirmação que o documento nunca fez. Cada tipo tem correções diferentes.

2. Causa 1: o pré-treino não separa fato de plausível

Pesquisa da OpenAI e colaboradores (Why Language Models Hallucinate, set/2025) trata alucinações como erros estatísticos comuns. No pré-treino o modelo só vê exemplos positivos de texto fluente. Nunca recebe um rótulo dizendo "esta frase é falsa". Se ele não consegue distinguir com segurança afirmações válidas de afirmações inválidas com cara de plausíveis, os erros surgem por simples pressão estatística — como um classificador que erra em casos sobre os quais tem pouca evidência.

A consequência prática: fatos raros nos dados de treino são os mais propensos a serem alucinados. Um evento famoso é dito corretamente milhares de vezes; um detalhe isolado — o aniversário de uma pessoa pouco conhecida, um parâmetro obscuro de uma API — aparece uma vez ou nenhuma, então o modelo tem padrões, mas não uma memória firme, e preenche o buraco com algo que se encaixa no padrão.

3. Causa 2: o jeito de avaliar recompensa o chute

A mesma pesquisa faz um ponto mais afiado: as alucinações persistem porque a maioria dos benchmarks e sinais de treino dá crédito para resposta certa e nenhum crédito para "não sei". Pense numa prova de múltipla escolha sem penalidade para erro: a melhor estratégia é sempre chutar. Um modelo otimizado contra esse tipo de nota aprende a ser um bom candidato de prova, não um honesto.

Esquema de notaAcertaDiz "não sei"ErraMelhor estratégia
Só acurácia (a maioria dos rankings)+100Sempre chutar
Penaliza erro confiante+10negativoChutar só quando provável

A correção proposta pelos autores é sociotécnica, não um novo algoritmo: mudar a pontuação das avaliações já existentes e amplamente usadas para que erro confiante custe mais que abstenção, em vez de criar mais um "benchmark de alucinação" separado que ninguém otimiza.

Por que isso importa pra você: ao comparar modelos por um único número de acurácia, você está em parte premiando o modelo que chuta mais. Um modelo com nota menor que se abstém mais pode ser o mais seguro para construir em cima.

4. Causa 3: o que acontece por dentro — um erro no "já conheço isso"

O trabalho de interpretabilidade da Anthropic sobre o Claude ("Tracing the thoughts of a large language model", março/2025, com os artigos complementares sobre circuit tracing) olhou isso por dentro. A descoberta: no Claude, recusar-se a responder é o comportamento padrão. Existe um circuito dizendo "não consigo responder isso" que fica ligado, a menos que algo o desligue. O que o desliga é uma feature de "entidade conhecida" — um sinal interno que dispara quando o modelo reconhece aquilo de que se fala.

A alucinação acontece quando esse sinal de reconhecimento falha: o nome ou o tema parece familiar o bastante para suprimir a recusa padrão, mas o modelo não tem de fato os fatos. O exemplo relatado foi um nome inventado ("Michael Batkin") — o modelo o tratou como uma pessoa conhecida e então produziu detalhes fabricados para combinar. Ou seja, a falha não é "o modelo não sabe que não sabe"; é "a checagem de familiaridade disse sim quando devia dizer não".

Isso também explica uma experiência estranha: os modelos alucinam mais sobre coisas quase familiares — um nome de biblioteca plausível, um autor real com um livro falso — do que sobre coisas claramente desconhecidas.

5. O que reduz alucinações na prática

6. O que não resolve

Conclusão: as alucinações vêm de três lugares — um treino que não rotula o falso, uma avaliação que recompensa o chute e uma checagem de familiaridade que às vezes dispara errado. Não dá para eliminá-las por instrução; dá para reduzi-las mudando a tarefa: ancore numa fonte, permita o "não sei", exija evidência e verifique o que importa.

Fontes

Nota: as páginas primárias da Anthropic e da OpenAI não foram lidas diretamente nesta execução; as informações vêm do resumo/HTML do artigo e de coberturas secundárias que citam o trabalho da Anthropic.