New Tool Radar

AI Agents & Automation

How to Add an Agent Self-Check Before Its Final Answer

Add a self-check step before an agent final answer so it verifies its own work against the task.

Schematic with three steps: Write the checklist the self-check will use; Make the agent run the check before; Test with the answer that was wrong.

An agent that answers the moment it has something plausible will sometimes answer with something wrong. A self-check is a deliberate pause before the final answer: the agent re-reads the task, re-reads what it did, and checks the two against each other. Anthropic’s evaluator-optimizer pattern is the same idea split across two calls, one generating and one checking, and a self-check is the single-agent version of it. The check needs a short checklist, not a vague instruction to be careful: every required item present, every number traced to a tool result, and nothing claimed that no tool returned.

What you need

  • A task with a checklist of what a correct answer must contain
  • An agent that already produces answers, with at least one wrong answer on record
  • A self-check instruction naming the checks, not just telling the agent to be careful

Step 1: Write the checklist the self-check will use

List the checks as yes-or-no questions: is every required item present, does every number trace to a tool result, is anything claimed that no tool returned. A checklist with vague items is not a check.

Step 2: Make the agent run the check before answering

Add a step before the final answer where the agent works through the checklist and fixes what fails. The answer is only sent after the checklist passes.

Step 3: Test with the answer that was wrong before

Run the task that produced the wrong answer and confirm the self-check catches the error before it reaches the user. If the same wrong answer gets through, the checklist is missing the check that would have caught it.

Worked example: synthetic self-check

The table below is a synthetic example. It shows the expected result of the self-check; no agent was run.

Check Before self-check After self-check
All required items present No Yes
Numbers trace to tool results No Yes
No unclaimed statements No Yes
Wrong answer sent to user Yes No

Expected result (UNTESTED). the self-check catches the missing item and the untraced number, and no wrong answer reaches the user. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • A self-check by the same model can share the first pass’s blind spots, so it catches slips, not deep errors.
  • The check adds a model call to every run, so keep the checklist short.
  • A checklist that passes everything is not a check; test it against a known wrong answer.
  • Self-checking cannot verify facts the tools never returned.

Sources

See all