Reading Traces for AI Debugging
The per-trace loop starts by reading individual sampled traces with their actual input and actual output, rather than the dashboard or aggregate numbers.
Two Teams, One Dashboard
Imagine two teams that ship the same AI assistant. Both watch a dashboard full of averages. Both see the numbers drift slightly downward in the third week after launch. The first team responds by tweaking settings and hoping the averages recover. The second team opens a handful of individual conversations, reads what the user actually typed and what the assistant actually answered, and discovers that one kind of request is being handled badly again and again. The second team has begun working through the per-trace loop. This article explains how that work is organized, and why it is the process that turns a fragile launch into a product people keep using.
What do you think happens?
Before reading on: which team is more likely to find the specific failure, and why?
Reveal answer
The second team, because it reads the exact exchanges where the failure lives
The source describes the second team as the one that opens individual conversations and reads the actual input and output. Averages on a dashboard compress many exchanges into one figure, which hides the specific words where a failure appears.
What a Sampled Trace Contains
A trace is the record of one exchange between a user and an AI product. A sampled trace is one of these records that you pick out of the stream of real activity, rather than one you invent. The per-trace loop begins by reading sampled traces, each with its actual input and its actual output.
The discipline asks for something that feels slow. You read the input the user supplied and the output the product produced, in their exact wording. Summary numbers compress many exchanges into one figure, and that compression removes the specific words where a failure lives. Reading the raw exchange keeps those words visible, so you can see what the user asked and what the product did with it.
The Per-Trace Loop as a Cycle
It helps to see the loop as a sequence in which each stage produces something the next stage uses. Reading sampled traces produces a hypothesis. The hypothesis is encoded as an eval case. The eval case is added to the standing eval suite. The suite is then used to grade a fix. The fix is not the end of the chain: its grade comes from the suite, which already holds everything the team has learned so far. The diagram shows the loop as a repeating cycle, so you can follow what each pass hands to the next.
Forming a Working Hypothesis
A single trace rarely tells you enough by itself. The loop asks you to read enough traces in sequence to form a working hypothesis about what is going wrong. The hypothesis is therefore a pattern you notice across several exchanges, not a conclusion drawn from one unusual reply. An odd answer in one exchange may be a one-off. The same kind of request handled badly in several separate exchanges is the signal the loop is looking for.
Turning three exchanges into one hypothesis
A team reads three sampled traces from an assistant. In each, the user asks for a refund status and receives a general answer about returns policy. What working hypothesis should the team form?
- 1Read each trace in exact wording
Note the user's words and the assistant's words for each exchange, without summarizing them yet.
- 2Look for what repeats
All three users ask about a refund status, and all three receive a returns-policy answer. The request type is the shared feature.
- 3Check that one trace is not the whole story
A single bad reply could be an unusual case. Three separate exchanges with the same failure make the pattern worth acting on.
- 4State the hypothesis as a pattern
The working hypothesis is that refund-status requests are being answered with general returns-policy text rather than a status answer.
The working hypothesis is a pattern across several exchanges: refund-status requests receive a returns-policy answer. It is not a conclusion about one reply.
Encoding a Hypothesis as an Eval Case
A hypothesis is useful only if it can be checked again later. The loop therefore encodes it as an eval case: a test built from the hypothesis that captures the kind of input that exposed the problem and the behavior a good answer should show. Writing the case is what converts an observation made while reading into something the team can run repeatedly.
Continuing the refund example, the eval case would capture a refund-status request as its input and describe the behavior a good answer should show, which is a status answer rather than a general policy answer. The case is built from the pattern, so it tests the same kind of request every time the suite runs.
The eval case then becomes part of the standing eval suite. The word standing matters. The suite is not rebuilt for each change; it accumulates. Each round of reading leaves behind a test, so the suite records everything the team has learned about where the product fails.
Grading a Fix Against the Suite
When a fix is proposed, it is graded against the suite. The fix must handle the new case and must also keep passing the cases the team wrote earlier. A fix that repairs the refund-status problem but breaks an earlier case does not pass the grade. The flowchart traces that path, including the two outcomes a proposed fix can reach.
Mistakes When Reading Traces
Common mistake Starting from the dashboard average instead of individual traces
What it looks likeA team sees a three-week drop in the average and begins adjusting settings without reading any conversation.
Why it failsSummary numbers compress many exchanges into one figure, which removes the specific words where a failure lives.
Do this insteadPick sampled traces and read the exact input and output before deciding what is wrong.
Common mistake Forming a hypothesis from one unusual reply
What it looks likeOne assistant answer is strange, so the team concludes the whole assistant is broken.
Why it failsA single trace rarely tells you enough. The hypothesis is a pattern across several exchanges.
Do this insteadRead several traces in sequence and act only on a pattern that repeats.
Common mistake Keeping a hypothesis as a note instead of an eval case
Why it failsA note cannot be run again. The hypothesis is useful only if it can be checked later.
Do this insteadEncode the hypothesis as an eval case and add it to the standing suite.
Common mistake Grading a fix only on the new case
What it looks likeA fix repairs the refund-status request but breaks an earlier case, and it is accepted anyway.
Why it failsThe fix must also keep passing the cases the team wrote earlier.
Do this insteadGrade every proposed fix against the whole standing suite.
Week-Over-Week Improvement
The source describes the loop's shape as unglamorous, and it is also what produces the week-over-week improvement curves that separate a deployment customers keep using from one they quietly turn off about six weeks after launch. Those curves are not a single event. Each cycle of reading traces, forming a hypothesis, encoding it, and grading a fix adds to what the team knows and what the suite checks, so improvement accumulates over time.
Because every cycle leaves an eval case behind, the suite grows alongside the product. Later fixes are graded against everything already learned. That is why the loop is best understood as the mechanism behind sustained improvement rather than as a one-off review. Repeating the loop is the work that keeps the curve rising.
Practice Reading a Trace
A team has sampled four traces. In three of them, a user asks to cancel a subscription and the assistant replies with a list of plan prices. In the fourth, a user asks a general question about shipping and gets a clear answer. Using the per-trace loop, what working hypothesis should the team form, and what eval case would they encode from it?
Hints
- Ask which features repeat across the three similar exchanges and which exchange is the outlier.
- The eval case should capture the kind of input that exposed the problem and the behavior a good answer should show.
Summary of the Loop
- 1The per-trace loop starts by reading sampled traces with their actual input and actual output, because summary numbers hide the specific words where a failure lives.
- 2A working hypothesis is a pattern noticed across several traces read in sequence, not a conclusion from one reply.
- 3The hypothesis is encoded as an eval case, which joins the standing eval suite and accumulates over time.
- 4A proposed fix is graded against the whole suite, so it must handle the new case and keep passing earlier cases.
- 5Repeating the loop produces week-over-week improvement, which is what keeps customers using a product after launch.
At a glance
- The per-trace loop starts by reading individual sampled traces with their actual input and output, not the dashboard averages.
- A working hypothesis is a pattern across several traces read in sequence.
- The hypothesis becomes an eval case that joins the standing eval suite.
- A proposed fix is graded against the whole suite, including earlier cases.
- Repeating the loop produces week-over-week improvement that keeps customers using a product after launch.