Topic 3 of 6 · 4 min read
Grouping notes into failure modes
Goal: Group a set of failure notes into a taxonomy of distinct, countable failure modes and count each one.
Once you have open notes, group them into a small set of named failure modes and count how many traces fall into each. The count is what turns a pile of complaints into a plan.
Check yourself · 1 of 3
You ask an LLM to cluster 40 failure notes. What should you do with its output?
Why it matters
Fifty notes are noise. Six named failure modes with counts tell you that, say, 18 traces ignore the user's language and 4 invent product features. Without grouping you fix whatever you read last.
How to do it
- Read all the notes once. Look for notes that describe the same underlying problem in different words.
- Draft groups. You can paste the notes into an LLM (Claude, ChatGPT or Gemini) and ask it to propose groups. Treat the answer as a first draft only. It tends to produce vague, overlapping or too many groups.
- Check each group by hand. Open a few traces per group. Does every one really show that failure? Move, split or merge until they do.
- Name each mode so it describes behaviour: "answers in the wrong language", not "language issues". A good name tells a stranger what they would see in the trace.
- Assign each trace one primary mode and count. A catch-all "other" is fine while small; if it grows beyond the biggest group, your groups are wrong.
- Aim for a handful. Roughly 4 to 10 modes is workable. Dozens means you have not grouped yet.
Before and after
An LLM proposes these groups from 30 notes:
| Group | Problem |
|---|---|
| Accuracy issues | Covers wrong prices, invented features and outdated policy |
| Communication issues | Covers tone, language and format |
Both groups mix different fixes. Reading the traces gives a better taxonomy:
| Failure mode | Traces |
|---|---|
| Quotes price for the wrong plan | 9 |
| Invents a feature that does not exist | 4 |
| Replies in English to a non-English user | 8 |
| Skips the required order-id question | 6 |
| Other | 3 |
Each row has one cause and one likely fix.
What goes wrong
- Accepting the LLM's groups unread. The model groups by surface wording and will happily merge unlike problems.
- Groups named after causes you have not confirmed, such as "bad retrieval", when you have only seen a wrong answer.
- Overlapping groups. If one trace fits two modes, split the modes or pick the first failing step.
- Never counting. Without counts you cannot tell the common problem from the dramatic one.
Examples
Splitting a mixed group
An LLM puts "wrong refund window" and "invented a coupon code" under "hallucination", 14 traces in all. Opening them shows 10 quote an outdated policy (a retrieval fix) and 4 invent codes (a prompt and guardrail fix). Two modes, two fixes.
Count check
A review of 60 failing traces gives modes with counts 22, 15, 9, 6 and 8 for "other". The counts sum to 60, so every trace has exactly one mode.
Key points
- Group open notes into a small set of named failure modes, then count traces per mode.
- An LLM can propose groups, but you must check each group against real traces.
- Name modes by observable behaviour, not by assumed cause.
- Assign each trace one primary mode so counts add up.
- A large "other" group means the taxonomy needs another pass.
Common mistakes
- Accepting an LLM's clusters without opening the traces in them.
- Naming modes after guessed causes rather than visible behaviour.
- Letting one trace count in several modes so totals exceed the sample.
- Stopping at a list of notes without counting.
Check yourself · 2 of 3
Which failure mode name is best?
Check yourself · 3 of 3
After grouping 50 failing traces, the "other" group holds 20 and the largest named mode holds 12. What does this suggest?
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.