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
- Collect every fact the tools returned during the run.
- Extract the checkable claims from the final answer: numbers, dates, names, identifiers.
- Compare them. Any claim not supported by an observation is unverified.
- Block, flag, or re-ask depending on how expensive being wrong is.
- 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 when | Skip it when |
|---|---|
| Answers contain numbers, dates, or identifiers | The output is purely creative, where there is nothing to verify against |
| A wrong number has real consequences | The user can see the tool output themselves anyway |
| You are using a small or cheap model | You have a strong model and verification still costs a call you cannot afford |
| You need an honest reliability metric | You 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
| Tokens | Zero if the check is deterministic, which it should be. |
|---|---|
| Latency | Milliseconds. |
| Engineering | A 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
Related: Guardrails · Testing agents · Claim checking · all patterns · agent jobs
Free from AI School - no signup, everything runs in your browser.