A time series with gaps must not silently fill every missing period with zero. A missing row can mean an ingest failure, a closed depot, or no activity; each has a different effect on a forecast. Fulfilled-kit counts can also be censored by stockouts: 32 fulfilled kits do not prove only 32 were wanted if the depot ran out. Pass explicit status fields for missingness, closure, and stock availability, and require the model to list unresolved periods before making a numeric recommendation. A deterministic data check should reject duplicate entity-week keys and impossible negative counts.
Forecast prompts: distinguish missing weeks from zero demand
Operational case
Depot D-47 has no row for one week because a scanner export failed. Another week records zero fulfilled kits during a scheduled closure. A third shows 32 kits fulfilled after inventory reached zero on Thursday. Filling the first with zero would invent a collapse; treating the third as unbounded true demand would pretend the missing requests were measured. The prompt keeps three distinct statuses. A planner may use the closure week for calendar context, but holds the scanner gap and stockout week for review or explicit sensitivity analysis.
Week A: missing export -> unknown count
Week B: scheduled closure -> observed zero fulfilled
Week C: 32 fulfilled, stockout Thursday -> demand censored
Negative count or duplicate depot-week key -> rejectPerformance and review cost
Checking N weekly rows for gaps, duplicates, and invalid values is O(N) expected time with a set. Reconstructing stockout-adjusted demand needs extra evidence and may remain impossible, so it should not be invented in the prompt. Excluding uncertain weeks can reduce training data; the trade-off must be visible in the model evaluation and in the final recommendation.
Common Mistakes
- Do not convert an absent export into zero demand.
- Do not equate stockout-limited fulfilment with unconstrained demand.
- Do not hide excluded weeks from the backtest record.
Connected lessons
- Prompt engineering applications
- Prompt Engineering
- Dataset intake prompts: define a column before analyzing it
- Aggregation prompts: pin the denominator and recompute the rate
- Forecast prompts: define target, horizon, and time grain
- Forecast prompts: enforce the as-of data boundary
- Forecast prompts: compare against a rolling baseline
- Forecast prompts: keep scenarios separate from predictions
- Forecast prompts: label intervals and check coverage
- Forecast prompts: gate inventory recommendations on evidence
- Project: review Aster depot kit forecasts
- Forecast prompt decisions
