Forecast the decision horizon
AI for Demand Forecasting
Define demand targets, rolling backtests, error and bias, uncertainty and Saudi operating calendars before changing planning decisions.
AI demand forecasting is valuable when the forecast arrives at the right level and horizon for an operating decision. A highly accurate national monthly total may be of little use to a manager who must decide tomorrow's store allocation. The starting point is therefore the decision: what quantity, for which item or service, at which location, over what period, and how far in advance?
This guide is for demand planners and operations managers. It covers forecast design, evidence and evaluation. Inventory optimisation translates demand uncertainty into stock and replenishment policy; this page establishes the demand estimate that such decisions depend on. A better forecast does not automatically mean a better order if lead times, capacity or policy remain wrong.
Define the forecast contract
Specify the target, unit, frequency, horizon, update schedule and decision deadline. “Demand” may mean units requested, units sold, service calls received or occupied rooms. These are not interchangeable. For a service team, the target might be incoming work by hour and category; for a retailer, it might be item-store sales over a supplier's replenishment horizon.
Identify who consumes the output and what they can change. A four-week production commitment needs a four-week evaluation, even if tomorrow's prediction is easier. Preserve a snapshot of every forecast as issued, because later revisions should not replace the evidence of what the business actually knew when it made the decision.
| Element | Decision to document |
|---|---|
| Target | Requested demand or observed sales, unit and known limitations |
| Granularity | Item, location or service category and time bucket |
| Horizon | How far ahead the commitment must be made |
| Information cutoff | Inputs genuinely available when the forecast is issued |
| Comparison | Existing planning method and simple baseline |
| Acceptance | Error, bias, uncertainty and operational consequence by segment |
Decide what the history actually measures
Recorded sales can understate demand during stockouts or service-capacity limits. A zero may mean nobody wanted the item, the store was closed or the product was unavailable. Preserve availability, opening and fulfilment information where it exists. Do not simply replace all zeros with an average; that can invent demand and erase legitimate inactivity.
Separate cancellations, returns, transfers and corrections from the target according to its definition. A bulk transfer between warehouses should not become consumer demand. Capture product changes and discontinuations. If historical identifiers changed, reconcile the mapping before modelling; otherwise the system may interpret a code migration as a sudden collapse followed by a new-product launch.
Build a baseline that deserves to be beaten
Compare the proposed model with the current planning process and simple methods such as a recent average or a relevant seasonal repeat. Use the same information cutoff and horizon. A complex model should earn its additional operating cost through better decisions or meaningfully better evidence, not merely by outperforming an artificially weak comparison.
Keep the comparison consistent across items. A model may improve high-volume products while worsening slow movers. Report segments such as stable demand, promotional demand, new products and intermittent demand. Do not hide a weak segment inside a favourable aggregate. Retail solutions and hospitality solutions need different target definitions even when both call the task demand forecasting.
Backtest in the order time actually unfolds
Use rolling forecast origins: train on the information available up to a date, forecast the required horizon, then move the date forward and repeat. Forecasting: Principles and Practice describes this time-series evaluation approach and the need to keep future observations out of training. A random split of time records can leak future conditions into the test.
Reconstruct the historical state of promotional plans, prices and availability where possible. Using the final revised promotion calendar to test a forecast issued before that revision creates a misleading result. Include multiple decision periods and relevant seasonal conditions. If only a short history exists, state which patterns cannot yet be validated rather than claiming universal seasonality learning.
Read error and bias together
In an illustrative four-period example, actual demand is 100, 120, 80 and 100 units; forecasts are 90, 110, 80 and 100. Actual demand totals 400. Absolute errors total 20, so weighted absolute percentage error, defined here as total absolute error divided by total actual demand, is 20 ÷ 400 = 5%. Mean absolute error is 20 ÷ 4 = 5 units.
The forecasts total 380, giving signed bias of (380 − 400) ÷ 400 = −5% under the convention forecast minus actual. The negative sign indicates underforecasting. A different reporting convention reverses the sign, so document it. The example shows why an error score and the direction of error answer different questions.
Percentage errors can behave badly around zero demand, and aggregate measures can conceal local shortages. The forecast accuracy chapter explains the need for genuine out-of-sample evaluation and the limitations of different error measures. Choose metrics that suit the target and decision. If total actual demand is zero, the WAPE formula above is undefined; do not silently report zero error.
Represent uncertainty in a usable form
A point forecast is one estimate, not a promise. Provide intervals or quantiles where the method supports them, explain what they mean and test their empirical coverage. An interval labelled 80% should be assessed over many comparable forecasts; it does not guarantee that any particular observation will fall inside it. Wider intervals may be honest when the history is sparse.
The decision maker needs to understand the cost of being above or below the estimate. A staffing shortage and a small amount of spare capacity have different consequences, just as perishable overstock differs from a temporary stockout. Keep those choices explicit in downstream planning. The forecast should supply uncertainty; the operating policy determines how much protection to buy.
Use the Saudi operating calendar supplied by the business
Model relevant trading periods, promotions, school schedules, public events and Ramadan or Hajj effects only where they apply to the actual demand. Record event dates and the information available at the issue time. Do not encode a movable calendar event as the same Gregorian week every year or assume that every city, product and customer group responds in the same way.
Local calendars also affect supply and opening hours, which can change observed sales independently of underlying demand. Ask the business to confirm these conditions and distinguish event-driven changes from price, availability and distribution changes. For food and beverage operations, the demand period may be shorter than the shelf-life decision, making hourly or daily context important.
Handle promotions and new products as different evidence problems
Promotional forecasting needs the planned offer, channel, timing and relevant historical comparators. Separate the expected baseline from the estimated uplift where useful, and record uncertainty about execution. A promotion that was cancelled or poorly stocked should not be treated as evidence that the intended offer had no effect.
New products lack their own history. Use a transparent analogue or category model, with the reasons for similarity and a planned revision as observations arrive. Avoid giving a new item a precise-looking forecast merely because an algorithm can return a number. Record which assumptions came from planners and which were estimated from data.
Make overrides inspectable
Planners may know about a one-off event absent from the dataset. Allow an override with a reason, evidence, scope and expiry. Retain both the original forecast and the adjusted version. Later compare whether the adjustment improved the relevant decision or introduced avoidable bias. An override should not erase the baseline needed to learn from the outcome.
Separate corrections to bad input data from judgmental demand adjustments. If a store closure was missing, fix the underlying record; if a planner expects an unusual local event, preserve that assumption separately. Supply-chain operations should receive an agreed forecast version so that procurement, production and distribution do not act on inconsistent revisions.
Reconcile levels without hiding local error
Many businesses need forecasts by item, location, region and total. Decide which levels must add up and how differences are reconciled. Use consistent units, periods and inclusion rules; gross orders at one level cannot be summed meaningfully with net sales at another. A reconciled total is a planning property, not evidence that each local forecast is accurate.
Evaluate the levels that drive decisions separately. A good regional total can result from overforecasting one branch and underforecasting another, leaving the network total correct while both branches make poor commitments. Preserve those errors in the report. When demand moves between substitute products or channels, examine the combined category as well as the individual series.
Document how new locations and discontinued items enter or leave the hierarchy. Otherwise changes in reporting structure may appear as demand changes. The published forecast should identify the hierarchy version and the accepted reconciliation method so downstream teams can reproduce the numbers they receive.
Scope the project around a planning cycle
Agree the target and horizon, historical reconstruction, baseline, rolling evaluation, segment report, uncertainty output and override record. Test at least one complete planning handoff with the intended users. Measure whether the forecast was available before the decision and whether the team used it correctly. Model error alone cannot establish operational benefit.
Trusted Data's Saudi supply-chain AI guide provides commercial context for connecting forecasts with broader planning. Use operations tool evaluation for a controlled comparison. Bring a masked demand history, the planning calendar and one recent forecast-driven decision to discuss a demand-forecasting solution through OpenForAI's AI Solutions.
FAQ
Your questions, answered.
How far ahead should the model forecast?
Use the horizon at which the business must commit resources, orders or capacity. A supplier lead time or staffing notice period may determine the useful horizon. Evaluate performance at that horizon rather than relying on easier one-day predictions. If several decisions use different horizons, preserve separate evaluation results and make clear which forecast version each decision receives.
Can sales history be used when stockouts are common?
It can be useful, but observed sales are constrained by availability and may understate demand. Preserve stockout and closure information, identify affected periods and state the assumptions used to estimate lost demand. Do not replace all low values mechanically. Validate the approach against periods or locations with reliable availability and keep uncertainty visible in the forecast output.
How should Ramadan-related demand be modelled?
Use the relevant event dates, local trading conditions and product-specific history supplied or verified for the business. Separate changes in demand from changes in opening hours, promotions and availability. Test across comparable event periods where data permits. Do not assume a fixed Gregorian week or a universal uplift across all categories, locations and customer groups.
Can AI forecast a new product without its own history?
It can produce a provisional estimate using comparable products, category behaviour and planner assumptions. Explain why the analogues are relevant and show wider uncertainty where evidence is limited. Plan an early revision as actual observations arrive. The important question is whether the estimate supports a sensible initial commitment, not whether the model can output a precise number.
Should planner overrides replace the original forecast?
Retain both versions with the reason, scope and timing of the adjustment. This allows the team to assess whether judgment improved outcomes and to distinguish useful local knowledge from recurring bias. Correct source-data errors separately from discretionary adjustments. Without the original forecast snapshot, the organisation loses the evidence needed to evaluate the override process.
Is a language model enough for demand forecasting?
A language model can help explain inputs, organise assumptions or summarise results, but the forecast still needs an appropriate time-series or statistical method and an out-of-sample evaluation. Choose the method based on the target, horizon and evidence. A convincing narrative about future demand is not a substitute for a reproducible forecast and a comparison with simple baselines.