Verification

The most common agent failure is not a wrong tool call, it is a correct tool call followed by an answer that ignores it. Verification is the cheap deterministic step that catches exactly that, and almost nobody builds it.

How it works

  1. Collect every fact the tools returned during the run.
  2. Extract the checkable claims from the final answer: numbers, dates, names, identifiers.
  3. Compare them. Any claim not supported by an observation is unverified.
  4. Block, flag, or re-ask depending on how expensive being wrong is.
  5. Log the mismatch rate, because it is the single best health metric for an agent.

Optional: load a real model

See it work

When it pays, and when it does not

Use it whenSkip it when
Answers contain numbers, dates, or identifiersThe output is purely creative, where there is nothing to verify against
A wrong number has real consequencesThe user can see the tool output themselves anyway
You are using a small or cheap modelYou have a strong model and verification still costs a call you cannot afford
You need an honest reliability metricYou already verify downstream in a system that will reject bad values

How it fails

Verifying only numbers

Names, identifiers, and dates are just as wrong and just as checkable.

Silent repair

Quietly fixing the answer hides the failure rate, and the failure rate is the number you need to see.

Verification by model

Asking a model whether its answer is supported produces yes. Compare strings and values in code.

What it costs

TokensZero if the check is deterministic, which it should be.
LatencyMilliseconds.
EngineeringA few hours, and it is the highest return work in most agent projects.
This is the cheapest thing in this entire track and it catches the most embarrassing failures. If you build one thing from the Agent Lab, build this.

Related: Guardrails · Testing agents · Claim checking · all patterns · agent jobs

Free from AI School - no signup, everything runs in your browser.