How to do error analysis on LLM traces: open coding, the stopping rule, what it costs, and what we found reading 1,000 real conversations.
Error analysis means reading real conversations from your AI product, noting the first thing that went wrong in each, and grouping those notes into failure categories before you write a single automated test. Practitioners recommend reading at least 100 traces and continuing until new categories stop appearing. The output is a ranked list of how your product actually fails, which tells you what to fix, what to test, and what to ignore.
Most teams agree with this in principle and never do it, because it takes days of careful reading by someone who knows the product. This guide shows the method step by step, with the coding sheet, the stopping rule, and a cost estimate you can take to your team. It also reports what happened when Akmon's reviewers ran the method on 1,000 real conversations.
Because the failures you imagine are rarely the ones your users hit. Teams that start with generic metrics (helpfulness, faithfulness, toxicity) end up measuring things that look fine while users quietly churn over something nobody wrote a test for.
Hamel Husain and Shreya Shankar, whose course and talks have become the reference for this practice, put the goal plainly: improve the product, not run evals perfectly. Their advice, summarized:
The initial rounds take several days. After that, upkeep is about 30 minutes a week.
Read each trace, write a short free-text note about the first thing that went wrong, and don't try to fit it into categories yet. Categories come later, from the notes.
A coding sheet needs only a few columns:
Rules that keep the notes useful:
When a batch of traces produces no new failure categories. That point is called theoretical saturation, a term borrowed from qualitative research. In practice:
Plotting new categories per batch gives you a saturation curve. It falls steeply at first and then flattens. The flat part tells you you've seen the failure modes that occur often enough to matter. Rare failures can still exist past this point, which is why production monitoring continues afterward.
Mostly reading time, and the reader has to know the product. This estimates the first round:
For 300 traces at 3 minutes each, plus 30% for categorizing and discussion, that's about 20 hours of reading, roughly two and a half working days for one person. If that person is a senior engineer at a loaded $95 an hour, the first round costs about $1,850 in time, plus whatever else that engineer didn't ship that week.
Long agent traces take longer. A 40-step tool-using run can take 10 minutes or more to read properly, which is why teams with complex agents rarely get past the first 50.
Rank them by frequency times cost, then fix in order. A rough triage:
Then write automated checks only for the categories in the last two rows. Each check should be a binary pass or fail on one failure mode, and each one needs its own small labeled set to align it with people. Our guide to calibrating an LLM judge covers how big that set should be and how to read the agreement numbers.
Not well, and not first. Asked to review traces on its own, an LLM tends to declare most of them fine, because it doesn't know what your product is supposed to do. It can help in the second pass: once people have written the category list, an LLM can sort new traces into existing categories, with a person checking a sample.
The judgment that makes error analysis valuable is knowing what a good answer looks like for your users. That has to come from someone who knows your product, or someone you've trained to know it.
Akmon's reviewers do error analysis as a service, on your traces, in your tools:
We'll run your first error analysis in a week, on your real traces. Book a call.
What is error analysis for LLM applications? Reading real traces of your AI product, noting the first error in each, and grouping the notes into failure categories ranked by frequency. It comes before writing automated evals.
How many traces should I review? At least 100, and keep going until two batches of 50 in a row produce no new failure categories. For most products that's 200 to 400 traces.
What is open coding? Writing a short free-text note about what went wrong in each trace without forcing it into predefined categories. Categories are built afterwards from the notes.
What is theoretical saturation? The point at which reading more traces stops revealing new failure categories. It's the stopping rule for error analysis.
How long does error analysis take? The first round usually takes two to four days of reading for one person who knows the product. Maintaining it takes about 30 minutes a week.
Tell us what you are working on. We start within hours of kickoff.