AI Research
The LLM that outsmarted every fixed formula for JD.com warehouse allocation
An LLM trained via solver-guided reinforcement learning picks the best MIP formulation for each inventory allocation instance at JD.com. Hit Ratio@1 jumped from 21% to 50%, and realized allocation accuracy beat every fixed formulation by 12.57 percentage points.
Emmanuel Fabrice Omgbwa Yasse AI-assisted
2026-08-03 · 3 min read

Multi-warehouse inventory allocation looks simple on paper. It is not. The standard way to model it is as a mixed-integer programming (MIP) problem, and the hard part is that no single MIP formulation is best for every instance. Demand spikes in one warehouse, inventory imbalances in another, replenishment cycles, service-level constraints, forecast noise. Each one pushes the optimal formulation in a different direction.
Researchers from JD.com and partner institutions posted a paper on the arXiv preprint server in late July 2026 showing that a large language model can learn to pick the right formulation instance by instance. Allocation accuracy improved by 12.57 percentage points over the incumbent baseline, and the gap to the ex-post oracle, the formulation that would have been best if known in advance, fell to 4.85 percentage points.
The formulation selection problem
The researchers define this as instance-wise OR formulation selection. Each inventory allocation instance is assigned a solver-executable formulation from a candidate library. Each formulation encodes a different priority: minimizing cost, say, or holding service levels at certain warehouses. The selector's job is to match each instance to the formulation the solver will find the best solution with. Looked at that way, the task has a routing flavor, and per-call routing is a known weak point in agentic systems, as TRACE-Router's analysis notes.
Training the selector
The training pipeline has three stages. First, records from balanced, expert-conditioned supervised fine-tuning teach the LLM the basic schema: for a given instance, which formulation was best. Second, margin-weighted identity preference optimization converts solver evaluations on historical instances into preference pairs. Third, group relative policy optimization (GRPO) uses per-instance expert scores as a reward lookup. The reward comes straight from the MIP solver's evaluation of how well each sampled formulation solved the instance. The LLM never solves the MIP. It picks a pre-written formulation and hands it to a traditional solver. That progression, supervised fine-tuning followed by reinforcement learning, has paid off in other domains too; Qwen-Image-2.0-RL documents the same RL-over-SFT pattern in image generation.
Results on JD.com data
The experiments ran on real multi-warehouse inventory allocation instances from JD.com, one of China's largest e-retailers. The baseline SFT+IPO selector posted a Hit Ratio@1 of 21.45% and a Hit Ratio@2 of 70.47%. Adding GRPO pushed both up, to 50.42% and 82.31%. The more meaningful check is realized allocation quality, measured by actual cost and service-level outcomes after the solver ran on the selected formulation. It beat the best fixed formulation and the SFT+IPO selector: 12.57 percentage points over the best fixed OR expert, with a 4.85 percentage point gap to the ex-post oracle.
The paper reports these numbers without breaking down performance by demand volatility or warehouse density, so it is not clear how the approach behaves in extreme scenarios. The work stays inside JD.com's own instances and has not been tested on other retailers or supply chains. That caution is familiar: models can look strong on public benchmarks and lose ground on private, real-world data, as the SWE-bench Verified versus enterprise code gap shows.
Why this matters
The broader pattern here is familiar: LLMs are being used less as direct solvers and more as orchestrators of traditional optimization tools. The model does not need to understand branch and bound or simplex mathematics. It only needs to recognize patterns in instance data that correlate with which formulation a solver will handle best. That makes the problem a classification one, and the paper shows solver-driven reinforcement learning can make it work in production. The same division of labor, a neural model choosing for a symbolic solver, is the pattern behind neuro-symbolic systems that beat a purely neural baseline on temporal reasoning tasks, per the neuro-symbolic benchmark results.
For supply chain operations, where allocation decisions flow into procurement, transportation, and fulfillment, a 12-percentage-point accuracy gain translates into real savings. The authors do not give dollar figures, but the scale of JD.com's operations suggests the impact is large. The approach also points to a general recipe: a library of candidate solutions, a solver cheap enough to evaluate them, and an LLM trained on those evaluations to pick the right one for each incoming instance.
- Source : The LLM that outsmarted every fixed formula for JD.com warehouse allocation — 2026-07-28
Get the tech essentials in 3 minutes every morning
One email, every weekday, with what actually matters in AI and tech.