In multi-warehouse inventory allocation, problems are typically formulated as mixed-integer programming (MIP) problems, but no single formulation consistently adapts to heterogeneous instance-level regimes induced by demand concentration, inventory imbalance, replenishment scale, service constraints, and forecast volatility. We study this issue as instance-wise operations research (OR) formulation selection, where each allocation instance is assigned to a solver-executable formulation from a candidate OR expert library.
We propose a solver-guided large language model (LLM) framework for OR formulation selection, where each OR expert corresponds to a MIP formulation encoding a distinct allocation priority. To train the selector, the framework first constructs balanced expert-conditioned supervised fine-tuning (SFT) records for schema learning and then uses MIP solver evaluation on historical instances to convert solver-evaluated allocation-quality gaps into margin-weighted identity preference optimization (IPO) preferences and per-instance expert-score metadata for reward lookup during group relative policy optimization (GRPO).
Experiments on multi-warehouse inventory allocation instances from JD.com, one of China's largest e-retailers, demonstrate that GRPO substantially improves expert-selection accuracy relative to the SFT+IPO selector and, more importantly, produces higher realized allocation quality than both the preference-trained selector and the best fixed formulation. With GRPO, Hit Ratio@1 and Hit Ratio@2 increase from 21.45% to 50.42% and from 70.47% to 82.31%. The resulting selector achieves an allocation accuracy gain of 12.57 percentage points over the incumbent baseline, outperforming both the SFT+IPO selector and the best fixed OR expert, and reduces the gap to the ex-post oracle to 4.85 percentage points.
Blogger's Review: This study demonstrates the potential of large language models in optimizing complex operations research problems. By introducing solver evaluation and group relative policy optimization, it significantly enhances the accuracy of inventory allocation, providing new insights for multi-warehouse management and laying a foundation for formulation selection in the operations research field.