AI Interviews · Question

Build eval sets for a support agent and a regression process for prompt or model swaps, tracking containment and escalation rates.

ML / LLM system design question reported at Sierra (2026). Sources, confidence and an answer card.

Researched · updated

eng-036 AI Engineer Evaluation ML / LLM system design Low confidence
On this page

What they’re really asking

If you only remember one thing, say this in the first minute: “I’d build three test suites from real conversations: a regression suite of cases that must keep working, a capability suite of hard cases, and an escalation suite of conversations that must or must not go to a person. For a prompt or model swap, I run the old and new versions on the same items, three times each, and ship only if every must-pass item passes and the new version is no worse beyond an agreed margin. I’d say up front that a 500-item suite catches a 5-point regression, not a 2-point one. In production I’d watch containment together with correct escalations, recontacts and harm signals, because containment alone rewards a bot that never hands off.”

The rest of this page explains each part of that answer.

The interviewer is asking two things. Can you stop a prompt or model swap from silently breaking cases that used to work? And can you measure a support agent in production without being fooled by one metric?

What makes this different from a normal regression test

In normal code, a regression test is exact: the same input gives the same output, and a changed output is a failure. A support agent built on a large language model (LLM) breaks that in three ways:

  1. Its answers are random. Run the same conversation twice and you can get two different replies. So each test case is run several times; each run is called a trial.
  2. Many replies are correct. You need graders that judge meaning, not exact text.
  3. A swap changes everything at once. A new model or a one-line prompt edit can improve the average while breaking a few cases that matter, such as refunds. Nothing crashes.

The techinterview.org Sierra guide lists regression suites for swaps and “live signals like containment and escalation rate”, and says the hard part is “measuring quality when there is no single correct answer” (techinterview.orgsecondary). That is a prep guide’s summary, not a candidate report.

Words you need first

  • Item: one test case: a real conversation, its recorded tool responses, and checks for a good outcome.
  • Must-pass item: a test that blocks the release if it fails at all, such as a past refund incident.
  • Baseline and candidate: the version in production now, and the proposed new one.
  • Containment: the share of conversations solved without handing off to a person.
  • Escalation: handing the conversation to a person. A correct escalation is one the escalation policy says should happen.

Clarify first

  • How many changes a week, and who makes them? “Let’s assume about 20 prompt or setting changes a week.”
  • Volume? “Let’s assume 40,000 conversations a day.”
  • Which actions can’t be undone? Refunds and account changes. “Those get must-pass items.”
  • What is a correct escalation? “Can I see the escalation policy? It becomes a check.”
  • Is the model pinned? “Is it a fixed model version, or a name the provider can update under us?”

Answer

Three suites, built from real conversations

Every item is a real conversation with its tool responses recorded and frozen, so a rerun sees the same order data and the same refund limits. That way you measure the change, not a moving environment.

  • Regression suite: must-pass items from every past incident, plus the core flows. It should sit near 100%.
  • Capability suite: hard cases that the agent doesn’t yet handle well. It measures improvement.
  • Escalation suite: conversations that must be handed off, and ones that must not.

Grade with code first: was the right tool called, with the right arguments, and is the refund within policy? Then use one pass/fail LLM judge (a second model call that grades the reply against one written rule) per open-ended failure mode, checked against human labels before you trust it.

The regression process for a swap

Say you want to swap the agent’s model for a newer one. Follow it through:

StepWhat happensWhat to say in the interview
1. Run bothBaseline and candidate run on the same 500 items, 3 trials each.”Same items under both, so I compare like with like.”
2. Average per itemEach item’s 3 trials become one score for that item.”Trials of one item aren’t independent tests, so I average them first.”
3. Must-pass checkEvery must-pass item passes under the candidate.”One refund regression blocks the swap, whatever the average does.”
4. Paired differenceCompare the two versions item by item and compute the difference with its error bar.”Only the items that flip carry signal.”
5. GateShip only if the low end of the difference is above the agreed margin.”The new model can be a bit worse only within the margin we agreed in advance.”
6. Say the limitThis suite catches 5-point regressions.”A 2-point regression would usually slip through. I say that before anyone asks.”

The comparison in step 4 is a paired comparison: both versions run on the same items, and you look at the items whose result flips between versions. Most items pass or fail under both, and they tell you nothing about the change. Comparing only flips removes most of the noise.

How small a regression can the suite see? The chance of catching a real regression is called power, and 80% is the usual target. With 500 items where 20% flip, the smallest regression it catches 80% of the time is about 5 points. The llm-eval lab measured 5.0 / 7.3 pp (measured on Apple M1 Ultra, 64 GB RAM, Python 3.13.7, numpy 2.5.4 (CPU, single thread), 2026-10-11 · llm-eval lab) by simulation, for versions that disagree on 20% or 40% of items. So say plainly that a 500-item suite catches 5-point regressions, not 2-point ones.

The arithmetic behind the numbers (for a Staff-level follow-up)
Smallest regression a paired suite can reliably catch (one-sided, 80% power)
gap ≈ 2.49 × √(d ÷ n)
d
share of items whose outcome flips between versions
n
items in the suite
Worked example

d = 0.2, n = 500: 2.49 × √0.0004 = 5.0 points; the llm-eval lab's simulation agrees

  • Canary size: catching a 3-point drop in a 60% containment rate with 80% power needs about 4,180 conversations per group: 2 × 0.6 × 0.4 × 2.8² ÷ 0.03² ≈ 4,180. A 5% canary at 40,000 a day sees 2,000 a day (about 2 days); a 1% step sees 400 a day (about 10 days).

Online: a canary and a set of metrics

After the gate, a canary sends a small share of users to the candidate behind a feature flag. Bucket by user, so one conversation never switches versions.

Report containment together with three other numbers, because containment alone rises when the bot simply stops escalating:

  • correct-escalation rate, from a sampled human review;
  • recontact within 7 days (an assumed window): customers who came back because the problem wasn’t really solved;
  • harm signals: policy violations, refunds promised outside policy, invented policies.

At 40,000 conversations a day, a 5% canary needs about 2 days to see a 3-point containment drop. A 1% step needs about 10 days. So a 1% step catches crashes and policy failures, and the 5% step does the measuring.

Say: “Containment only counts if correct escalations and recontacts hold steady at the same time.”

Senior vs Staff

Swaps and support metrics

Senior

  • Paired regression suites with must-pass items, a CI gate, and containment reported with escalation quality.

Staff

  • States the suite's detectable regression, pins model versions and re-runs on a schedule, and sizes canary steps from power.

Small-team version

Build the suite and the CI job yourself. Self-host or buy tracing: self-hosted Langfuse or a hosted tool. An agent run costs more than a single-model-call feature, because each conversation makes several model calls. A token is a chunk of text, roughly ¾ of a word, and providers bill per token.

  • One candidate run of a 200-item, 3-trial suite costs about $31, or about $62 with the baseline.
  • Twenty changes a week is about $1,250 a week, so run the judged tier before merge, not on every commit.
  • The scarce resource is labelled escalation decisions. Get a support lead to label 100.
The arithmetic behind the numbers (for a Staff-level follow-up)

Assume 200 items × 3 trials = 600 runs, each about 18,000 input and 1,200 output tokens on Claude Sonnet 5 ($2 / $10 per million, list prices fetched 2026-10-11), plus two Claude Haiku 4.5 judges ($1 / $5) of about 2,000 input tokens each. All token counts are assumptions.

  • Agent runs: 600 × (18,000 × $2 + 1,200 × $10) ÷ 10⁶ = $28.80.
  • Judges: 1,200 × 2,000 × $1 ÷ 10⁶ ≈ $2.40.
  • About $31 per candidate run and about $62 with the baseline; twenty changes a week is about $1,250.

Revisit when changes outgrow one person’s review.

Pitfalls

  • Averages without must-pass items. A swap that breaks refunds ships on a higher average.
  • Containment as the only success metric. It rewards a bot that never hands off to a person.
  • A model name that changes under you. If the provider updates the model behind an alias, nothing re-runs your suite unless you schedule it.
  • Changing the judge and the prompt in one change. You can’t tell whether the agent got better or the grader got easier.

Go deeper

Family