Design real-time ETA prediction
I was asked this
No reports yet. Sign in to say where you were asked it.
An AI/ML design interview question asked in Uber's system design round, last asked Sep 2025. It tests regression, real-time features and geospatial.
Design the system that predicts when a driver will reach the pickup point and then the drop-off. The prediction is shown to the rider and the driver, used for dispatch and pricing, and refreshed every few seconds during the trip as the car moves. The target is an error of a minute or two on typical city trips.
Requirements
- Functional: predict the arrival time at pickup when a driver is matched, and at drop-off once the trip starts; update the prediction every few seconds from fresh GPS and traffic; serve the same model to dispatch, which asks for ETAs of many candidate drivers at once.
- Non-functional: prediction latency in the low milliseconds, since dispatch calls it many times per request; very high request volume across many cities; error of a minute or two, and estimates that do not jump around between updates.
Clarifying questions
- Which error matters more: arriving later than promised, or earlier? Are we judged on mean error, a percentile, or the share of trips within two minutes?
- Do we already have a routing engine that gives a route and a physics-based ETA from road segments and speeds?
- What live signals exist: GPS pings every few seconds, live traffic speeds per road segment, incidents, weather?
- How are pickup delays handled, such as a driver waiting at an airport or a building with no clear entrance?
- Does the same model serve every city, or one per region?
What a strong answer covers
- A baseline from the routing engine (sum of segment travel times along the route), and a learned model that predicts a correction to it (residual) from route, time, traffic and location features. Explain why a correction beats predicting from scratch.
- Features: route length and segment speeds, live versus historical traffic, time of day and day of week, city and area, turns and traffic lights, the pickup or drop-off location type, driver behaviour, weather.
- Labels from completed trips (actual arrival time), cleaned of trips with detours, cancellations or bad GPS; training data that matches how the model is used at each point in the trip.
- Updating during the trip: recompute from the remaining route as the car moves, and smooth the shown ETA so it does not flicker.
- Serving: a low-latency model (gradient-boosted trees or a small network) behind a feature store with live traffic, batched requests from dispatch, and fallback to the routing estimate.
- Evaluation offline by segment (city, time, trip length) and online by A/B test, plus monitoring for drift such as a road closure or a holiday.
Follow-ups
- Predictions are good on average but bad at airports and stadiums. What do you change?
- How do you predict an uncertainty range rather than one number, and where would the product use it?
- Riders complain the ETA keeps growing during the wait. Is that a model problem or a display problem, and how do you tell?
- How do you keep the model fresh when traffic patterns change suddenly?
Where it's asked
- Uber · System design · Last asked Sep 202560 min · Whiteboard and discussion
What it tests
regression · real-time features · geospatial
Sign in to see the worked answer
The full answer, chapter by chapter, with what interviewers expect at each level. New accounts get 5 credits: each one unlocks a question for good.
What the labs asked this week
A weekly email of what OpenAI, Anthropic and the other top AI labs asked engineers, round by round.
