Model Food Preparation Time When Ready Signals Are Unreliable
Last updated: November 29, 2026
Quick Overview
Restaurants are supposed to tap Food Ready in their partner app, but many tap late, early, or not at all. How would you build a model of true preparation time using these noisy and censored signals plus rider pickup times?
Swiggy
November 29, 20260
0
0 solved
Restaurants are supposed to tap Food Ready in their partner app, but many tap late, early, or not at all. How would you build a model of true preparation time using these noisy and censored signals plus rider pickup times?
Preparation time feeds both dispatch and the promised ETA at Swiggy, and its labels are notoriously messy. The onsite checks whether you can reason about label quality, censoring and bias, not just pick a model.
What the Interviewer Expects
- Identifies that pickup time is an upper bound on ready time when the rider waited for food
- Treats missing or late ready taps as censoring or noise rather than ground truth
- Proposes a way to estimate restaurant-level tapping bias
- Uses features like dish count, items, hour and current kitchen load
- Evaluates on a cleaner subset or with proxies like rider wait time
- Discusses how the model is used downstream
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- How would you get a small set of high-quality labels to validate against?
- What if restaurants learn that tapping early gets riders sooner?
- How would you model a cloud kitchen serving several brands from one kitchen?
- How would you handle a sudden kitchen slowdown that the model has not seen?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
True ready time is unobserved. We see: the ready tap time (may be missing, late, or early), rider arrival time and pickup time . If the rider waited ( by more than handover time)...
Approach
Build labels from the most trustworthy signal per order and model the rest with censoring:
- Rider waited: with handover (exact label).
- Rider arrived after the food was ready: ...