Skip to content
Preprint

CAPO: Constraint-Aware Prompt Optimization for LLM Agents

Aug 2026 · 0 citations · 47 references
Computer Science

TL;DR

This work introduces 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.

Abstract

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.

View source

Similar papers

Preprint Jul 2026

TAPR: Enhancing LLM Performance with a Task-Aware Prompt Rewriter

This work introduces a Task-Aware Prompt Rewriter (TAPR), a model that reformulates user prompts into task-optimized prompts with the explicit goal of improving downstream LLM performance.

Oliver Savolainen, E. Bastianelli, H. Azarbonyad · 1 citation
#natural language process... Preprint Jul 2026

SyRuP: Enhancing System-Prompt Following via Reward-Guided Prediction in LLM Decoding

SyRuP is introduced, a decoding-time framework for improving system-prompt adherence while keeping the base LM frozen, and results suggest that explicit token-level guidance is an effective and practical mechanism for reliable system-prompt following.

Seoyeon Kim, Minjae Kang, Jaehyung Kim · 0 citations
Book Open access May 2026

LLM Agents Factory: Retrieval of Domain-Specific LLM Agents

This work reveals that retrieval from a structured agent repository provides a cost-efficient, accurate, and controllable alternative to dynamic agent generation, responding to the strict demands of industrial applications.

Vitalii Belov, Artyom Sosedka, Andrey Sakhovskiy et al. · 0 citations
Preprint Aug 2026

From Profiling to Synthesis: Benchmarking Implicit Behavioral Alignment in Personalized LLM Agents

IBA-Bench is introduced, a benchmark for implicit behavioral alignment constructed from longitudinal interaction histories that contain noise, implicit cues, and temporal inconsistencies, and the proposed IBA-Agent is proposed, an agent framework that reconciles conflicting priorities through broad retrieval and trajectory-level alignment.

Jiajia Song, Bobo Li, Haiwen Yi et al. · 0 citations
Preprint Jul 2026

AgentOmnia: Scaling Agentic Models for Full-Scenario Applications

A one-round study provides initial evidence for PRD-guided self-evolution, motivating validation at larger scales and in industrial settings, and presents AgentOmnia, a framework coordinating task-space definition, data synthesis, post-training, evaluation, and improvement across To-Consumer (ToC), To-Business (ToB), and To-Employee (ToE) applications.

Hao Jiang, Gangtao Xin, Ying Huang et al. · 0 citations
Preprint Aug 2026

RLMOpt: Adaptive Prompt Optimization via Recursive Language Models

RLMOpt is introduced, a prompt optimizer that makes the search policy itself language-model-driven through a recursive language model (RLM), which operates over a tool-based environment, inspecting task information, analyzing failures, generating candidates, allocating evaluation budget, and deciding when to stop.

Subhash Bangalore Satheesha, Nirvik Pande, Deepthi Duddempudi et al. · 0 citations