Vincent Demarez
All work

2026

Sibyl

Demand forecasting for Agrafresh

Sibyl predicts how much of each product our retail customers will order, so the factory can plan cutting and staffing before the orders land. It learned from 160,149 sales lines over three and a half years, and it retrains itself every night.

160,149 sales lines to learn from
0.250.500.751.00same week last year41 product lines, best first0.250.500.751.00same week last year41 product lines, best first

Typical product line: 32% less error than the baseline. Where nothing beat it, Sibyl keeps the baseline.

TimesFM
15
Ensemble
11
LightGBM
7
TimesFM with signals
4
Last year’s week
4

How it fits together

  1. SignalsWeather, calendar, school holidays, promotions
  2. History160,149 sales lines, 108 products, seven retail groups, since 2023
  3. ModelsGoogle’s TimesFM next to a tuned LightGBM
  4. BacktestRolling, against a same-week-last-year baseline
  5. ForecastBest model per product, retrained nightly, tuned weekly

The problem

Fresh-cut produce doesn’t wait. Orders arrive late and swing with the weather, the holidays and whatever promotion a retailer runs that week. Plan too little and trucks leave short. Plan too much and good product goes to waste.

What I built

I started with the simplest honest baseline: same week, last year. Every model has to beat that to earn its place. Sibyl runs Google’s TimesFM, a forecasting foundation model, next to a gradient-boosted LightGBM fed with weather, calendar and promotion signals, and a rolling backtest picks the winner per product.

What it showed

Overall, TimesFM beat the tuned LightGBM: 34.1 against 36.5 WAPE. It wins on stable, high-volume lines. On promotional lines the gradient-boosted model still beats the baseline outright, so Sibyl doesn’t pick one model. It picks one per product, every night.

Spec sheet

Built for
Production planning at Agrafresh
Runs on
Our own server
Stack
Python, TimesFM, LightGBM, Optuna
Result
34.1 WAPE for TimesFM against 36.5 for LightGBM (lower is better)