Topic 2 of 6 · 4 min read
Open coding failure notes
Goal: Write specific, observable failure notes for a batch of traces instead of vague labels such as bad answer.
Open coding means writing a short, specific note about what went wrong in each trace before you decide on any categories. You let the data suggest the categories; you do not start from a checklist like "hallucination" or "toxicity".
Check yourself · 1 of 3
You are open coding 50 traces from a support bot. Which note is best for one failing trace?
Why it matters
Ready-made metrics such as "helpfulness" or "coherence" score everything about the same and tell you nothing about your product. A note like "quoted the Enterprise price to a Starter customer" is something you can count, fix and later test for. A label like "bad" is not.
Starting with fixed categories also hides surprises. If your checklist has five boxes, the sixth kind of failure gets squeezed into the nearest one.
How to do it
- Pick one owner for the judgment. One domain expert (the support lead, the clinician, the senior engineer) decides what counts as a failure. Several people voting produces mush. Others can help read, but one person's taste defines "good" for now.
- Sample real traces. Use production or realistic test traffic, not only inputs you invented.
- Write one note per trace, describing the first thing that went wrong, in plain words. Say what you saw, not what you think caused it.
- Mark pass or fail as a plain yes or no. Skip 1 to 5 scores; they hide disagreement.
- Keep going without grouping. Do not stop to build categories after five notes. Grouping comes next.
A good note is observable, specific and short enough for a spreadsheet cell.
Before and after
| Trace | Weak note | Better note |
|---|---|---|
| t-014 | Bad answer | Gave refund window as 30 days; policy says 14 |
| t-015 | Tone off | Used a joke while the user reported a lost payment |
| t-016 | Hallucination | Cited a feature (bulk export) that does not exist |
What goes wrong
- Writing causes instead of observations. "Prompt too weak" is a guess. "Ignored the instruction to ask for the order number" is a fact.
- Vague labels. "Bad", "incorrect" and "unhelpful" cannot be grouped or counted.
- A committee decides. With three raters and no owner, every trace becomes a debate.
- Labeling an easy sample. If you review only traces the model handled well, you will write few notes and learn little.
- Noting every flaw. Write the first and most important problem. A trace with six notes is hard to count.
Examples
Vague versus observable
A reviewer writes "wrong answer" for 40 traces. When grouped, nothing separates them. Rewritten notes such as "gave the wrong plan limit", "answered in English to a Spanish question" and "did not ask for the order id" split cleanly into three problems with three different fixes.
One owner
A travel-booking assistant is reviewed by an engineer, a PM and a travel agent. They disagree on whether offering a cheaper flight unasked is helpful. The team lets the travel agent decide, writes her rule down in one sentence, and the disagreement stops.
Key points
- Write a short free-text note per trace before choosing any categories.
- A good note says what you observed, in specific terms, and can be counted later.
- One domain expert owns the pass or fail judgment instead of a committee.
- Use a plain pass or fail, not a 1 to 5 score.
- Note the first and most important problem; do not list every flaw.
Common mistakes
- Using a ready-made category list before reading any traces.
- Writing "bad" or "wrong" with no detail.
- Recording a guess about the cause instead of what was seen.
- Letting several reviewers vote on each trace.
Check yourself · 2 of 3
Why start with free-text notes instead of a fixed list of failure categories?
Check yourself · 3 of 3
Three people review the same traces and disagree on whether a response is good. What does open coding practice recommend?
Practice items, not counted towards your mastery.
Start here
- LLM Evals: Everything You Need to Know (Hamel Husain and Shreya Shankar) (opens in a new tab)ArticleFree
Practical answers on reading traces, open coding, sample sizes and when to build an evaluator.
- A Field Guide to Rapidly Improving AI Products (Hamel Husain) (opens in a new tab)ArticleFree
Argues that looking at data and counting failure modes beats generic metrics, with worked examples.
- An LLM-as-Judge Won't Save The Product, Fixing Your Process Will (Eugene Yan) (opens in a new tab)ArticleFree
Shows why labeling real outputs and iterating on the process matters more than any judge prompt.
More for this topic
- Creating a LLM-as-a-Judge That Drives Business Results (Hamel Husain) (opens in a new tab)ArticleFree
A step-by-step case for one domain expert, binary verdicts and critiques before any automated judge.