Agentic AI
AI Agents Learn to Optimize Complex Constraint-Solving Models
Researchers show that LLM agents can autonomously improve constraint programming models by proposing and testing reformulations, achieving speedups of over 100x on some problems.
Researchers have developed a novel framework in which Large Language Model agents can autonomously refine constraint programming (CP) models—a critical task in combinatorial optimization that has long required significant human expertise.
The Challenge of Model Design#
Constraint Programming solvers are highly dependent on how a problem is formulated. Choices about symmetry breaking, implied constraints, global constraints, and variable representation can dramatically affect solution speed. Traditionally, optimizing these decisions has fallen to skilled engineers who manually craft better formulations. Existing automated systems, meanwhile, are limited to applying a pre-existing set of hand-coded transformation rules.
How the Agentic Framework Works#
The new approach uses an LLM agent working with the CPMpy modeling library to reformulate constraint problems from an open-ended space. Rather than proving correctness mathematically, the system validates each proposed variant empirically—by checking whether solutions work when reinjected into the original model. The agent operates iteratively: it generates alternative formulations based on a small set of three training instances, tests each candidate, diagnoses why failures occur, and repairs problems it discovers. The process typically completes within about fifteen minutes, after which the best-performing variant is selected.
Strong Empirical Results#
Testing across nine combinatorial optimization problems revealed that the AI-generated models outperformed hand-crafted originals on 21 out of 27 test instances. On several problems, the improvements were dramatic, with solution times dropping by more than two orders of magnitude. Comparisons with non-agentic baselines—systems using the same validation and selection methods but without iterative diagnosis and repair—showed that the agent's superior performance came from its autonomous refinement process, not simply from evaluating multiple random candidates.
Implications for Optimization#
These findings suggest that autonomous, agentic methods can meaningfully accelerate the improvement of constraint models, potentially reducing the burden on human experts and opening new avenues for optimizing hard computational problems.

