AI Engineering — Case Study

Hybrid AI Framework for Predictive & Adaptive Supply Chain Management

A system that doesn't just forecast supply chain risk — it acts on it. CatBoost regression models predict demand, profit, delivery time and late-delivery risk; a PPO reinforcement-learning agent turns those forecasts into inventory, prioritization, and scheduling decisions.

RoleAI / ML Engineer
TypeResearch + Applied ML
DatasetDataCo Smart Supply Chain (~180K records)
Core Result+222.24 mean reward

Forecasting alone isn't a decision

Most supply chain ML stops at prediction. This project treats forecasts as the beginning of the pipeline, not the end — feeding them into an agent that has to actually choose what to do.

E-commerce supply chains fail in ways that are individually predictable but collectively hard to act on: demand spikes, margin-losing SKUs, slow lanes, and orders that are already going to be late. A forecasting model can flag all of this — but someone (or something) still has to decide how to prioritize orders, allocate inventory, and schedule delivery under those conditions, continuously, at scale. That's the gap this framework closes.

The problem

Static forecasting models tell you what's likely to happen, but leave the operational response — what to restock, what to prioritize, what to reroute — to manual rules or human judgment that doesn't scale with order volume.

The approach

Split the problem in two: let a strong supervised model (CatBoost) handle what it's good at — accurate multi-metric forecasting — and let a reinforcement-learning agent (PPO) handle what forecasting can't: sequential, reward-driven operational decisions.

The result

An agent that outperforms a static baseline by a wide margin on cumulative reward, while the forecasting layer underneath maintains strong accuracy across every target metric it predicts.

How the two models talk to each other

The system runs as a two-stage pipeline. Stage one is purely predictive; stage two is purely decision-making — and the handoff between them is the actual engineering problem.

Stage 1 — CatBoost forecasting layer

Four CatBoost regressors trained on historical order data forecast: sales demand, expected profit, delivery time, and late-delivery risk per order/SKU. Chosen for its native handling of categorical features (shipping mode, region, category) without heavy preprocessing, and its strong out-of-the-box accuracy on tabular data.

Stage 2 — PPO decision agent

The four forecasts become part of the state vector for a Proximal Policy Optimization agent. The agent's action space covers inventory control, order prioritization, and delivery scheduling; a shaped reward function scores outcomes on service level, cost, and delay reduction rather than forecast accuracy alone.

Why PPO

PPO was chosen over value-based methods (e.g. DQN) for stability on a mixed discrete/continuous action space and its clipped objective, which keeps policy updates from destabilizing training when the reward landscape is noisy — a real risk with operational reward shaping.

What it's built with

Modeling
CatBoostPPO (Reinforcement Learning)scikit-learn
Language
Python
Data
DataCo Smart Supply Chain datasetPandas / NumPy
Evaluation
RMSEMAECumulative reward

Measured against a static baseline

Evaluated on the DataCo Smart Supply Chain dataset (~180,000 records), comparing the full hybrid pipeline against a non-adaptive baseline policy.

+222.24 mean reward, RL agent
−120.5 mean reward, static baseline
~180K records evaluated (DataCo dataset)
4 forecast targets: demand, profit, delivery time, late-risk

Beyond the headline reward gap, the CatBoost forecasting layer held strong RMSE, MAE and R² scores across all four prediction tasks — meaning the agent was making decisions on genuinely reliable state information, not noisy guesses.

01

Reward shaping is the real design work

Getting the RL agent to behave sensibly had far less to do with model architecture and far more to do with how the reward function balanced competing goals (cost vs. service level vs. delay).

02

Forecast quality bounds decision quality

An RL agent is only as good as the state it's given. Investing early in strong CatBoost forecasts paid off directly in agent stability during training.

03

Baselines make or break the story

Without a clear non-adaptive baseline, a reward number alone means very little. The comparison is what proves the adaptive approach earns its complexity.