Improving Constraint Models with LLM Agents
On the map: LLM agents and tool use → General LLM agent frameworks and benchmarks
Abstract (arXiv)
The runtime of Constraint Programming (CP) solvers is highly sensitive to modeling choices, such as symmetry breaking, implied constraints, global constraints, constraint reformulation, and variable representation. Improving these constraint models has traditionally required human expertise, and existing automated reformulation systems are restricted to a predefined library of hand-crafted transformation rules. We introduce an agentic framework that instead reformulates a constraint model from an open-ended space and establishes correctness empirically rather than by construction: a Large Language Model (LLM) agent, given a model and three training instances, proposes alternative formulations, validates each by injecting its solution back into the original model, and diagnoses and repairs failures, returning the best variant it finds in a median of about fifteen minutes. The models are expressed in the CPMpy modeling library, and each proposed model is evaluated on three larger test instances. Across nine combinatorial optimization problems, the generated models outperform the originals on 21 of 27 test instances, and on some problems solve more than two orders of magnitude faster. A comparison against non-agentic baselines that reuse the same validation and selection tools indicates that the gains stem from the agent's iterative diagnosis and repair, not merely from sampling several candidates. These results demonstrate that autonomous agentic methods can support the improvement of constraint models.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in General LLM agent frameworks and benchmarks, one of 16 directions in LLM agents and tool use. Builds on 5 of its 28 references that are in the map. First posted on arXiv 8 Aug 2026.
Builds on
5 of 28 references.
References · 5
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2024Combining Constraint Programming Reasoning with Large Language Model Predictionscited by 8
- 2024Generating Streamlining Constraints with Large Language Modelscited by 7
- 2025CP-Agent: Agentic Constraint Programmingcited by 6
- 2025When Words Change the Model: Sensitivity of LLMs for Constraint Programming Modellingcited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026CP-SynC: Multi-Agent Zero-Shot Constraint Modeling in MiniZinc with Synthesized Checkers
- 2025Gala: Global LLM Agents for Text-to-Model Translation
- 2026ConstraintBench: Benchmarking LLM Constraint Reasoning on Direct Optimization
- 2025A Reality Check of Language Models as Formalizers on Constraint Satisfaction Problems
- 2024Testing and Understanding Erroneous Planning in LLM Agents through Synthesized User Inputs
- 2025Learn to Relax with Large Language Models: Solving Constraint Optimization Problems via Bidirectional Coevolution
- 2026Agentic AI-Assisted Modeling for Production Scheduling: Assessment in Constraint Programming
- 2025HeuriGym: An Agentic Benchmark for LLM-Crafted Heuristics in Combinatorial Optimization