The interview problem

Practice prompt

A classifier routes 10,000 customer-support tickets per day to specialist teams. Incorrect routing causes delays. Human reviewers can inspect at most 1,000 tickets per day and sometimes make mistakes themselves. Design a policy that decides which predictions to automate and which to defer. Explain how to train it, operate the review queue and evaluate the combined result.

Original ML-design practice, not a reported company interview. Ticket counts, error rates and cost units are hypothetical. Primary research references retrieved September 27, 2026.

1. Optimize the combined decision

Low model confidence is a useful baseline signal, but the real question is whether this reviewer is expected to improve this decision. A human may struggle with the same ambiguous cases as the model. Conversely, a reviewer with access to a product-specific workflow may correct a confident model mistake.

Let pM(x) be the probability the model misroutes ticket x, pH(x) the probability the assigned review process misroutes it, C(x) the cost of a routing error, and cR(x) the review cost including delay. Under this simplified common-error-cost model, automation has expected cost C(x)pM(x), while review has expected cost C(x)pH(x)+cR(x). Defer when the expected benefit Δ(x)=C(x)(pM(x)−pH(x))−cR(x) is positive, subject to capacity.

If different wrong destinations have different costs, replace each scalar error probability with expected loss over possible decisions. Estimate reviewer performance under the actual interface and information available. A reviewer shown the model's answer may behave differently from a blinded annotator.

2. Calculate why uncertainty alone can lose

Suppose the daily population consists of the following groups. Rates are hypothetical expected values known for this exercise, not estimates with uncertainty:

GroupTicketsModel errorReviewer error
A: routine8,0001%2%
B: ambiguous wording1,00020%18%
C: specialist context1,00010%1%

Automating everything produces 80+200+100=380 expected errors. Deferring all of B, the highest-error model group, produces 80+180+100=360 errors. Deferring all of C instead produces 80+200+10=290 errors. Both policies consume 1,000 reviews, but C yields a net reduction of 90 expected errors versus B's 20. These are net reductions, not counts of individual corrections: reviewers may fix some model errors while introducing others.

With C(x)=10 cost units for every error and cR(x)=0.5 per review, per-ticket benefit is −0.6 for A, −0.3 for B and +0.4 for C. All-automated cost is 3,800 units. Reviewing B costs 3,600+500=4,100, worse than automation despite fewer errors. Reviewing C costs 2,900+500=3,400. The capacity limit is a maximum, not a requirement to spend every review slot.

The formulas do not require independent model and human mistakes: expected loss follows the decision actually used. However, group averages are insufficient for a personalized deferral rule if reviewer advantage varies within groups. Training data must support the granularity of the promised routing benefit.

3. Distinguish selective risk from total risk

Coverage is the fraction decided automatically. Selective risk is error rate on that automatic subset. Total system risk includes both automatic and reviewed decisions. With C deferred, coverage is 90%, automatic errors are 280/9,000≈3.11%, reviewed errors are 10/1,000=1%, and combined error is 290/10,000=2.9%.

With B deferred, automatic errors are 180/9,000=2%, which looks better in isolation. Yet reviewed errors are 18%, making combined error 3.6%. Choosing the policy with the lower automatic selective risk would select the worse combined system in this example.

Report coverage, review demand, review outcome quality, total cost and end-to-end latency together. Include unresolved tickets in the operational denominator instead of dropping cases still waiting for humans. Define a fixed maturity window for outcome measurement and separately report censored or pending cases. Do not count unknown outcomes as correct. Report error among adjudicated outcomes with its coverage, plus unresolved share; where useful, bound overall error by treating every unresolved case as either correct or incorrect.

4. Collect evidence about both decision makers

Store ticket features available at decision time, model prediction and version, reviewer identity or skill group, the review interface version, final reviewed decision and a later adjudicated routing target. The label should not simply be the reviewer's own choice; otherwise reviewer error appears to be zero by construction.

Historical reviewed tickets were selected by an earlier policy. They cannot establish human performance on tickets that policy never sent to review. Collect a representative audit sample across automatic and deferred regions, using offline review where operational experimentation is inappropriate. Record sampling probabilities and separate training, calibration and test cohorts by time and related customer incidents.

Begin with an interpretable benefit estimator and compare it against confidence thresholding and random review at equal workload. Joint learning-to-defer methods are another option; the cited research studies predictors designed to complement experts. A learned deferral score still needs calibration, workload validation and evidence under deployment shift. A paper's statistical result does not prove a particular production implementation is calibrated.

5. Route into a real review workflow

ticket → model + expected-benefit estimator → policy + capacity check
                 ↓                                  ↓
        automatic destination                durable review queue
                 ↓                                  ↓
           outcome audit                    reviewer decision + audit
                 ↘                                  ↙
                    combined quality and latency

Use stable ticket IDs and versioned decisions. Atomically assign ownership so the automatic path and human path do not both finalize conflicting routing actions. Reviewers receive relevant evidence, clear choices and an escalation option. Log whether the model suggestion was shown; assistance and anchoring change the review process being evaluated.

For equal review durations in an offline batch with additive, fixed benefits and no additional assignment constraints, choose up to the capacity limit from positive estimated benefits in descending order. In streaming traffic, future arrivals are unknown. Use admission thresholds, reserved capacity for later periods and deadline-aware queueing rather than claiming an online greedy policy matches an oracle that sees the whole day.

When review time varies, the constraint is reviewer minutes, not ticket count. Benefit per minute is a heuristic for indivisible jobs; it is not always the exact knapsack optimum. Match specialist skills to tickets and estimate availability by shift. A global average human error rate is not a substitute for the performance of the person or team actually assigned.

6. Size the queue and define overload behavior

At three minutes per review, 1,000 tickets require 3,000 minutes, or 50 productive reviewer-hours per day. Ten reviewers providing five productive hours each meet the average requirement with no spare capacity. Breaks, training, absences, rework and arrival bursts need additional allowance; eight paid hours does not imply eight hours of uninterrupted review.

If 1,200 tickets are deferred daily but service capacity remains 1,000, backlog grows by 200/day. After five such days there are 1,000 extra tickets, assuming none expire or leave by another path. A threshold that meets an offline accuracy target can therefore create an unstable service.

Define what happens when the queue is full: hold the ticket for later with a visible delay, use an approved coarse routing fallback, or request more staffed capacity. Do not silently convert a must-review case into automatic finalization. Distinguish policy-mandated review from discretionary cost-benefit review; only the latter can be shed according to the configured trade-off.

Monitor queue age, skill-specific load, unresolved count and realized review time. A capacity controller may adjust discretionary thresholds within validated bounds, but must record those changes so later evaluation can reconstruct why cases were routed differently.

7. Detect changes in reviewer advantage

Reviewers may improve with training or degrade under fatigue. Model updates may eliminate a previously useful human niche. Changes in ticket mix can invalidate both model-error and reviewer-error estimates. Audit by language, product and issue type, with enough support to report uncertainty rather than unstable tiny-slice rankings.

If the reviewer service fails, keep pending tickets visible and prevent duplicate assignment through durable ownership. If the benefit estimator fails, use a validated fallback policy with an explicit capacity limit. Separate factual uncertainty about the correct team from missing operational context; some cases need additional information rather than another classifier.

Evaluate a rollout against the full workflow at comparable staffing and latency, not just against the original model's accuracy. Track whether faster automatic handling offsets some routing errors and whether delayed review creates new failures. The chosen cost model is a product assumption to test, not a universal definition of quality.

8. Follow-ups and self-review

Follow-ups: Is the least-confident model case always the best review candidate? No; human advantage matters. Does deferral mean correct resolution? No. Should every review slot be filled? Only when required by policy or justified by benefit. Can observed reviewer accuracy on prior deferrals be generalized to all cases? Not without evidence addressing selection. Is selective risk enough? No; include reviewed decisions and pending work.

Score 0–2 each for joint loss reasoning, worked capacity allocation, unbiased evidence about reviewer performance, durable human workflow and complete system evaluation. Full marks require treating humans as fallible, capacity-limited participants in the system.

Sources and next steps

The support-ticket setting, cost model, arithmetic and queue design are original. Continue with selection bias for evaluating selectively observed outcomes.

Continue your preparation

Choose a connected learning path or browse more ML system design questions. Read our editorial method and attribution policy.