FDE Times dataFDE jobs open 921▲5 Change in open roles over 7 days, like-for-like: roles from companies we started tracking this week are left outNew in 7 days 86Companies hiring 201Remote-friendly 24%Median US pay $200kTop hirer Databricks 106
中文VI

The newspaper of the Forward Deployed Engineer

Guides

A 92% eval score can hide a customer group failing 40% of the time

Slice the eval set before you report on it, and give each slice its own threshold that can block a release.

ShareLinkedInFacebookX

In brief

  • An average compresses every interaction into one score, and the errors hide in exactly what gets compressed.
  • The majority group pulls the overall score up, masking a small group that is failing badly.
  • Report by slice, give every slice enough cases, and block the release when any slice falls below its threshold.
Slope chart showing the accuracy of version A and version B on an invoice eval. PDF accuracy falls from 97.6% to 96% and photo accuracy from 60% to 56%, yet the overall score rises from 92% to 94% because the new eval set contains fewer photos.
Version B posts a higher overall score but is worse than version A on both slices, a classic reversal of Simpson's paradox. Source: hypothetical example in the article (eval of 1,000 invoices).

In 2018 the Gender Shades study tested commercial gender classification systems and found a gap that the overall scores did not reveal. For darker-skinned women, error rates reached 34.7%. For lighter-skinned men, the highest error rate was just 0.8%.

Both figures are the highest error rates measured for each group across the systems tested. Anyone looking only at average accuracy would have seen a good product, while the group that suffered the most errors never appeared in the report.

As an FDE you will meet the same situation at clients, only at a different scale. You run the eval, get 92%, put it on a slide, the client nods and approves the deployment. Three weeks later, one of the client’s departments complains that the agent keeps getting things wrong.

They are not lying, and your slide is not wrong either. A single overall number simply cannot answer the question that department actually cares about: does the agent work for their job?

Why does the average lie?

An overall score is a weighted average: whichever group has the most cases decides the number. Atlan puts its finger on the weakness when it writes that aggregate metrics compress millions of interactions into a single number, and the errors hide in what gets compressed.

When one group makes up most of the eval set, its good results swamp even severe degradation in the smaller groups. This is simple arithmetic of the average.

Educative’s course on slice-based evaluation illustrates the point with Airbnb: most eval traffic came from North America and Europe, so the overall score masked a problem elsewhere.

Researchers call these important subgroups slices. A 2019 paper on slice-based learning noted that a model can score well on a raw aggregate metric and still perform poorly on critical slices.

Weighting can mislead in a nastier way too. Under Simpson’s paradox, a trend that is clear within every subgroup can reverse when the groups are combined, and if you only look at the total you have no way of seeing the reversal.

A 1,000-case eval set, taken apart slice by slice

Take a hypothetical example. You deploy an agent that extracts invoice data for a client’s accounting department. The eval set has 1,000 invoices: 850 are PDFs exported from accounting software and 150 are phone photos from small suppliers. The agent extracts 920 invoices correctly, or 92%.

Slice Cases Correct Accuracy Error rate Contribution to overall score
PDFs exported from software 850 830 97.6% 2.4% 83 points
Phone photos 150 90 60% 40% 9 points
Total 1,000 920 92% 8% 92 points

The table changes the story entirely. The agent is nearly perfect on PDFs and wrong 40% of the time on photos. The last column explains why nobody noticed: the photo slice contributes only 9 of the 92 points, so however badly it fails, it moves the overall score by only a few points.

If the accounting team that handles small suppliers mostly receives photos, this agent is a broken tool for them. Here is code you can run right away on an eval results file:

import pandas as pd

# each row is one eval case: case_id, correct (0/1), doc_type, language, segment
df = pd.read_csv("eval_results.csv")

MIN_N = 50      # below this, a slice is too thin to draw conclusions
GATE = 0.85     # minimum threshold for each slice

rows = []
for col in ["doc_type", "language", "segment"]:
    g = df.groupby(col)["correct"].agg(n="count", acc="mean").reset_index()
    for _, r in g.iterrows():
        rows.append({"dimension": col, "slice": r[col], "n": r.n, "acc": round(r.acc, 3)})

report = pd.DataFrame(rows)
report["status"] = report.apply(
    lambda r: "too_thin" if r.n < MIN_N else ("FAIL" if r.acc < GATE else "pass"), axis=1
)
print(report.sort_values("acc"))

release_ok = not (report["status"] == "FAIL").any()

The two constants, MIN_N and GATE, are choices for you and the client to make; there is no standard value. What matters is that they are written into code instead of being eyeballed by someone on a slide.

Which slices are worth cutting?

Slicing by the metadata columns you already have is only the first step. Atlan warns that the costliest failures often sit in groups nobody defined in advance. If you only slice along the lines you already suspect, you will only rediscover what you already knew.

So good slices usually come from error analysis. Hamel Husain regards error analysis as the most important activity in evals, because it exposes the failure modes specific to your client’s data. The method is entirely manual: read each failed case and write down in plain words what went wrong.

After a few dozen cases, labels such as “two-page invoice”, “amount with European-style decimal comma” or “skewed photo” start to repeat, and every recurring label is a candidate slice.

When there is too much data to read it all, Hamel’s FAQ suggests more efficient ways to sample: clustering, sorting by user feedback, or prioritizing samples with a high probability of failure.

At a client, user feedback is usually the cheapest source. A support channel full of tickets from the same department is already a hint at a slice.

The steps at a client

Educative’s course defines slice-based evaluation in two parts: compute metrics separately for each slice, and gate releases on per-slice thresholds. At a client, those two parts become four steps:

  1. Attach metadata to every eval case from the moment you build the dataset: document source, language, customer segment, channel. Adding columns after you already have results always costs far more effort.
  2. Run error analysis on the failed cases to find slices not yet in the metadata, then tag those labels back into the eval set.
  3. Compute metrics independently for each slice and set a separate threshold for each slice as a release gate, like the two constants in the code above.
  4. Report to the client with a per-slice table, with the overall number on the bottom row rather than in the headline.

The last step is more about client skills than technique. When you ask “which group in your company cannot accept the agent getting things wrong?”, the answer is the list of slices that need the highest thresholds. It is also a very good customer discovery question.

Common mistakes

The first mistake is slicing too thin. Atlan gives the example of a 61% success rate computed on 19 cases, which tells you almost nothing. When a slice falls below the case-count threshold, label it “insufficient data” and add cases; neither raise the alarm nor celebrate.

The second mistake is comparing two versions on the overall score alone. Continuing the invoice example: you change the prompt, producing version B, and run it on a new eval set drawn from the following month’s data, with 950 PDFs and 50 photos. B extracts 912 PDFs and 28 photos correctly, 940 out of 1,000 in total, or 94%, higher than the old version’s 92%.

Broken down by slice, though, B is worse on both: PDFs drop from 97.6% to 96%, and photos drop from 60% to 56%. The overall score rose only because the new eval set contains fewer photos, the kind of reversal Simpson’s paradox describes. If the composition of the eval set changes between two runs, compare only within the same slice.

The third mistake is letting the slice list stand still. Client data changes, new suppliers appear, new channels open. Repeat error analysis after every deployment so the slice list keeps up with the real data.

How does this skill go on a CV?

On a CV, “achieved 92% accuracy” is the easiest line to write and the one that says the least. Try something like “found a slice failing 40% hidden behind a 92% overall score, and set per-slice thresholds as a release gate.” A line like that shows the reader you use evals to make deployment decisions.

In an interview, when asked how you measure an agent, tell it in order: which slices, how many cases per slice, which thresholds, and who at the client chose those thresholds. This week’s exercise: reopen the last eval report you sent out and ask yourself which group of users your 92% is hiding.

Was this article useful?

Use with your AI assistantAsk Claude ↗Ask ChatGPT ↗
6 sources
Read next on the roadmap · Stage 6: MeasurementA few hours of widget code gets 50 traces judged in an afternoonClient experts know which answers are wrong but lack a quick way to say so; anywidget syncs their notes to Python with no server or database.