Szeider, S. (2026). CP-Agent: Agentic Constraint Programming. In LLM4Code ’26: Proceedings of the 3rd International Workshop on Large Language Models For Code (pp. 6–13). Association for Computing Machinery. https://doi.org/10.1145/3786181.3788711
E192-01 - Forschungsbereich Algorithms and Complexity E056-13 - Fachbereich LogiCS E056-23 - Fachbereich Innovative Combinations and Applications of AI and ML (iCAIML)
-
Published in:
LLM4Code '26: Proceedings of the 3rd International Workshop on Large Language Models For Code
-
ISBN:
979-8-4007-2412-1
-
Date (published):
6-Jul-2026
-
Event name:
3rd International Workshop on Large Language Models for Code (LLM4Code 2026)
en
Event date:
12-Apr-2026 - 18-Apr-2026
-
Event place:
Rio de Janeiro, Brazil
-
Number of Pages:
8
-
Publisher:
Association for Computing Machinery, New York
-
Peer reviewed:
Yes
-
Keywords:
Natural Language Processing; Benchmark; Constraint Programming
en
Abstract:
The translation of natural language to formal constraint models requires expertise in the problem domain and modeling frameworks. To explore the effectiveness of agentic workflows, we propose CP-Agent, a Python coding agent that uses the ReAct framework with a persistent IPython kernel. We provide the relevant domain knowledge as a project prompt of under 50 lines. The algorithm works by iteratively executing code, observing the solver’s feedback, and refining constraint models based on execution results. We evaluate CP-Agent on 101 constraint programming problems from CP-Bench. We made minor changes to the benchmark to address systematic ambiguities in the problem specifications and errors in the ground-truth models. On the clarified benchmark, CP-Agent achieves perfect accuracy on all 101 problems. Our experiments show that minimal guidance outperforms detailed procedural scaffolding. Our experiments also show that explicit task management tools can have both positive and negative effects on focused modeling tasks.