Source-linked AI summary
Automated Design of Inventory Policy with Large Language Models: An Exploratory Study
Fenghua Yang, Preet Baxi, Yi Zhang, Stefanus Jasin, Yanzhe Lei, Mo Liu, Parshan Pakiman
TL;DR
Inventory policy design asks how data, optimization, and LLMs can be integrated to search beyond policy classes specified in advance. The proposed AIPS framework combines these resources to automate policy-class design, with discovered classes substantially outperforming the optimized base-stock benchmark and transferring across more than 10,000 target instances.
Problem
The paper asks whether data, optimization, and LLMs can systematically search beyond inventory policy classes specified by researchers in advance.
Method
AIPS combines data, optimization, and LLMs to automate the design of inventory policy classes through evolutionary search.
Results
More than 10,000 target instances show mean cost reductions exceeding 21% for capped, discounted-pipeline, and hybrid policy classes.
Takeaways & Limitations
The resulting policies substantially outperform the optimized base-stock benchmark and include structural modifications such as order clipping.
Takeaways & Limitations
The framework calls for richer mechanisms to represent and recombine structural motifs and extension to broader settings.
Abstract
from arXiv · showhide
Firms making inventory decisions have access to operational data, optimization tools, and large language models (LLMs). Typically, data characterize the operating environment, optimization selects parameters within a prespecified inventory policy class, and LLMs support coding and decision analysis. We develop an integrated framework that combines these resources to automate inventory policy design. Given demand data, the framework iteratively uses an LLM to generate parameterized policy classes and an external solver to optimize its parameters within each class. Across 30 lost-sales inventory instances, the mean cost reduction relative to optimized base-stock benchmarks increases from 17.5% after one generation to 30.0% after ten generations. Parameter optimization is central to this performance: an LLM-only variant performs substantially worse, whereas optimization-guided feedback improves policy quality, accelerates search, and directs the LLM toward better policy classes rather than merely better parameter values within a fixed class. The strongest discovered policies are also interpretable: they combine recognizable inventory-control motifs, including capped orders, discounted or weighted pipeline inventory, and threshold-based replenishment logic. The search thereby produces new policy-class functional forms that, to our knowledge, have not previously been studied in the lost-sales inventory literature. These functional forms are not specified ex ante but emerge from the search process. Moreover, after their parameters are re-optimized, three discovered policy classes achieve average cost reductions of 21.75% to 22.60% across 10,064 new inventory instances. Overall, the results show that data-driven parameter optimization can guide LLM-based search over a broad space of inventory policy classes and identify high-performing, interpretable, and transferable decision rules.
1. Introduction
The paper integrates data, numerical optimization, and LLMs to search beyond prespecified inventory policy classes. Its AIPS framework discovers interpretable and transferable replenishment rules while using optimization to guide the search.
- Motivation: Inventory policy design separates choosing a policy class from optimizing parameters within that class.Existing practice often selects policy classes heuristically, potentially sacrificing performance.
- Research gap: Existing methods do not provide a general mechanism for systematically searching beyond researcher-specified policy classes.This motivates automated discovery of previously unexplored functional forms.
- Optimization-guided search: Optimization improves both individual policy performance and the feedback directing the LLM toward increasingly effective policy classes.The study distinguishes better policy classes from merely better parameter values within previously generated classes.
- Approach: AIPS combines demand data, external numerical optimization, and an LLM to search executable inventory decision rules.The framework studies ex ante discovery of reusable policy classes for stationary lost-sales systems.
- Discovered structures: The strongest discovered classes are interpretable, repeatedly combining order caps, discounted or weighted pipeline inventory, and threshold-based replenishment motifs.These motifs emerge from the search rather than being specified by researchers in advance.
- Transferability: Discovered policy classes can outperform optimized base-stock benchmarks and remain effective on new inventory environments.The evaluation extends robustness beyond new demand realizations within a fixed environment to automatically generated policy classes across environments.
2. Model and Optimization Objective
The paper models a finite-horizon, periodic-review lost-sales inventory system with deterministic lead time and pipeline inventory. It approximates unknown-demand optimization using sample-average costs and restricts decisions to parameterized stationary policy classes.
- Inventory model: The model is a single-item, periodic-review inventory system with finite horizon, deterministic lead time, stochastic demand, and lost sales.Orders enter a pipeline, arrive after the lead time, and unmet demand is lost.
- Cost objective: Each period incurs holding cost for leftover inventory and lost-sales cost for unmet demand.The objective uses unit holding cost h and lost-sales cost p.
- Policy representation: Stationary Markov policies map the current inventory state, including on-hand and pipeline inventory, to a feasible order quantity.Stationarity removes explicit dependence on time, while the Markov property restricts relevant history to the current state.
- Optimization objective: The policy objective minimizes expected cumulative cost over feasible replenishment policies.The expectation is taken over the demand distribution and the policy-induced inventory trajectory.
- Data-driven optimization: Unknown demand is handled with sample-average approximation using observed demand sample paths and a common empirical criterion for comparing policies.Evaluating all candidates on the same trajectories supports empirical policy comparison.
- Parameterized policy classes: Parameterized policy classes make the infinite-dimensional policy space tractable by separating functional-form design from within-class parameter optimization.The functional form determines how inventory state enters the rule, while parameters select a particular policy.
3. LLM-Guided Inventory Policy Search
AIPS integrates LLM-generated policy-class design with external parameter optimization in an evolutionary search, allowing the search to explore policy structures rather than only tune parameters within fixed classes.
- Framework: AIPS combines LLM policy-class generation, numerical parameter optimization, and evolutionary feedback into an integrated inventory-policy search procedure.At each generation, the LLM proposes classes, an optimizer searches their feasible parameter domains, and high-performing policies guide later proposals.
- Policy-class design and optimization: The LLM generates parameterized policy classes, while the external optimizer selects low-cost parameters within each generated class.The optimizer cannot change structural features such as state variables, transformations, algebraic operations, or branch conditions.
- Evolutionary feedback: High-performing optimized policies become parent policies that guide subsequent policy-class generation in the evolutionary loop.The algorithm selects strong policies, creates offspring proposals, optimizes them, and retains the K lowest-cost policies for the next generation.
- Policy-class design and optimization: Each proposal includes a policy class, feasible parameter domain, and initial parameter vector, with parent policies supplying structural and performance feedback.Parent information includes functional forms, optimized parameters, and empirical costs; the LLM uses this information to propose subsequent classes.
- Search roles: The LLM primarily searches across policy structures, whereas Optimize searches for effective parameter values within each structure.This separation directs feedback toward new policy classes rather than merely better parameter values within previously generated classes.
- Search roles: Within-class optimization evaluates parameter vectors on fixed training trajectories, so empirical-cost differences are not caused by demand resampling.Because computation is finite, the numerical routine is not assumed to reach a local or global optimum.
- Evolutionary feedback: AIPS initializes the search with an optimized base-stock policy and iteratively retains policies with the lowest empirical training costs.The search is governed by the surviving-pool size K, proposals per generation M, maximum parents m, and number of generations G.
4. Performance and Structure of Discovered Policies
AIPS improves cost reductions over generations and discovers interpretable policies whose gains vary with lead time, cost setting, and demand variability. The strongest policies distinguish pipeline positions and moderate replenishment responses through recurring structural motifs.
- Performance Results: 17.5% to 30.0%: mean cost reduction rises from generation 1 to generation 10, with 84.8% of the total increase realized by generation 5.The search rapidly identifies effective policy structures, followed by smaller refinements.
- Performance Results: 44.1%: generation-10 mean reduction for L = 6, versus 15.1% for L = 2 and 30.7% for L = 4.Cost reduction increases with generation for all three lead times, and the distributions shift broadly rather than because of a few extreme outcomes.
- Performance Results: 33.6% versus 26.3%: generation-10 mean reductions under (h,p) = (1,2) and (h,p) = (1,5), respectively.The larger gains under (h,p) = (1,2) are consistent with greater value from refining inventory adjustments when excess inventory is relatively costly.
- Performance Results: 48% and 45%: generation-10 reductions under Poisson demand and Normal demand with σ = 10, compared with 12% under Exponential demand.Within the Normal family, gains decline monotonically with demand variability, while Poisson and low-variability Normal demand perform similarly.
- Structural Analysis: 49.0%: pipeline weighting appears in the full sample, while nonlinear pipeline composition appears in 28.0% overall and 39.1% in generations 8–10.These policies distinguish among pipeline positions rather than assigning equal importance to all outstanding orders.
- Structural Analysis: 56.5%: order clipping appears in generations 8–10, while partial adjustment appears in 47.8%; sampled policies contain 3.31 motifs on average.The motifs moderate replenishment responses and typically appear in combination.
5. Cross-Environment Generalization
AIPS transfers discovered policy-class functional forms across environments, re-optimizing their parameters for each target instance. Three classes generalize strongly across demand distributions, lead times, and cost ratios, while their relative performance varies by operating regime.
- Generalization design: AIPS transfers each functional form and re-optimizes its parameters on a new target instance before comparison with that instance’s optimized base-stock policy.Targets may differ in demand distribution, cost parameters, and lead time.
- Discovered policy classes: Three discovered classes—capped, discounted-pipeline, and hybrid—recombine pipeline-weighting, partial-adjustment, constant-order, and order-clipping motifs.Their functional forms, rather than reference-instance parameter values, are transferred and recalibrated.
- Overall results: 21.75% to 22.60% mean cost reductions are achieved by the three transferred classes across new instances after parameter re-optimization.The corresponding mean policy ranks are 1.93, 2.17, and 2.01, compared with 3.89 for base stock.
- Lead-time effects: 34.90% is the capped class’s mean cost reduction at L = 8, compared with 34.70% for discounted-pipeline and 34.94% for hybrid.Across all three classes, cost-reduction distributions shift upward as lead time increases.
- Lead-time effects: All three classes substantially outperform optimized base stock across lead times, with the advantage becoming especially pronounced at long lead times.The hybrid class gains a slight relative advantage as the pipeline lengthens.
- Cost-ratio effects: Mean cost reductions decline as R increases, from 26.93% to 18.81% for capped, 26.80% to 17.08% for discounted-pipeline, and 26.95% to 17.63% for hybrid.The advantage remains substantial across cost ratios but narrows as lost sales become more expensive.
6. Value of Optimization
The external optimizer improves AIPS not only by calibrating parameters, but also by guiding the evolutionary search toward better policy classes. It improves final performance and convergence speed, and final-step calibration alone recovers only a small part of its advantage.
- Experimental comparison: External optimization evaluates each LLM-generated policy class after searching its feasible parameter set, then uses the optimized result for selection and feedback.Without optimization, the LLM-supplied parameter vector is evaluated directly.
- Convergence speed: 7.5 versus 15.0 generations are the median convergence times with and without optimization, while mean times are 6.8 versus 11.6 generations.The interquartile ranges are [5,9] and [4,18], respectively.
- Parameter calibration versus search guidance: Optimization-guided feedback changes which classes survive, become parents, and influence later LLM proposals during evolutionary search.Final-step optimization cannot recover promising classes discarded earlier or never reached.
- Parameter calibration versus search guidance: Only 1.1 of 72.9 percentage points are recovered for Poisson demand, essentially none of 16.1 for Exponential, and 3.1 of 43.8 for Normal.Final-step parameter optimization therefore closes only a small fraction of the performance gap.
- Implications: The optimizer supports within-class calibration, faster convergence, and—most importantly—better feedback for policy-class search.Discovered functional forms can transfer across environments, but their parameters must be recalibrated in new environments.
7. LLM Backbone Ablation
AIPS performance varies substantially across LLM backbones, reflecting differences in the quality and speed of policy-class search. External optimization improves every backbone, although it does not eliminate differences in structural-search quality.
- Backbone performance: Gemini 3 Flash achieves about 45% mean cost reduction in generation 1 and remains around 46%, while GPT-5 Mini approaches 46% by generation 10.DeepSeek V3 rises from about 34% initially to approximately 45% by generation 10.
- Backbone performance: Gemini 2.5 Flash-Lite improves from about 3% to 23%, whereas GPT-5 Nano rises from about 16% to 42% across generations.Grok 4.1 Fast Non-Reasoning reaches approximately 34% by the final generation.
- Interaction with optimization: 42% versus 16% is GPT-5 Nano’s mean cost reduction with optimization by generation 10 versus without optimization after 20 generations.Comparable optimizer-enabled versus no-optimizer gaps appear for the other backbones.
- Interaction with optimization: Gemini 3 Flash is an exception: without optimization, its mean cost reduction rises from about 20% to above 40%, approaching roughly 46% with optimization.This suggests relatively effective initial parameter values alongside strong policy structures.
- Interpretation: The LLM determines which policy classes enter the search, while the optimizer reveals how well those classes perform after parameter calibration.Optimization improves every backbone but cannot fully eliminate differences in structural-search quality.
8. Conclusion
AIPS combines LLM-generated replenishment-policy classes, numerical optimization, and empirical evaluation to search beyond prespecified inventory policies. Across lost-sales settings, it discovers interpretable, transferable classes and shows that optimization materially improves structural search and realized performance.
- Framework: AIPS uses an LLM to generate parameterized replenishment-policy classes, an optimizer to search within each class, and empirical performance to guide later structural search.The framework is evaluated on lost-sales inventory systems with positive lead times.
- Interpretability: The discovered policies repeatedly combine interpretable inventory-control motifs, including richer pipeline representations, partial adjustment, clipping, thresholding, and state-dependent replenishment.These structures are presented as alternatives to opaque black-box rules.
- Transferability: Different motif combinations perform best under different inventory conditions, while the discovered structures remain reusable policy classes rather than instance-specific rules.Their relative performance varies systematically across operating regimes.
- Optimization: Numerical optimization calibrates parameters, accelerates convergence, and improves the feedback used to select and evolve policy classes.Optimization therefore contributes to structural search, not only within-class parameter fitting.
- Implications and scope: The framework suggests that LLMs can complement domain-specific knowledge by adding, combining, and refining structural motifs starting from expert-designed policies.The paper identifies extensions to nonstationary demand, stochastic lead times, capacity constraints, multi-item systems, and multi-echelon networks as future work.
This page is intentionally blank. Proper e-companion title page, with INFORMS branding and exact metadata of the main
This page contains publication-production material rather than substantive research content.
- The page is reserved for the e-companion title page and issue-assembly metadata.
EC.1. Prompt Template
The prompt defines a finite-horizon lost-sales inventory simulator and specifies how the LLM must generate strictly stationary, parameterized policy code. Policies are evaluated by average selling-phase cost on historical demand trajectories.
- Problem setup: The inventory system has a T-period selling horizon and deterministic lead time L, with orders arriving L periods after placement.The prompt separates a no-demand planning phase from the cost-incurring selling phase.
- State transitions: At each period, the manager observes on-hand inventory and a FIFO pipeline vector, places an order, realizes demand, and updates inventory and pipeline orders.The pipeline shifts forward each period, while the new order enters its last slot.
- Evaluation objective: The objective is to minimize average total holding and lost-sales cost across historical demand trajectories during the selling phase.The simulator returns average total cost over the historical trajectories.
- Parameterized policy generation: The prompt exposes code parameters for external optimization, limiting marked optimizable parameters to ten and requiring bounds and types on assignment lines.The generated function accepts current inventory and pipeline orders and returns the current order amount.
- Policy constraints: Generated policies must be strictly stationary: order quantities may depend only on current on-hand inventory and pipeline orders, not time, trajectory index, or hidden memory.The function must always return a finite nonnegative integer order quantity.
EC.2. Additional Results for Section 4
This section documents how additional results are tabulated across problem instances and generations, including uncertainty estimates and instance labels for demand, lead time, and cost settings.
- Reporting format: Table EC.1 reports mean cost-reduction percentages and standard errors across problem instances and generations.Each instance uses two rows: the mean across ten repeats followed by its standard error.
- Instance labels: Instance labels encode demand family, lead time, lost-sales cost ratio, and Normal-demand variability.Exp denotes Exponential demand; L2, L4, and L6 denote lead times; CR2 and CR5 denote p/h ratios; Normal10, Normal30, and Normal50 denote σ values.
EC.3. Construction of the Robustness Demand Set
The robustness set spans diverse demand distributions, lead times, and lost-sales penalties, yielding 10,064 distinct inventory test environments with separate training and test trajectories.
- Demand specifications: The construction covers 13 parametric demand families with variation in boundedness, discreteness, variability, skewness, and tail behavior.Each demand specification is defined by a distribution family and family-specific parameters.
- Trajectory generation: For each demand specification, the procedure generates integer-valued trajectories of length T = 50, rounding continuous draws to the nearest integer and handling negative rounded values.
- Training and testing: Each specification has 100 training trajectories for policy-parameter optimization and 1,000 separate test trajectories for out-of-sample evaluation.
- Inventory environments: Each demand specification is evaluated under four lead times and four lost-sales penalties, producing 16 inventory environments per specification.The unit holding cost is fixed at h = 1.
- Dataset scale: 629 demand specifications generate 10,064 distinct inventory test environments.The total is obtained by combining 629 specifications with 4 lead times and 4 lost-sales penalties.
EC.4. Test-Set Performance for the Value of Optimization
Test-set performance closely matches training-set performance, and external numerical optimization significantly improves the AIPS algorithm. The comparison evaluates no-optimizer results at generation 20 against optimizer-enabled results at generation 10.
- Test-set performance is very close to the training-set performance reported in the main body.
- No-optimizer results are evaluated at generation 20, whereas optimizer-enabled results are evaluated at generation 10.
- External optimization significantly improves the test-set performance of the proposed AIPS algorithm.
EC.5. LLM Backbone
Across six LLM backbones, numerical optimization improves both the level and speed of cost-reduction performance. The test-set results reinforce the in-sample findings, although performance varies substantially across backbones and experimental runs.
- Optimization improves both the level and speed of performance across all six LLM backbones.
- At generation 10, mean cost reduction with optimization is 41.9% for GPT-5 Nano, 46.1% for GPT-5 Mini, 45.5% for DeepSeek, and 33.5% for Grok 4.1 Fast.
- Reported standard errors show substantial heterogeneity across problem instances and repeats, particularly for stronger-performing backbones.
- With optimization, mean test-set cost reduction ranges from 21.2% for Gemini 2.5 Lite to 45.6% for Gemini 3 Flash.
- Without optimization, mean test-set cost reductions are substantially lower for most backbones, including 14.8% for GPT-5 Nano and 15.0% for GPT-5 Mini.
- Gemini 3 Flash remains the main exception without the external optimizer, achieving 41.9% even without optimization.