The interview problem
Serve easy image classifications cheaply while routing difficult examples to a larger model under a latency budget.
Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.
1. Scope and worked approach
Assume both models share a label taxonomy and escalation remains available. Calibrate an early-exit rule on held-out traffic, using uncertainty and quality signals. Measure errors among accepted easy cases separately from routed cases. Deploy the small model first and send only rejected cases to the larger stage. Record both stage versions and sample accepted cases for shadow evaluation to detect routing drift.
2. Trace the design or derivation
Small model → acceptance gate → accept or route → expensive model → log stage decision
Route capacity should be part of load admission. When the expensive queue is saturated, returning a low-confidence small-model answer changes quality semantics; choose an explicit deferred result or bounded fallback instead. Evaluate thresholds jointly with queue behavior because a routing policy that works offline can collapse under correlated hard inputs.
3. Calculate the example
A small model costs 5 ms and routes 20% to a 40 ms second stage. Mean sequential compute is 5 + 0.2×40 = 13 ms, not 8 ms. Routed requests take at least 45 ms before queueing, so average savings do not guarantee a 20 ms tail SLO.
4. Failure cases and trade-offs
Traffic shift can route most requests and overload the expensive stage. A hard capacity cap requires an explicit defer/error policy, not silently accepting uncertain labels. Early exit saves compute but adds threshold maintenance and biased observations of second-stage quality.
5. Validation, follow-ups and self-review
Load-test a 100% routing spike and monitor selective risk at fixed coverage. Follow-up: can a parallel speculative design reduce tail latency? Self-review: distinguish mean cost, route fraction and tail behavior.
Sources and related practice
Technical reference: arxiv.org — Vision accuracy/compute scaling background, not an endorsement or benchmark of this cascade.
Source publication/update: Submitted May 28, 2019; revised September 11, 2020. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.
Continue with Route uncertain predictions to human experts; Design a model-serving platform.
Continue your preparation
Choose a connected learning path or browse more ML system design questions. Read our editorial method and attribution policy.