Learning on Web Dev Open is free for all.

Interview Prep · ML System DesignDesign ETA prediction
← ML System Design

Design ETA prediction

Medium40 minFree, no account

A regression problem where being early and being late cost different amounts.


The question

Design the system that predicts arrival time for a delivery: shown at order time and updated during the journey.

Be specific about the loss function and what you do with real-time conditions.

Functional
  • An ETA at order time and continuous updates during the journey.
  • Account for live traffic, weather and restaurant preparation time.
  • Give an uncertainty range, not only a point estimate.
Non-functional
  • 100ms at order time; updates every 30 seconds.
  • Being late is worse than being early.
40:00Commit to an answer before you open the solution. Reading it first teaches you to recognise good answers, which is not the skill being tested.

Stuck?

0 of 3 hints taken

The worked solution

written by a person · not a grade

Score yourself

0 of 5 marked
  • Decomposed the journey, or justified not doing so20
  • Chose an asymmetric loss and tied it to the business cost30
  • Used live features and updated during the journey20
  • Produced uncertainty, not just a point estimate15
  • Addressed display stability or label censoring15

We run no AI here and nothing on this page grades you. The score is yours, and the useful number is the one you get on the same problem a month from now, cold.

kept in this browser only