How AI's Actually Work — HAAW

Hallucination

How Can a Mechanically Correct Generation Process Produce a Wrong Answer?

The Puzzle

Suppose every transistor switches normally. The GPU performs the requested arithmetic. Memory returns the stored values. The transformer executes its layers. The runtime selects tokens exactly according to its configured procedure.

HARDWARE: functioning RUNTIME: functioning MATRIX OPERATIONS: functioning TOKEN GENERATION: functioning OUTPUT: factually wrong

Nothing has to “break” electronically for the answer to be false. That is the central HAAW problem of hallucination.

Why Call It a “Hallucination”?

The word was already being used in neural language-generation research before modern general-purpose chatbots became widespread. In neural machine translation, researchers used hallucination for generated output that became badly unfaithful or even detached from the source material. The term later became common for plausible-looking but unsupported or nonfactual output from generative AI.

The name is metaphorical.

The machine is not experiencing a human hallucination. HAAW uses the established technical term while keeping the physical mechanism separate from the metaphor.

There is no single perfectly universal definition across all natural-language-generation tasks. “Unfaithful to the source,” “unsupported by the provided material,” and “plausible but nonfactual” capture related failure modes, depending on the task.

The Key: What Was the Machine Asked to Optimize?

A language model's generation machinery does not contain a universal instruction saying:

ONLY OUTPUT A TOKEN IF THE CLAIM HAS BEEN VERIFIED AS TRUE IN THE WORLD.

At generation time, the model computes scores for possible next tokens conditioned on its learned parameters and current context.

current context ↓ trained model computation ↓ logits over possible next tokens ↓ selection procedure ↓ next token

Next-token plausibility and factual truth are related in useful models, but they are not identical objectives.

A Wrong Answer Can Be a Perfectly Valid Token Sequence

Imagine a user asks for the birth year of a little-known person. The model may have weak, conflicting, or absent evidence represented in its learned parameters and context.

"She was born in " ↓ possible next-token scores ↓ "1948" plausible "1952" plausible "1956" plausible ↓ one continuation wins ↓ sentence remains fluent

The selected continuation can be linguistically excellent and factually wrong. The arithmetic that produced it can still be internally valid.

Fluency Is Not a Truth Detector

Grammar

Can the continuation form a well-structured sentence?

Coherence

Does it fit what has already been generated?

Plausibility

Does it resemble patterns learned from language?

Truth

Does the claim correspond to the relevant external facts?

The first three can reinforce one another without guaranteeing the fourth.

The Generation Loop Can Compound the Error

Once an unsupported token has been generated, it becomes part of the sequence used for subsequent generation.

correct context ↓ unsupported token ↓ unsupported token is appended to sequence ↓ later tokens condition on that new sequence ↓ a coherent story can grow around the original mistake

This is one reason an answer can become confidently detailed after taking a wrong turn. The model is continuing from the text that now exists in its own context.

No Little Fact Checker Sits Between Tokens

Recall our generation loop:

Transformer computation
↓
Logits
↓
Token selection
↓
Append token
↓
Repeat

A deployed assistant may have retrieval, search, databases, tools, verification stages or other surrounding systems. But those are additional mechanisms. The basic language-model loop itself does not automatically consult an authoritative world database before every token.

Where Can the Problem Enter?

Training Data

Data can contain errors, contradictions, omissions, noise or uneven coverage.

Learned Representation

Training compresses statistical structure into distributed parameters; it does not construct a guaranteed factual database.

Prompt / Context

The request can be ambiguous, misleading, incomplete or itself contain a false premise.

Generation

Token selection must continue even when the model's support for a factual answer is weak unless the system instead produces uncertainty or seeks evidence.

Retrieval / Tools

External evidence can itself be missing, stale, irrelevant, misunderstood or incorrectly integrated.

System Design

A product may prioritize responsiveness and usefulness while using imperfect verification and uncertainty mechanisms.

“I Don't Know” Is Also a Generated Behavior

Humans sometimes imagine that uncertainty should automatically stop generation. Mechanically, however, an answer such as:

"I don't have enough reliable information to answer that."

is itself a sequence of tokens the system must learn or be instructed to produce under appropriate conditions. Good uncertainty behavior is something models and assistant systems must be trained, prompted, evaluated and engineered to exhibit reliably.

Internal Knowledge and External Truth Are Different Things

TRAINING examples → gradients → optimizer → weights INFERENCE context + weights → activations → logits → tokens WORLD actual person / date / event / measurement / document

The first two processes occur inside the AI system. The third is the reference reality against which a factual claim may need to be checked.

The transformer can calculate a highly probable continuation without performing an independent measurement of the world.

Hallucination Is Not Necessarily Randomness

A hallucinated answer can arise deterministically. If generation uses greedy selection or otherwise deterministic settings, the same input and model state may repeatedly produce the same false statement.

wrong ≠ random wrong ≠ broken hardware wrong ≠ necessarily corrupted memory wrong can be: the output favored by a functioning learned model under the supplied conditions

Temperature Did Not Invent the Problem

Sampling settings such as temperature can change which continuation is selected and may affect error rates, but hallucination is not simply “temperature turned up too high.” Even a highest-scoring continuation can be false.

logits ↓ generation rule ↓ selected token The selection can faithfully follow the scores while the resulting factual claim is still wrong.

Grounding Changes the Problem

If a system retrieves a trusted source and places relevant evidence into context, the model can condition generation on that evidence.

QUESTION ↓ RETRIEVE SOURCE ↓ PUT EVIDENCE INTO CONTEXT ↓ MODEL GENERATES FROM QUESTION + EVIDENCE ↓ ANSWER / CITATION

This can reduce unsupported generation, but it does not mathematically guarantee truth. Retrieval can fetch the wrong material, sources can disagree, and the model can misread or misstate supplied evidence.

Verification Adds Another Loop

generate candidate claim ↓ check against evidence / tool / computation ↓ supported? ── yes → retain │ no ↓ revise / qualify / reject

That is different from merely generating fluent text. Tool use, retrieval, calculators, code execution and explicit verification can move some questions from plausible continuation toward evidence-supported answer.

Not Every Wrong Answer Is Best Called a Hallucination

The terminology is not perfectly standardized. It is useful to distinguish several possibilities:

Unsupported fabrication

A factual-looking claim or citation without adequate support.

Source unfaithfulness

A summary, translation or answer contradicts or departs from supplied source material.

Reasoning / Calculation Error

The relevant facts may be present, but a transformation or deduction is wrong.

Stale Knowledge

A formerly correct fact may no longer describe the current world.

In everyday AI discussion these may all get called “hallucinations.” HAAW should be more precise when the distinction matters.

Now Connect It to Interpretability

Suppose we capture the entire inference:

tokens ✓ activations ✓ attention values ✓ GPU operations ✓ logits ✓ selected tokens ✓

We can establish how the output was mechanically produced. That does not automatically tell us why the model's learned representation favored the false claim rather than the true one.

This is exactly where interpretability and WITNESS become valuable research questions.

What Could WITNESS Ask?

What context actually entered the model?
↓
What tokens and internal events were recorded?
↓
What logits preceded the disputed token?
↓
What generation rule selected it?
↓
What evidence supports a causal interpretation?

WITNESS should be able to establish recorded events without pretending that recording them automatically reveals their semantic cause.

The Mechanical Answer

A hallucination does not require the AI machine to malfunction.

The tokenizer can tokenize correctly. The embedding lookup can return the correct learned vector. The transformer can perform the intended matrix operations. The runtime can calculate logits and select tokens exactly as designed.

Yet the resulting statement can still be false because:

mechanically valid computation ≠ guaranteed factual truth

A language model generates from learned statistical structure and current context. Unless sufficient grounding, uncertainty handling, verification or other controls intervene, a plausible continuation can outrun the evidence supporting it.

HAAW Checkpoint

Hallucination
An established but variably defined term for generated content that is unsupported, unfaithful to its source/context, or nonfactual. The exact definition depends on the task.
Metaphor warning
The AI is not experiencing a human hallucination. The term describes an output failure.
Fluency
Language that reads naturally. Fluency does not establish truth.
Grounding
Connecting generation to relevant external evidence or supplied source material.
Verification
Checking a generated claim against evidence, computation, tools or another reliable reference.
False premise
Incorrect information already embedded in the user's request or context, which can steer generation.
Uncertainty behavior
The system's ability to qualify, defer, seek evidence or say it lacks enough information rather than fabricate.
Generation compounding
An unsupported generated token becomes part of subsequent context and can support further coherent but incorrect continuation.
Central lesson
A correct execution path can produce an incorrect factual answer. Computation and truth are different properties.

Research Note: Where the Name Came From

Neural machine translation researchers were using “hallucination” for outputs detached from their source before the current chatbot era. A 2018 paper, Hallucinations in Neural Machine Translation, explicitly used the term for pathological translations untethered from source material. Later surveys describe varying definitions across machine translation and natural-language generation. HAAW therefore treats “hallucination” as established terminology, but not as a claim that the machine has a human perceptual experience.