Problem
A food delivery app shows a live estimated time of arrival (ETA) on the order tracking screen. If the estimate is wrong, customers contact support or cancel. Sudden jumps in the estimate also cause anxiety and erode trust in it. Swiggy had to predict the last-mile leg, from pickup at the restaurant to the customer's door, and to judge the model by both accuracy and stability.
Example from the article: real-time courier features account for road closures, diversions and the Silk Board junction in Bangalore, which the initial travel-time prediction does not see.
Solution in brief
The last-mile model runs on courier GPS pings: current and average speed, remaining and travelled distance, and a traffic level derived from speed. Quality is measured with mean absolute error (MAE) against a threshold plus a second metric, the share of orders with inaccurate sudden jumps. Replacing gradient boosted trees with a small neural network per stage improved both metrics again.
Questions this case answers
- How to predict the remaining time of a moving object's last leg from noisy GPS pings when the estimate is shown to the customer and updated live
- How to evaluate a continuously updated estimate so that both its accuracy and its stability are measured without punishing justified corrections
- How to predict the remaining delivery time once a courier has picked up the order?
- How to measure ETA quality when sudden jumps in the estimate erode customer trust?
Tools and methods
- Haversine distance and speed features — from courier pings
- Gradient boosted trees with absolute loss — first model, replaced the legacy ETA framework
- Neural network (4 hidden layers, Leaky ReLU, Adam) — one model per order stage, more dynamic than trees
- MAE-vs-threshold accuracy and inaccurate-bumps share — evaluation of correctness and stability
Google or a one-time email code. No password.