Forecast Food Stocking Needs Under Waste and Stockout Costs
Company: C3 AI
Role: Data Scientist
Category: ML System Design
Difficulty: hard
Interview Round: Technical Screen
A retailer wants to predict how much food to stock at each location for the next replenishment cycle. Too little inventory causes stockouts and lost sales; too much creates holding cost and spoilage.
Walk through the problem from business definition to a modeling and evaluation plan. Explain the prediction target, features, treatment of censored demand, model choice, validation design, and how forecasts become stocking decisions.
### Constraints & Assumptions
- The decision is made separately for product-location pairs.
- Historical sales can be lower than true demand when inventory is unavailable.
- Promotions, prices, holidays, and replenishment lead times can change.
- The goal is a decision with asymmetric costs, not the lowest generic prediction error.
### Clarifying Questions to Ask
- What is the order cadence, supplier lead time, shelf life, and minimum order quantity?
- How are stockouts, waste, substitutions, and lost sales observed?
- Which products are stable staples versus intermittent or newly launched items?
- What service level or financial cost defines understocking and overstocking?
```hint Match the horizon to the decision
Forecast demand over the period that new inventory must cover, then subtract usable inventory already available or arriving.
```
### What a Strong Answer Covers
- A precise grain, horizon, label, and point-in-time feature set.
- Demand censoring, seasonality, promotions, and cold starts.
- Time-based validation and baselines at relevant product-location segments.
- Probabilistic forecasts or quantiles tied to asymmetric decision costs.
- Waste, availability, margin, and lost-sales evaluation rather than RMSE alone.
### Follow-up Questions
- How would you estimate demand when a product was stocked out for half the day?
- What baseline would you use for a new store?
- How would substitution between similar products affect labels and evaluation?
- Why might a forecast with lower RMSE produce worse stocking decisions?
Overview: Structure a food-inventory forecasting case from censored demand and time-based validation to probabilistic forecasts, asymmetric stocking costs, waste, availability, and rollout.
Read the full C3 AI Data Scientist interview experience this question came from