01MLOps · Time series

ML demand forecasting in production

Over 100,000 SKU+Store combinations, forecast weekly by a routing policy that picks a model per cluster.

Series, weekly
100k+
Accuracy by cluster
70-82%

A retail chain with 14 supermarkets reorders stock every week, for over 100,000 SKU+Store combinations. That decision used to come from a black box inside the ERP: it produced a number, never a reason, and nobody could make it better.

The replacement forecasts every combination weekly and feeds reordering directly. It sends each product to the method that suits how it actually sells: machine-learning models for the steady sellers, a simpler rule for the long tail that barely moves. Accuracy went from about 30% with the ERP's forecast to 70–82% today, depending on the cluster.

The ML demand forecasting in production demo (interactive with JavaScript on)

How it's built

The tools, the architecture and the engineering numbers, one line each.

03Applied AI · Guardrails

AI assistant for business data

Numbers the model makes up
Zero
Embedded/Vector DB
Golden queries

A Telegram assistant for questions about sales, inventory and purchasing. Every figure it gives comes from a query it actually ran.

View full case study: AI assistant for business data

05Multi-agent · Local-first

Personal AI operating system

Before anything it can't undo
Asks first
Git is the source of truth
Markdown

The memory is markdown in Git, so it outlives the runtime that reads it.

View full case study: Personal AI operating system

ML demand forecasting in production

How it's built

Role
Architecture and data engineering; modelling with the team's data scientist
Running
In production since 2026

Built with

  • PythonThe whole pipeline
  • LightGBMDemand models, one per cluster
  • statsforecastBaseline models to beat
  • PolarsFast data processing
  • Delta LakeVersioned on-prem data lake
  • DagsterPipeline orchestration and scheduling
  • MLflowExperiment tracking and model promotion
  • SQL ServerSource sales and stock data

How it fits together

Weekly forecast pipeline, from ERP extract to replenishmentThe ERP feeds a daily ingest into a Bronze layer, refined into Silver features and Gold training frames. Series are split into eight clusters, each with its own LightGBM Tweedie model. A Syntetos-Boylan routing policy then decides per series whether to use that model or a four-week moving average, a guardrail caps the daily prediction, and the result feeds replenishment. A horizon audit checks the served forecast every week.SOURCEINGESTLAKEMODELLINGSERVINGaudited weeklyERPsales · stock · masterdataDaily ingestDagster assetBronzeraw, append-onlySilvercleaned + featuresGoldtraining framesRouting + guardrailSyntetos-Boylan · cap G18 LightGBM Tweedieone per clusterSMA-4intermittent · lumpy ·newReplenishmentmerchandise reorderHorizon auditweeks of usable forecastMLflowruns · metrics ·promotion

By the numbers

Accuracy, the ERP's forecast against today's, by cluster
30% → 70–82%
SKU+Store combinations, forecast weekly
100k+
Automated tests, green before every deploy
370+
Models, one per cluster
8