๐ค AI Summary
This work addresses the challenge that existing large language models often introduce redundant or missing constraints when translating constraint-intensive operations research optimization problemsโsuch as the Vehicle Routing Problem (VRP)โinto executable code, primarily due to reliance on objective-value consistency alone. To remedy this, the authors propose a constraint injection mechanism featuring a dual verification framework composed of a feasibility probe and a single-constraint violation probe, which precisely identifies constraint errors in generated code. This mechanism is integrated into both data synthesis and reinforcement learning training pipelines. Leveraging this approach, they construct an expert-validated VRP benchmark encompassing 21 problem variants and train VRPCoder, an 8B-parameter end-to-end model. On four VRP benchmarks, VRPCoder achieves a Pass@1 accuracy of 93%, outperforming Gemini-3.1-Pro Preview, Claude-Sonnet-4.5, and current OR-focused LLMs by an average of 78 percentage points.
๐ Abstract
Large language models (LLMs) increasingly translate natural-language optimization problems into executable solver code. Yet for constraint-dense operations research (OR) problems, existing data-filtering and training pipelines largely rely on objective-equivalence signals such as differential testing and answer agreement, which a program can pass while adding spurious constraints or silently omitting required ones, whenever those constraints are non-binding on the tested instance. We propose constraint injection, which uses feasible probes to expose spurious over-constraint and one-constraint-violating probes to reveal silent constraint omission. Combined with differential testing, it forms a dual verifier. We instantiate and evaluate it on vehicle routing problems (VRPs), a representative constraint-dense combinatorial optimization testbed with coupled operational constraints. We develop VRPCoder, an 8B end-to-end model that translates natural-language VRP scenarios into Gurobi scripts, together with an expert-verified VRP benchmark suite covering 21 variants. The verifier is reused as a rejection-sampling filter during data synthesis and as a per-rollout reward in group relative policy optimization (GRPO). Across four VRP benchmarks, VRPCoder-GRPO reaches 93\% average Pass@1, outperforms Gemini-3.1-Pro Preview on three benchmarks, exceeds Claude-Sonnet-4.5 by 28 average points, and surpasses prior OR-LLMs by 78 average points.