Module 3 · Evaluation/Lesson 28 of 33

Error Analysis

Overall F1 0.81 — but 0.62 on noisy transcripts. Slicing and root-cause analysis turn metrics into a plan.

Advanced 35 minPipeline: Evaluation
Mastery—
Quiz
—
Exercises
—
Challenge
—

Why this matters

An aggregate metric is an average over very different situations. Clean English inbound calls and very noisy Romanized-Hindi outbound calls can differ by 30 points of F1 — and the aggregate hides which one you're failing.

slices performance by metadata (agent, call type, language, quality, duration, segment, model, prompt version), reads failures, forms hypotheses and tests them. The discipline is separating a *symptom* ("Agent B's calls fail") from a *root cause* ("Agent B takes noisier calls").

Core concept

Technical explanation + simple intuition + example

Slicing

Compute the metric separately for each group: per agent, per language, per transcript quality… The slices that are much worse than average — and big enough to matter — are where to look.

Root cause vs confounders

Agent B looks bad. But if Agent B mostly handles noisy outbound calls, the real problem may be audio quality, not the agent. Cross the two dimensions: if within each quality tier all agents score the same, quality is the cause and "agent" was a confounder.

The 10 questions

Every important concept should answer all of these

1What is it?

Systematically finding where and why a system fails by slicing metrics, reading errors and testing hypotheses.

2Why does it exist?

Aggregates hide failures; engineering effort needs a target.

3What problem does it solve?

It converts 'the model is 81%' into 'fix X for slice Y, worth Z points of business impact'.

4How does it work internally?

Slice by metadata, rank by gap × volume, cross-tab to control confounders, read and categorize failures, test fixes on the slice.

5What does it look like on real transcript data?

Transcript quality, language mix, agent, call type and duration are strong drivers; they're correlated with each other.

6What can go wrong?

Blaming confounded proxies (agents), chasing tiny slices, multiple-comparison false alarms, fixing symptoms not causes.

7How do I evaluate it?

Per-slice metrics with CIs; before/after comparisons on the target slice with paired tests.

8When should I use it?

After every evaluation round, and whenever aggregate metrics move.

9When should I NOT use it?

Don't over-interpret slices with a handful of examples.

10How does it affect downstream systems?

Drives the roadmap: ASR work, prompt changes, routing rules, human-review targeting.

Interactive lab: Error-analysis dashboard

900 labelled predictions with rich metadata. Filter, slice by any dimension (with bootstrap CIs), cross-tabulate two dimensions, and answer the root-cause question about Agent B.

SIMULATED MODELLIVE COMPUTATION
Loading lab…

Slice report with pandas

Real Python, running in your browser (Pyodide)

pythonLIVE COMPUTATION
Open the full Python playground

Try it yourself

Conceptual (A), applied (B) and engineering (C) exercises

Q1Type B · AppliedIntermediate
Agent B's F1 is 0.70 vs 0.86 for Agent A. Within clean calls both score ~0.88; within noisy calls both score ~0.73. Agent B handles 70% noisy calls. Root cause?
Q2Type B · AppliedIntermediate
Slice X: 45% of traffic, F1 0.70. Slice Y: 3% of traffic, F1 0.40. Overall F1 target 0.85. Using impact ≈ share × (0.85 − F1), what is slice X's impact score? (3 decimals)
Q3Type C · EngineeringAdvanced
F1 on Romanized-Hindi calls dropped 6 points after a model upgrade while overall rose. Describe your investigation and fix-validation plan.

Graded by a transparent keyword rubric (not an LLM) — it checks for the key ideas, then shows a model answer for self-assessment.

Q4Type A · ConceptualIntermediate
Why can overall F1 improve while an important customer segment gets worse?

Real-world application

After a model upgrade, overall F1 rose 2 points and the team celebrated. Slicing showed F1 on Romanized-Hindi calls had *dropped* 6 points while English rose 4 — a real regression for 20% of customers, hidden by the mix. They shipped only after adding Romanized-Hindi few-shot examples and verifying the slice recovered.

Common mistakes

Reporting only aggregate metrics

Slices can regress while the aggregate improves.

Fix: Standard slice report with every evaluation.

Blaming the most visible dimension

Correlated dimensions confound each other.

Fix: Cross-tabulate or model adjusted effects.

Acting on tiny slices

Noise.

Fix: Show n and CIs; confirm on fresh data.

Not reading examples

Numbers say where, not why.

Fix: Read and categorize 20–50 failures per suspect slice.

Engineering decision

Which slice should you work on first?

Use it when
  • Large gap × large traffic share × fixable cause
  • Slices tied to business risk (compliance, high-value customers)
Avoid it when
  • Tiny slices with wide CIs
  • Proxies that are confounded by another dimension
Trade-offs
Fixing the worst slice vs Fixing the biggest slice
Impact = gap × volume; a moderate gap on 45% of traffic can beat a huge gap on 2%.

Quiz

Pass mark 60%. Missed questions go to your mistake log and spaced review.

0/5 answered
Q1Beginner
A 'slice' is…
Q2Intermediate
Overall F1 improves after an update, but one slice regresses. What happened?
Q3Intermediate
A confounder is…
Q4Intermediate
A slice with n = 12 shows F1 0.40. Best reaction?
Q5Advanced
Which techniques help separate root causes from confounded proxies? (Select all)
Select all that apply.

Advanced challenge

Type C · EngineeringExpert
You check 40 slices and find 3 whose F1 is 'significantly' lower at p < 0.05. What's the main caution?
Key terms in this lesson