Get big work done without hallucinations surviving

Hallucination Firewall

Not by making the model stop hallucinating — by building a structure a hallucination can't get through.

A worker never marks its own homework. Every unit of work is graded by an independent, deterministic checker that re-derives the answer from ground truth and ignores what the worker said about itself. Fail → specific feedback → retry until true, or hit a cap and fail honestly.

The mechanism

 spec → [ WORKER (cheap model) ] → answer (+ any self-report, DISCARDED)
              ▲                          │
   specific  │                          ▼
   feedback  └──── [ CHECKER (deterministic code, run by the coordinator) ]
                          ok?  → ship
                          no   → feedback, retry
                          cap  → HONEST FAILURE, escalate

The expensive model is the boss: it writes the spec and settles disputes and never does the grunt work. The grunt work goes to the cheapest model that fits — its mistakes don't survive the checker. That's the 10× cost gap.

The one rule you cannot break

The worker may be a model. The checker may not — and neither may the data path or the grading path. A green that was reported by a model is worthless. How this rule was earned →

It proves itself

python hallucination_firewall.py → 6/6 proofs pass in ~2 seconds, zero tokens:

1 · Teeth

A known fake goes RED; self-report ignored.

2 · No false alarms

Clean work passes.

3 · Converges

A hallucinating worker is driven to correct.

4 · Honest abort

Won't-fix hits the cap → failure, not fake done.

5 · Fails closed

Garbage input = failed check, never a crash.

6 · Domain-agnostic

Swap the checker for any task.

Use it

# install as a Claude skill
git clone https://github.com/scottconverse/hallucination-firewall
cp -r hallucination-firewall ~/.claude/skills/hallucination-firewall

# run the self-proof
python hallucination_firewall.py

# grade a real worker's output against ground truth
python hallucination_firewall.py --check answer.json --source source_of_truth.md

Best fit: bulk work fanned out to cheap models, where one quiet fabrication would hide among the right answers. Skip it for small one-off tasks you can eyeball.