CAPO: Constraint-Aware Prompt Optimization for LLM Agents
On the map: LLM agents and tool use → General LLM agent frameworks and benchmarks
Abstract (arXiv)
Large language models (LLMs) are increasingly deployed as agents that rely on system prompts to use tools and complete tasks. Such deployments impose distinct operational requirements, including appropriate tool use, concise prompts and solution paths, and compliance with safety and formatting policies. For many practitioners, however, assembling domain-specific supervised data to post-train models to meet these requirements is infeasible. We introduce CAPO (Constraint-Aware Prompt Optimization), a primal-dual method that combines pool-based rewrites with adaptive constraint weighting to optimize system prompts under explicit operational constraints. Across agentic benchmarks, CAPO more reliably reaches empirically feasible operating points while improving task performance. CAPO also generalizes beyond agentic settings, achieving strong results on assistant-style evaluations with output-format and safety/privacy constraints. We further introduce DCAPO (Dynamically Trained CAPO), which trains a feedback- and dual-conditioned rewriter with pool-based GRPO while keeping the task agent frozen. Across task agents of different sizes, DCAPO produces a feasible prompt in every evaluated domain and matches or improves the task accuracy achieved by the evaluated baselines. A surrogate analysis characterizes how finite-pool and discrete-rewrite errors enter the inexact primal-dual procedure.
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 36 of its 47 references that are in the map. First posted on arXiv 17 Aug 2026.
Builds on
36 of 47 references.
References · 36
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 9,379
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,915
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
- 2016Categorical Reparameterization with Gumbel-Softmaxcited by 2,739
- 2016The Concrete Distribution: A Continuous Relaxation of Discrete Random Variablescited by 1,148
- 2017Constrained Policy Optimizationcited by 983
- 2023Large Language Models as Optimizerscited by 864
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 653
- 2025τ2-Bench: Evaluating Conversational Agents in a Dual-Control Environmentcited by 627
- 2025GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learningcited by 542
24 more
- 2018Reward Constrained Policy Optimizationcited by 417
- 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 411
- 2025Agentic Context Engineering: Evolving Contexts for Self-Improving Language Modelscited by 398
- 2022RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learningcited by 366
- 2026SkillRL: Evolving Agents via Recursive Skill-Augmented Reinforcement Learningcited by 278
- 2025AReaL: A Large-Scale Asynchronous Reinforcement Learning System for Language Reasoningcited by 250
- 2024OR-Bench: An Over-Refusal Benchmark for Large Language Modelscited by 244
- 2017Lexically Constrained Decoding for Sequence Generation Using Grid Beam Searchcited by 237
- 2025Generalizing Verifiable Instruction Followingcited by 194
- 2018Fast Lexically Constrained Decoding with Dynamic Beam Allocation for Neural Machine Translationcited by 182
- 2020NeuroLogic Decoding: (Un)supervised Neural Text Generation with Predicate Logic Constraintscited by 149
- 2020Provably Efficient Safe Exploration via Primal-Dual Policy Optimizationcited by 134
- 2026Ministral 3cited by 114
- 2026EvoSkill: Automated Skill Discovery for Multi-Agent Systemscited by 107
- 2025Reinforcement Learning for Self-Improving Agent with Skill Librarycited by 100
- 2022Controllable Natural Language Generation with Contrastive Prefixescited by 75
- 2023InstructZero: Efficient Instruction Optimization for Black-Box Large Language Modelscited by 68
- 2026SkillGrad: Optimizing Agent Skills Like Gradient Descentcited by 26
- 2024StablePrompt: Automatic Prompt Tuning using Reinforcement Learning for Large Language Modelscited by 14
- 2026ReSkill: Reconciling Skill Creation with Policy Optimization in Agentic RLcited by 14
- 2024MOPO: Multi-Objective Prompt Optimization for Affective Text Generationcited by 9
- 2022FAST: Improving Controllability for Text Generation with Feedback Aware Self-Trainingcited by 7
- 2025JAM: Controllable and Responsible Text Generation via Causal Reasoning and Latent Vector Manipulationcited by 5
- 2025Agentic Policy Optimization via Instruction-Policy Co-Evolutioncited by 3
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025Self-Supervised Prompt Optimization
- 2025Towards more Contextual Agents: An extractor-Generator Optimization Framework
- 2025AutoPDL: Automatic Prompt Optimization for LLM Agents
- 2025MA-SAPO: Multi-Agent Reasoning for Score-Aware Prompt Optimization
- 2025MAPRO: Recasting Multi-Agent Prompt Optimization as Maximum a Posteriori Inference
- 2026CAPO: Critic-Guided Action-Aligned Policy Optimization for Advancing LLM Agent Capabilities
- 2026MASPO: Joint Prompt Optimization for LLM-based Multi-Agent Systems
- 2026Enhancing LLM Instruction Following: An Evaluation-Driven Multi-Agentic Workflow for Prompt Instructions Optimization