Build a late-delivery risk model
Company: DoorDash
Role: Data Scientist
Category: Machine Learning
Difficulty: hard
Interview Round: Onsite
You’re given an anonymized DoorDash dataset at order-creation time and asked to predict late delivery risk (late = actual_dropoff_time > quoted_dropoff_time). 1) Define the target precisely and propose a time-based train/validation/test split that avoids leakage from future information (include exact cut dates). 2) Enumerate at least 10 high-signal, production-safe features available at order creation (e.g., store historical on-time rate by hour-of-week, dasher supply-demand index in zone, restaurant prep-time quantiles, distance and traffic, weather, surge/boost, customer lateness tolerance proxy). 3) Identify at least 5 leakage hazards and how you’ll eliminate them (e.g., features derived from post-pickup events, future average wait, features computed with non-causal windows). 4) Choose evaluation metrics for ranking and calibration (e.g., AUROC, AUPRC, Brier, calibration slope), justify thresholds for operational actions, and quantify business impact using a cost matrix. 5) Describe an online ramp: shadow mode -> treatment gating -> A/B test with guardrails; how you’ll monitor drift and recalibrate (e.g., Platt/Isotonic, periodic time-split retraining, population shift alerts). 6) Explain how you’ll handle cold-start restaurants/cities and seasonality (hierarchical pooling, entity embeddings, time-of-week effects).
Overview: This question evaluates competencies in production-ready predictive modeling, including target definition, feature engineering, temporal train/validation splitting to avoid leakage, model evaluation and calibration, monitoring and ramp strategies, and translating probabilistic outputs into business-impacting decisions for a Data Scientist.
Read the full DoorDash Data Scientist interview experience this question came from
Community answers
Answer by swemleds
Problem: frame this binary classification problem where label is 1 if the actual delivery time exceeds the original quoted ETA, and 0 otherwise.
Features: use historical restaurant on-time rates, preparation time, order volume, Dasher supply demand ratio, distance, traffic, weather, and time of the day, using only information available at order creation
Leakage: updated ETA after creation, post-creation dispatch events like actual dasher accept, drop-off time weather and traffic
Evaluation:
can start by using lighGBM classifier with binary cross-entropy loss using time based train/val/test to prevent future leakage
evaluate AUROC and AUPRC for discrimination, and Brier Score and calibration curves to ensure predicted probabilities reflect actual late-delivery rates
Business impact: can use calibrated probabilities with cost-based thresholds to identify high-risk orders and trigger actions such as earlier dispatch or proactive customer notifications, then validate improvements through online experiments