Case study · 03 / 03

A forecast model that finally beat the founder's gut.

Retina was making inventory decisions from spreadsheets, intuition and stale dashboards. We built an end-to-end forecasting pipeline with confidence intervals and a Slack-native planning interface in 10 weeks.

[ Client ]

Retina

Bootstrapped · DTC analytics · Forecasting

[ Engagement ]

Sprint + advisory

10 weeks build · async support

[ Role ]

ML engineer

Forecasting · MLOps · product surface

[ Year ]

2024

Q4 launch

Results · two buying cyclesmeasured against SKU planning baseline
-31%
Stockouts
Across top SKUs
+18%
Margin per SKU
After buying cadence shift
7d
Planning cadence
Down from quarterly buys
86%
Forecast accuracy
Weighted MAPE target hit

The founder knew demand patterns better than the dashboards, but the business had outgrown intuition. Quarterly buying decisions were too slow for promotion swings and supplier delays.

Past forecasting attempts failed because they stopped at notebooks. There was no repeatable pipeline, no confidence intervals, and no planning workflow the team would actually use.

The goal was not model novelty. It was a system that made weekly inventory decisions better and easier to defend.

I started by reconstructing historical demand, promotions, stockout periods and supplier lead times into a clean training set.

We compared simple baselines against gradient-boosted models, then focused on explainability and confidence intervals so buying decisions did not feel like magic.

The model shipped behind a Slack workflow: category managers could ask for weekly forecasts, risk flags and recommended purchase quantities without opening a dashboard.

  • Feature pipeline for sales, promotions, stockouts, holidays and supplier lead times.
  • Baseline and XGBoost model comparison with weighted SKU-level evaluation.
  • Confidence intervals and risk flags attached to every recommendation.
  • Slack-native planning interface for weekly buying decisions.
  • Scheduled retraining, drift checks and alerting for demand regime changes.
[ 01 ] Data
Demand history
  • Shopify
  • Ads spend
  • Inventory
  • Suppliers
[ 02 ] Features
Forecast table
  • Promotions
  • Lead times
  • Seasonality
  • Stockout flags
[ 03 ] Model
Forecast engine
  • XGBoost
  • Backtests
  • Intervals
  • Drift checks
[ 04 ] Action
Planning surface
  • Slack app
  • Risk flags
  • Buy recs
  • Exports

The model only mattered once it changed the buying cadence. Slack became the product surface because that is where the team already made decisions.

# Forecast response forecast = model.predict(next_8_weeks) risk = stockout_risk(forecast, inventory, lead_time) return PurchasePlan(units=rec_qty, confidence=interval)

The team moved from quarterly buy decisions to weekly planning with confidence intervals attached to every recommendation.

After two buying cycles, top-SKU stockouts dropped by 31% and margin per SKU improved by 18%.

The founder still had final say, but the model became the default planning baseline instead of a side report.

"I came in skeptical of AI. Talha told us what was not worth building, then shipped the one model that changed our buying decisions."

- Priya Krishnan, Founder, Retina

Book a call

Got a problem AI might solve?

30 minutes. Free. You leave with a clear yes/no on whether to build, and a one-pager you can forward to your team.

[ Response ]

Within 24 hours

[ Timezone ]

GMT+5 · flexible

[ Discovery ]

Free · no NDA needed

[ Engagement ]

From $8k / 4 wks