Build an AGIMiddleLesson 626 min read

The model proposes, the compiler disposes

The single sentence that turns an unreliable text generator into a system you can trust with real work.

Lesson in motion

In 60 seconds

The model proposes, the compiler disposes

The single sentence that turns an unreliable text generator into a system you can trust with real work.

1/6
In simple words
Anyone can say "this bridge will hold". Only the test tells you. So we stopped asking the machine to be right, and started making it prove it.
Here is the whole LLLM pattern in one line, and it is worth memorising exactly as written:
The model proposes. The compiler disposes. The language model is allowed to suggest anything at all. Ordinary, deterministic code decides whether the suggestion survives.
Notice what this does to the reliability problem. You are no longer trying to make a probabilistic system deterministic — which cannot be done. You are putting a deterministic system downstream of it, where it can be.
GoalModel proposesa guessCheckerplain codepassAnswerfail — with the error, so it can fix itthe loop
The return arrow is the whole design. A failed check is not a dead end — it is the highest-quality training signal the system will ever get, delivered instantly and for free.

What counts as a checker

Anything deterministic that can say yes or no about a proposal. Ranked by how much trust you can place in it:
CheckerWhat it provesTrust
Run the codeIt executes and produces this outputTotal, within what the code covers
Run the testsIt satisfies the properties you specifiedTotal, and only as good as your tests
A type checker or schemaThe shape is rightTotal, for shape only
A constraint solverThe answer satisfies formal constraintsTotal, within the model of the problem
A calculator or database lookupThe number or fact matches a sourceTotal, if the source is right
A regex or format checkIt looks structurally correctPartial — shape is not truth
A second LLM judgingIt seems plausible to another guesserWeak — this is not verification
Danger
That last row is where most teams quietly lose the entire benefit. An LLM checking an LLM is two guessers agreeing. It catches sloppiness and it does not catch a confident mistake, because the same reasoning that produced the mistake tends to endorse it. If your "verifier" is a prompt, you have a reviewer, not a checker.

Why code execution is the best checker we have

  • It is free — no human, no annotation, no waiting.
  • It is instant — millisecond feedback, so a loop can run many times.
  • It is unlimited — you can check a million proposals.
  • It is honest — a stack trace cannot be talked around, flattered, or prompt-injected into agreeing with you.
Do this
This is also the answer to "why did agents get good at coding first?" (Module 56). Programming is the one common domain that ships with a perfect verifier already installed. If you can find or build a checker for your domain, you can have the same thing.

Finding a checker in a domain that has none

  1. 1

    Look for the thing that is already checked

    Invoices reconcile against a ledger. Schedules must not double-book. Configurations must parse. Legal citations must resolve to a real case. That existing check is your verifier.
  2. 2

    Turn a judgement into a computation

    "Is this summary faithful?" is a judgement. "Does every claim in this summary appear in the source document?" is a computation, and a much better proxy than an LLM rating.
  3. 3

    Make the model produce something checkable

    Do not ask for prose when you can ask for a query, a formula, a diff, or a structured object. Prose cannot be executed. A SQL query can.
  4. 4

    Accept partial verification honestly

    Checking 70% of the output automatically and routing the rest to a human is a real system. Pretending an LLM judge covers the other 30% is not.

Watch and read more

Lab

A verifier for a domain that supposedly has none.

~20 min

The problem

Pick a task where correctness feels subjective. Find one property that is objectively checkable and build a verifier for it. Measure how much of the quality gap it closes.
Starter codepython
# "Is this summary faithful?" -> judgement.
# "Does every claim appear in the source?" -> computation.
def unsupported_claims(summary, source):
    return [c for c in extract_claims(summary) if not entailed(c, source)]

You are done when

Hard questions

Try to answer before you reveal. If you can answer these, you understood the lesson.

Q1Your verifier covers 70%. A colleague proposes an LLM judge for the rest. Give the strongest case for and against.Reveal
For: it is cheap, it correlates with human judgement well enough to catch obvious failures, and 70% plus an imperfect 30% may beat 70% plus nothing — provided you calibrate the judge against human ratings on a sample and report its agreement rate. Against: it is not verification and must never be labelled as such, it fails hardest on adversarial and unusual inputs where you most need it, and it creates a number that looks like coverage. Ship it as a triage signal that routes to humans, never as a gate.

Please sign in to continue.

Questions people ask

What if my domain genuinely has no checker?

Then you are building a tier-2 system with a human as the checker, and you should say so plainly in your design. That is a perfectly good product. The failure is claiming automated verification you do not have.

Is this just retry-on-error?

Retry repeats the same request. This feeds the specific failure back in as context, so the next attempt is informed by exactly what went wrong. That difference is most of the value.

How many correction rounds should I allow?

Three to five for most tasks. Beyond that, success rates fall sharply — a model that has failed five times is usually stuck in a wrong approach rather than close to a right one. Cap it, and escalate to a human.

Does this make the model smarter?

No. The model is identical. The system is more reliable, which is what you were actually being asked to deliver.

Lesson test

5 questions. Get 3 right (60%) to pass and complete this lesson.

Sign in with your phone number to take the test and save your progress