New Tool Radar

AI Agents & Automation

How to Evaluate an Agent Against Golden Traces of Known Good Runs

Evaluate an agent against golden traces of known good runs, so regressions show up fast.

Schematic with three steps: Save the golden traces with their inputs; Re-run the same inputs after every change; Investigate every divergence before shipping.

A golden trace is a recording of a run that went right: the input, the steps, the tool calls, and the final answer, saved as the standard to beat. When you change the agent, you run the same inputs again and compare the new traces with the golden ones. Any step that diverges is a regression to look at, before users find it. LangSmith’s evaluation guidance says the same thing in general terms: add real traces to a dataset so a failure you saw once becomes a test you run every time. Keep the golden set small and current: ten to twenty runs that cover the tasks that matter most.

What you need

  • Five to twenty saved traces of runs that went right, with their inputs
  • A way to run the same inputs again and compare the new traces with the golden ones
  • A rule for what counts as a divergence: a different tool, a different answer, or a missing step

Step 1: Save the golden traces with their inputs

Pick the runs that went right on the tasks that matter most, and save each trace with the exact input that produced it. A trace without its input cannot be re-run.

Step 2: Re-run the same inputs after every change

After each change to the agent, run the golden inputs again and compare the new traces with the golden ones step by step. A change with no golden run is a change with no check.

Step 3: Investigate every divergence before shipping

For each step that diverges, decide whether the new behaviour is better or a regression. Ship only when every divergence is explained, not when the count looks small.

Worked example: synthetic golden trace check

The table below is a synthetic example. It shows the expected result of golden trace evaluation; no agent was run.

Golden run New trace matches? Action
Refund question Yes Ship
Order status Yes Ship
Price comparison No – better answer Reviewed, ship
All divergences explained Yes Pass

Expected result (UNTESTED). two traces match, the one divergence is a better answer that is reviewed, and the change ships with every divergence explained. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • Golden traces go stale as the product changes, so refresh them when the right answer changes.
  • A trace comparison catches different behaviour, not wrong behaviour: a trace can match and still be wrong.
  • Too many golden traces make the check slow, so keep the set to the tasks that matter most.
  • A golden set that never changes hides regressions in the tasks it does not cover.

Sources

See all