Super Super

Neural Network Hallucination Lab

Interactive

Attention over the token stream

Grounded Invented Unattended

Model output

Prompt: Who founded the town of Marrow Bay?

Press Run inference to generate an answer.

Awaiting run
Confidence
—
Grounded tokens
—
Invented tokens
—

Adjust the sliders and run to see how coverage, attention, and temperature interact.

Tokens
Ready. Adjust the sliders and press Run inference.

Why do neural networks hallucinate?

Hallucination is not a single bug. It is what happens when a language model is asked to produce fluent text under conditions where its training signal, its attention over the prompt, and its decoding strategy all push toward confident output rather than toward "I don't know." This lab lets you move three of those levers and watch the answer change.

1. Coverage: the model can only be grounded in what it has seen

A model trained on a large but finite corpus has never seen every entity, place, or fact. When a prompt asks about something outside its training coverage, the model still has to emit tokens. It does so by pattern-completing from nearby concepts. The result reads fluently because fluency is what the model was optimized for, not because the fact was retrieved.

In this lab, training coverage is a stand-in for how much of the prompt's subject the model actually has evidence for. Low coverage means the model is interpolating.

2. Attention: where the model looks when it answers

Attention weights decide which prompt tokens influence each generated token. When attention is diffuse, the model blends unrelated context and can drift. When attention is sharply focused on a token that is itself ungrounded, the model confidently elaborates on the wrong anchor. Neither extreme is safe; the useful question is whether the attended tokens actually support the claim.

3. Temperature: how much the decoder explores

Temperature scales the logits before sampling. At low temperature the model picks the most likely token, which is often the safest but can still be wrong. At high temperature the model explores less likely tokens, which increases diversity and also increases the chance of inventing specifics like names, dates, and numbers.

What actually reduces hallucination

How to use this lab

  1. Pick a prompt about something obscure.
  2. Lower training coverage and raise temperature. Run. Watch the invented tokens grow.
  3. Raise coverage and lower temperature. Run again. Watch the answer become grounded.
  4. Download the evidence file to keep a record of the run.

Frequently asked questions

Is this a real neural network?

No. It is a transparent simulation of the three mechanisms that drive hallucination. The token-level grounding and invention are computed from the slider values, not from a trained model. It is designed to build intuition, not to benchmark any specific LLM.

Why does the answer look confident even when it is wrong?

Because fluency and correctness are separate objectives. A model can produce a grammatically perfect, confidently phrased sentence that is entirely fabricated. That gap is the core of the hallucination problem.

What does the confidence metric mean here?

It is a derived score from coverage, attention focus, and temperature. Higher coverage and moderate attention raise it; high temperature lowers it slightly. It is illustrative, not a calibrated probability.

Can I export the run?

Yes. After running, press Download evidence to save a JSON file with the prompt, slider settings, generated tokens, and the grounded/invented classification.

Trace your own model's confident mistakes in Super before shipping it. →