Topic 4 of 6 · 4 min read
Ranking failure modes by impact
Goal: Rank a list of counted failure modes by impact and pick the right kind of fix for the top two.
Rank failure modes by how often they happen, how much harm they do and how cheap they are to fix, then pick the kind of fix that matches the cause. Do not start with the mode that is most interesting or most recent.
Check yourself · 1 of 3
Which three factors are used to rank failure modes?
Why it matters
You will never fix everything. A mode that hits 25 percent of traces and costs the user a minute matters more than one that hits 1 percent. But a rare mode that gives wrong medical or billing advice may outrank both. Ranking makes that trade-off explicit instead of leaving it to whoever speaks loudest.
How to rank
For each counted mode, write down three things:
- Frequency: how many traces in the sample, and how many real users that is likely to touch.
- Severity: what happens to the user or the business. Wrong legal or money information, a leaked private detail or a stuck workflow is severe. A slightly stiff tone is not.
- Fix cost: how much work, and how likely the fix is to hold.
Then pick the fix type that matches the cause:
- A prompt or instruction fix when the model had the right information and ignored or misread an instruction. Cheap, try it first.
- A retrieval, tool or data fix when the model was given wrong or missing context.
- An architecture change (a new step, a router, a validator, a human approval) when the failure is structural, such as one prompt trying to do too many jobs.
- An evaluator when the failure matters and could come back. Not every fix needs one; the next topics cover that.
Before and after
| Failure mode | Traces of 60 | Severity | Likely fix |
|---|---|---|---|
| Replies in English to non-English users | 11 | Medium | Prompt rule |
| Quotes the wrong plan price | 9 | High | Retrieval fix |
| Skips the required order-id question | 6 | Medium | Prompt rule, then check |
| Invents a feature | 4 | High | Grounding step |
Sorted only by count, the language mode goes first. With severity added, the price mode moves to the top, and its fix is retrieval, not a clever prompt.
What goes wrong
- Ranking by count alone. Rare but severe failures get ignored.
- Reaching for a prompt edit every time. If retrieval returns the wrong page, no wording will repair it.
- Building a complex pipeline first. Try the cheap fix, measure on the same sample, and only then add structure.
- Never rechecking. After a fix, rerun the same traces. Fixes often shift the failure rather than remove it.
Examples
Severity changes the order
A billing assistant fails to greet by name in 20 of 60 traces and quotes the wrong invoice total in 5. The greeting is more frequent, but wrong totals cost money and trust. The invoice mode goes first.
The wrong fix type
The team adds "always use the latest pricing" to the system prompt. Quotes stay wrong, because the retriever still returns a 2022 page. Opening the trace shows the cause was the index, so the right fix was to re-index and drop archived files.
Key points
- Rank each failure mode by frequency, severity and fix cost.
- Match the fix to the cause: prompt for ignored instructions, retrieval or tool fix for wrong context, architecture for structural problems.
- Count alone is not enough; a rare mode can be severe enough to go first.
- Try the cheapest likely fix first and recheck on the same traces.
- Not every failure mode needs a permanent evaluator.
Common mistakes
- Sorting only by how many traces each mode has.
- Choosing a fix before checking whether the model had the right context.
- Building an evaluator for every mode on the list.
- Not rerunning the same traces after a fix.
Check yourself · 2 of 3
The model had the right document in its context but ignored an instruction to ask for the order id. What fix type fits first?
Check yourself · 3 of 3
Mode one hits 12 of 60 traces with a minor tone problem. Mode two hits 3 of 60 and quotes wrong dosage figures in a health app. Which goes first?
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.