SESSION 4 · ~65M

Build: demand-forecast prototype

CSV in, a chart and error metrics out — a forecasting prototype you can improve through bug-report prompts alone.

Next tool: a demand-forecast prototype. Spec: paste a CSV of historical demand; the tool returns a forecast using a simple method, a chart of actual versus forecast, and an error metric so you know how good it is.

Choose the simple method first

Start with a moving average or exponential smoothing. These are transparent, fast to implement, and — as the M5 competition showed — often beat fancier machine-learning approaches on real demand data. Get a simple baseline working before reaching for complexity.

  • Moving average — forecast equals the average of the last N periods; pick N to balance responsiveness and smoothness.
  • Exponential smoothing — a weighted average where recent periods count more; one smoothing parameter controls it.
  • Error metric — MAPE (mean absolute percentage error) gives a percentage you can read directly: 'our forecast is off by 8% on average'.

In forecasting, boring often wins. The temptation is to ask for an LSTM or an 'AI' forecaster; the discipline is to ship the simple baseline first, measure its error, and only escalate complexity if the error justifies it. Most demand series are well-served by exponential smoothing.

Iterate the same way as the calculator: run it on real demand, read the MAPE, and if it's poor, send a bug-report prompt ('the forecast lags the actuals by one period — fix the lag'). The error metric is your compass; without it, you're guessing whether changes help.

TRY IT

Find a real demand series (even 12 months of any product's sales). Run the prototype, note the MAPE, then ask the model to add a second method and compare both MAPEs. You've just run a miniature forecasting bake-off — the right way to pick a method.

CHECK YOUR UNDERSTANDING

What does MAPE measure in a demand forecast?

Why does the module recommend starting with a simple method like exponential smoothing?

What role does the error metric play in the iterate-and-improve loop?

NOTEBOOKLM

Connect your notebook

Paste a NotebookLM share link to embed your notebook for this module.

Answer the 3 questions above to unlock
Streak
0-day streak
Today's fact
Progress
25% to next milestone