Design a Router That Picks Between Fast and Reasoning Models per Request
Last updated: November 29, 2026
Quick Overview
Design an ML-driven router that, for each ChatGPT message, decides whether a fast model can answer well or whether a slower reasoning model is needed, balancing answer quality, latency and GPU cost.
OpenAI
November 29, 20260
0
0 solved
Design an ML-driven router that, for each ChatGPT message, decides whether a fast model can answer well or whether a slower reasoning model is needed, balancing answer quality, latency and GPU cost.
ChatGPT increasingly decides automatically how much thinking a request deserves. The interviewer probes how you define quality labels for routing, build a cheap predictor, set the operating point with cost constraints, and evaluate without silently degrading hard queries.
What the Interviewer Expects
- Frame routing as predicting the quality gap between models for a given prompt
- Generate labels by running both models on sampled traffic and grading with judges and preference data
- Build a low-latency router (small classifier) using prompt and context features
- Choose thresholds with a cost or capacity constraint, adjustable at runtime
- Allow user overrides and explicit signals like "think hard"
- Evaluate on stratified sets and online with quality and latency metrics
Key Topics to Cover
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
- How do you prevent the router from learning that short prompts are always easy?
- What do you do during a GPU shortage for the reasoning model?
- How would you detect that the router is under-routing math questions in one language?
- Should the router see conversation history, and what does that cost?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice ML System Design ProblemsSample Answer
Requirements
- For each turn, choose between a fast model and a reasoning model (possibly with effort levels).
- Router latency under 20 ms.
- Objective: maximize expected answer quality subject to a reasoning com...
High-Level Design
- Feature extraction: prompt embedding from a small encoder, length, detected task type (math, code, casual, writing), language, conversation depth, attachments, user plan.
- Router model: a s...