Design the ETA Prediction System Shown at Checkout
Last updated: November 29, 2026
Quick Overview
Design the machine learning system that predicts the delivery time Swiggy shows before a user places an order and updates after the order is placed, covering features, models, serving and monitoring.
Swiggy
November 29, 20260
0
0 solved
Design the machine learning system that predicts the delivery time Swiggy shows before a user places an order and updates after the order is placed, covering features, models, serving and monitoring.
The promised ETA affects conversion, customer trust and dispatch decisions, so Swiggy treats it as a core ML system rather than a single model. The interviewer checks decomposition of the ETA into stages, real-time features, low-latency serving at listing scale, and calibration to the promise.
What the Interviewer Expects
- Decomposes ETA into assignment, rider to restaurant, preparation, and last mile
- Uses both static and real-time features such as kitchen load and rider supply
- Chooses a quantile or distribution target rather than only the mean
- Serves predictions for every restaurant in a listing within a tight latency budget
- Plans monitoring for drift, calibration and segment errors
- Explains the feedback loop between ETA and conversion
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 would you predict ETA for a new restaurant with no history?
- Customers see one number. Should it be the median or a higher quantile, and who decides?
- How would you handle the label being affected by the ETA itself, since riders and restaurants react to the promise?
- How would you predict the last-mile time for gated apartment complexes?
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
Two moments: pre-order ETA shown on listings and the cart for every visible restaurant (hundreds of predictions per page, p99 under 50 ms), and post-order ETA updated at each stage. Target: a promise ...
High-Level Design
- Stage models: assignment delay, rider travel to restaurant, food preparation time, wait at pickup, and last-mile travel plus handover.
- Feature store: offline features in the warehouse (restaurant ...