Abstract
Supply chain optimization models frequently become infeasible because of modeling errors. Diagnosis and repair require scarce OR expertise: analysts must interpret solver diagnostics, trace root causes across echelons, and fix formulations without sacrificing operational soundness. Whether AI agents can perform this task remains untested. We decompose this task into two phases: a domain-agnostic feasibility phase that iteratively repairs any LP using IIS-guided diagnosis, and a domain-specific validation phase that enforces five rationality checks grounded in inventory theory. We test 22 API models from seven families on 976 multi-echelon supply chain problems and train two 8B-parameter models with self-taught reasoning and solver-verified rewards. The trained models reach 81.7% Rational Recovery Rate (RRR) -- the fraction of problems resolved to both feasibility and operational rationality -- versus 42.2% for the best API model and 21.3% on average. The gap concentrates in Phase 1 repair, where API models average 27.6% recovery rate versus 97.2% for trained models. Two gaps separate current AI from reliable model repair: solver interaction, as API models restore only 27.6% of infeasible formulations; and operational rationale, as roughly one in four feasible repairs violate supply chain theory. Each gap requires a different intervention -- targeted training closes the solver interaction gap, while explicit specification as solver-verifiable checks closes the rationality gap. For organizations adopting AI in operational planning, formalizing what 'rational' means in their context is the higher-return investment.
Introduction: The Challenge of Infeasible Models
In Operations Research (OR), building a multi-echelon supply chain model is a high-stakes balancing act. A single typo in a lead time or a capacity constraint can cause a solver like Gurobi to return an "Infeasible" status. Traditionally, fixing these models requires scarce human expertise. Analysts must interpret complex solver diagnostics like the Irreducible Infeasible Subsystem (IIS), trace root causes across multiple stages, and ensure that the "fix" is not only mathematically valid but also operationally sound. Existing AI models often struggle with this iterative loop, either failing to restore feasibility or proposing solutions that violate basic business logic—such as a warehouse holding inventory far beyond its physical capacity.
Methodology: The OptiRepair Framework
To bridge the gap between mathematical feasibility and operational reality, we introduce OptiRepair, a two-phase architecture designed for closed-loop model repair.
- Phase I: Diagnose and Repair (Domain-Agnostic): The agent receives an infeasible model and iteratively queries the solver for IIS feedback. It identifies conflicting constraints and applies repairs—such as relaxing bounds or dropping redundant constraints—for up to 20 turns.
- Phase II: Validate (Domain-Specific): Once a model is feasible, it must pass a Rationality Oracle. This oracle enforces five checks grounded in inventory theory: base-stock structure, bullwhip ratio, inventory allocation, cost consistency, and order smoothing. If a check fails, the agent receives natural-language feedback and returns to the repair loop.
To optimize performance, we developed OptiSTaR, a training pipeline utilizing iterative self-taught reasoning (STaR) and Group Relative Policy Optimization (GRPO). Models are trained using "solver-verified rewards," where the environment itself validates if a repair is successful and rational.
The OptiRepair-SC Benchmark
We evaluated our approach using OptiRepair-SC, a comprehensive benchmark of 976 multi-echelon supply chain problems. These problems span 2–5 echelons and 12–24 planning periods. A "saboteur" module injects 10 distinct types of modeling errors (ME-1 through ME-10), ranging from simple sign errors to complex index mismatches that require tracing dependencies across the entire supply chain. We compared our specialized models against 22 frontier API models from seven different families.
Performance and Key Insights
The primary metric for success is the Rational Recovery Rate (RRR), representing the fraction of problems resolved to both feasibility and operational rationality.
Our results reveal several critical findings:
- Specialization Trumps Scale: A specialized 8B-parameter model significantly outperformed massive frontier models. The trained pipeline reached 81.7% RRR, nearly doubling the 42.2% achieved by the best API models (GPT-5.2 and Gemini 2.5 Pro).
- The "Rationality Gap": Feasibility alone is insufficient. Approximately 25% of successful repairs by standard API models resulted in operationally irrational policies. This underscores the need for explicit guardrails that reflect the "physics" of the domain.
- The Solver Interaction Bottleneck: General LLMs struggle primarily in Phase I. They often fail to interpret IIS signals, succeeding only 27.6% of the time compared to the 97.2% success rate of specialized models.
- Efficiency Gains: Specialized models were not only more accurate but also 2–3x more efficient in steps and required 6–19x fewer tokens than API baselines.
Conclusion and Future Work
OptiRepair demonstrates that targeted training and formal rationality checks can enable LLM agents to perform complex OR tasks. However, limitations remain. Current benchmarks focus on serial topologies and deterministic demand; real-world networks are often more complex and stochastic. Future work will extend this framework to Mixed-Integer Programming (MIP) and explore multi-agent architectures where AI collaborates with human experts to resolve the most challenging error types. For organizations, the highest-return investment lies in formalizing "rationality" within their specific operational contexts to enable automated verification.
Summary updated