Mahal Systems

Overview › 9Verification

Verification

8 optimizations in 3 sub-categories.

a.Checking externally

Check work against sound external signals

  1. i.

    Feed back a sound external verifier's verdict; never the model's own critique

    Run a check the model cannot fool on its output (compiler, tests, schema validation, execution, EXPLAIN on generated SQL, a solver) and feed the verdict back; a pass/fail verdict is enough, and resampling until the check accepts works about as well as detailed feedback.

    Better qualityHigher costSlower

    Tier 2 · reliability · changes control flow · any agent · 31 sources, 17 measured

  2. ii.

    Verify citations claim by claim for factual support

    Extract claim-citation pairs deterministically, then check each: the link resolves, the source is relevant, and the source actually supports the claim.

    Better qualityLower cost

    Tier 3 · tuning · changes control flow, knowledge access · web research, retrieval agents · 8 sources, 5 measured

b.Confirming completion

Confirm the task is actually done before stopping

  1. i.

    Make the final answer reliably extractable: state the format, extract robustly, force an answer at the limit

    State the required answer format in the prompt, and make the harness extract it robustly: strip markers, normalize numbers, detect refusals, and force a best-effort answer when the loop ends on a budget rather than returning nothing.

    Better quality

    Tier 2 · reliability · changes control flow, prompt · structured output agents · 4 sources

  2. ii.

    Triage false success with a cheap trained detector, not an LLM judge

    Train a lightweight text classifier (TF-IDF with logistic regression) on 50-100 labeled runs to flag likely false successes for review.

    Better qualityLower costFaster

    Tier 2 · reliability · changes control flow · judging agents · 6 sources, 6 measured

  3. iii.

    Verify completion against the environment before the agent stops

    Never take the agent's own report that it finished.

    Better qualityHigher costSlower

    Tier 2 · reliability · changes control flow · any agent · 22 sources, 9 measured

c.Sizing verification

Match verification effort to what it catches

  1. i.

    Don't prompt agents to write their own tests; suppress it for test-heavy models

    Agent-written tests are mostly print probes and do not change resolve rate.

    Lower costFaster

    Tier 3 · tuning · changes control flow · code generation agents · 6 sources, 2 measured

  2. ii.

    Spend extra samples before extra verification: parallel attempts with a vote or judge; verify only where it pays

    Running several independent attempts and picking by majority vote or a judge raised accuracy (Genie 73.8% to 81.4% with 8 runs, at up to 2.1x cost).

    Better qualityHigher costSlower

    Tier 3 · tuning · changes control flow · any agent · 36 sources, 33 measured

  3. iii.

    Audit a verifier-gated cascade against a gold sample the verifier never sees

    When a cheap model's outputs are accepted or escalated by a verifier, measure true error on a small gold-labeled sample outside the verifier: metrics measured through the verifier showed about 3% error while true error was 14-32%.

    Better qualityHigher cost

    Tier 4 · restructuring · changes control flow, model · any agent · 13 sources, 13 measured

See also

  1. 9.b.ii

    Triage false success with a cheap trained detector, not an LLM judge

    Train a lightweight text classifier (TF-IDF with logistic regression) on 50-100 labeled runs to flag likely false successes for review.

    Verification › Confirming completion

    Better qualityLower costFaster

    Tier 2 · reliability · changes control flow · judging agents · 6 sources, 6 measured

Before you go...

Build better agents, weekly

Our latest research, performance benchmarks, optimization strategies, and updates around AOT development.

One email a week, nothing else. Unsubscribe anytime.