Skip to content
Hammad Yousuf.
AI agent tracing · NOTE 13

Agent trace review: find the first wrong step

The final answer looks wrong. The first mistake may be three steps earlier.

Starter template · 4 October 2026
Hammad Yousuf
By Hammad YousufSoftware, AI & automation
INPUT → FIRST DIVERGENCE → TARGETED TEST
Trace review worksheet · Open access

What to inspect

Review the sequence of inputs, retrieval, tool selection, tool arguments, tool result and final synthesis. Locate the first divergence from expected behavior. Correcting the final wording does not address a bad record lookup earlier in the trace.

Worked example

A synthetic trace retrieves customer C-140 for a request about C-104. The tool succeeds and the final answer accurately summarizes the wrong customer. The earliest failing step is record selection, not final text generation.

Copy the full prompt

Adapt the inputs to your task. Remove private data before sending anything to a model. This page copies text locally; it does not run the prompt.

Full prompt · adapt the inputs
Review [REDACTED TRACE] against [EXPECTED WORKFLOW]. For each step record input, selected action, output and expected behavior. Identify the earliest observable divergence. Separate evidence from speculation. Propose one targeted regression test and identify any missing trace fields. Do not infer hidden reasoning or expose secrets from logs.

Review checklist

  1. Redact secrets and personal data before sharing traces.
  2. Preserve step and call identifiers.
  3. Find the earliest divergence.
  4. Test the cause instead of only rewriting the last answer.

Keep the resource

Download the complete note ↓Markdown · explanation, example, prompt and checklistDownload the prompt ↓Plain text · ready to adaptOpen the full-size visual ↓SVG · scalable reference diagram

Documentation & scope

OpenAI: evaluation best practices ↗

This is an original workflow template with an illustrative example. It does not report completed model tests or measured performance. Provider APIs can change; check the linked documentation for your exact integration.

Have a workflow to review?

Bring the task, inputs and the result you need. We can discuss the integration and the checks around it.

Discuss your workflow ↗