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
ML System Design
Machine Learning Engineer
OpenAI
November 29, 2026
Machine Learning Engineer
Onsite
ML System Design
Hard

0

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
model routing
learning to defer
cost-quality trade-off
LLM-as-judge
calibration
online evaluation
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. 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 Problems
Sample 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...

Submit Your Answer
Markdown supported