Problem
Design the demand forecasting system that predicts how much stock each dark store needs for the next 24–72 hours.
Requirements
Functional:
- Forecast demand per (store, product, time_window)
- Trigger auto-replenishment orders when projected stock falls below threshold
- Support manual override by store managers
- Incorporate real-time signals (weather, local events, flash sales)
Non-functional:
- 300 stores × 5000 SKUs = 1.5M forecast cells updated hourly
- Forecast accuracy target: MAPE < 15%
- Replenishment trigger latency < 5 minutes
Discussion points
- Offline training pipeline (feature engineering, model selection)
- Online feature store for real-time signals
- Forecast serving: batch precompute vs on-demand
- Feedback loop: actuals vs forecasts for model retraining
- Cold start for new SKUs and new stores