Development of AI-based Demand Forecasting System
Demand forecasting — foundation of production, procurement and logistics planning. Gap between forecast and reality converts directly to write-offs of excess or missed sales. AI-system reduces MAPE from 20-30% (typical for Excel methods) to 8-12% with proper problem setup.
Vertical-Specific Task Details
Manufacturing with Planning Horizon: Horizon 3-6 months due to production lead time. Accuracy important for raw material savings, not operational management. Data: historical orders, market features, competitor capacity.
FMCG / Retail: Horizon 1-4 weeks, high frequency. Promo lifts can give +100-300% to baseline demand. Must separate baseline demand and promotional increment.
E-commerce: Horizon 1-7 days. SKU-level forecast for dynamic pricing and inventory positioning. Extreme seasonality (Black Friday).
Services (Telecom, Banks): Demand for service, not physical product. No physical inventory, but capacity limits (call center operators, server infrastructure).
Forecasting System Architecture
Data Sources → Feature Engineering → Model Training → Forecast → Activation
Data Sources:
├── Internal: ERP sales, WMS, CRM
├── External: macro data, weather, search trends
└── Promotional: trade calendar, planned campaigns
Feature Engineering (dbt / Spark):
├── Temporal lags: t-1, t-7, t-28, t-52 (weeks)
├── Rolling aggregations: 4w, 13w, 52w
├── Promotional features: lift estimation, channel flags
└── External features: weather index, macro indicators
Model Training (MLflow):
├── Baseline: Seasonal Naive, ETS
├── Statistical: Prophet, SARIMA
├── ML: LightGBM, DeepAR
└── Ensemble: Stacking / Weighted Average
Forecast Generation:
└── Hierarchical reconciliation → SKU × Location prognoses
Promotional Modeling
Promotions — largest source of error in demand forecasting:
Decomposition:
Total Demand = Baseline Demand + Incremental Demand (Promotional Lift)
Lift = f(discount_depth, mechanic, category, brand_strength)
Promotional Lift Model:
# LightGBM regressor for lift prediction
lift_features = {
'discount_pct': 20.0, # 20% discount
'mechanic': '2+1', # mechanics
'display_flag': 1, # display placement
'leaflet_flag': 0, # not in leaflet
'competitor_promo': 0, # no competitor promo
'category': 'soft_drinks',
'brand_strength': 0.8,
'seasonality_index': 1.2
}
predicted_lift = lift_model.predict([lift_features])
# predicted_lift = 1.85 (i.e., +85% to baseline demand)
Cannibalization & Halo: Promo on SKU A causes some sales to shift from SKU B (cannibalization). Related SKUs may grow (halo effect). Cross-SKU effects matrix → adjust forecasts across category.
Hierarchical Forecasting
Total Company Forecast
└── By Category
└── By Brand
└── By SKU
└── By Location (warehouse/store)
Reconciliation:
- Bottom-up: sum SKU × Location forecasts
- Top-down: divide top-level forecast by historical shares
- MinT (Minimum Trace): matrix operation, theoretically optimal
For 10,000 SKU × 50 warehouses: 500,000 forecasts daily. Need efficient global models, not individual ones.
New Product Introduction (NPI)
New SKUs without history — separate task:
- Analog-based: forecast based on similar products' sales at launch
- Attribute-based: regression on product characteristics (brand, category, price) to predict launch curve
- Bayesian Prior: initial forecast = analogous SKU, updated as first sales arrive (Bayesian update)
Integration and Forecast Activation
Automatic Orders (VMI — Vendor Managed Inventory): Demand forecast → ROP and EOQ calculation → purchase orders formation → EDI 850 to supplier.
S&OP Integration: Forecasts exported to S&OP (Sales & Operations Planning) system (SAP IBP, Anaplan, Kinaxis Maestro) via API for alignment with production plan.
Accuracy Tracking:
Forecast Accuracy = 1 - WMAPE
WMAPE = Σ |Actual - Forecast| / Σ Actual (weighted by volume)
Accuracy dashboard at all hierarchy levels — key KPI of S&OP team.
Timeline: basic system with LightGBM for 1000+ SKUs and promo flags — 6-8 weeks. Full hierarchical system with NPI, reconciliation and ERP-integration — 4-6 months.







