0
Add a self-verification step so an agent catches its own errors before answering
Design a self-verification step for an agent doing agent_task, inserted between generating a draft answer and returning it to the user. This is not the same as a generic 'double check your work', it needs a concrete verification procedure specific to this task's likely error types. Requirements:
1. Identify the 2-3 most likely error types for this specific task (e.g. for a data-lookup agent: citing a value not actually present in the retrieved data, for a math-heavy agent: an arithmetic slip, for a code-generation agent: a syntax or import the target language doesn't actually support).
2. For each error type, define a concrete verification check the agent performs on its own draft before finalizing: re-deriving a number independently and comparing, checking every claim against its cited source, or running/parsing generated code if a tool is available.
3. Define what happens when verification finds a discrepancy: the agent must revise and re-verify once, not loop indefinitely, and if the second attempt also fails verification, it should report the answer as unverified/uncertain rather than presenting it with full confidence.
4. Make clear the verification step must actually be a distinct, separate check, not just the model re-reading its own answer and asserting it's correct, since that doesn't catch systematic errors the model is prone to in the first place.
5. State the added latency/cost tradeoff honestly and when it's NOT worth adding this step (low-stakes, easily-corrected-by-user answers).
Agent task: agent_task
Most common error types observed so far: observed_errors