Every input feature has an event time and an availability time. A historical backtest must use only values that would have been available at its forecast origin, including revisions, delayed reports, and planned events. Future calendar dates may be known in advance; future realized sales or weather are not. A prompt that sees the final corrected table may appear accurate while depending on hindsight. The data pipeline should build an as-of snapshot for each origin, then pass the model a manifest of allowed series and known-future fields. Unknown inputs belong in a scenario, not a factual forecast feature.
Forecast prompts: enforce the as-of data boundary
Operational case
Aster's operations table includes a stockout adjustment entered three days after a week ended. The revised fulfilled count is suitable for a later report, but it was unavailable to the planner at that week's Sunday forecast origin. A future promotion is approved only on Tuesday, after that origin. The backtest excludes both from the earlier input snapshot. A model-produced narrative that cites Tuesday's approval as if the Sunday planner knew it fails the as-of check even if its numeric forecast happens to be close.
Forecast origin: Sunday 18:00 local
Historical revision posted Wednesday: unavailable at origin
Promotion approved Tuesday: unavailable at origin
Calendar week boundary: known in advance
Backtest input: origin-specific snapshot onlyPerformance and review cost
Building N origin snapshots from an event-sourced store can be O(N log N) for indexed as-of lookups, or more if each snapshot scans the full history. Cache snapshots by origin and data version without letting newer revisions overwrite old views. The extra storage buys an honest replay. Prompt wording alone cannot repair leakage if the input table was assembled with future values.
Common Mistakes
- Do not use the latest corrected table to replay an older forecast without an as-of view.
- Do not call an unapproved future promotion a known feature.
- Do not judge leakage solely by whether a final number looks plausible.
Connected lessons
- Prompt engineering applications
- Prompt Engineering
- Evaluation leakage: keep the release test independent
- Research prompts: bind claims to a date and evidence record
- Forecast prompts: define target, horizon, and time grain
- Forecast prompts: distinguish missing weeks from zero demand
- 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
