Source-linked AI summary

AgentGrad: Intervention-guided Prompt Optimization for Multi Agent Systems

Jaewon Chu, Jinwoo Seo, Jaewon Cho, Jeehye Na, Yunyang Xiong, Youngdae Kim, Hyunwoo J. Kim

arXiv:2609.08572v1cs.AI

TL;DR

Textual gradient methods for MAS prompt optimization have limitations in identifying responsible prompts, supervising intermediate agent outputs, and aggregating unrelated failures. AgentGrad addresses these gaps with sequential intervention and semantic textual gradient abstraction, achieving state-of-the-art performance across five benchmarks while reducing optimization time by 2.5× on average.

  • Problem

    Existing MAS textual-gradient methods do not verify which agent's prompt can resolve a failure, lack direct agent-level intermediate supervision, and may mix unrelated failure modes during aggregation.

  • Method

    AgentGrad sequentially intervenes on agents to identify the target agent and use its adjusted output as pseudo-label supervision, then clusters similar gradients into generalized corrective gradients.

  • Results

    AgentGrad achieves state-of-the-art performance across five MAS benchmarks and reduces wall-clock optimization time by 2.5× on average over the next-fastest baseline.

  • Takeaways & Limitations

    Consistent gains across proprietary and open-source backbones and diverse tasks indicate that AgentGrad's approach generalizes across the evaluated MAS settings.

  • Takeaways & Limitations

    Intervention hints use ground-truth outputs or final-output constraints during training, while optimized prompts are deployed without hint injection at inference.

Abstract

from arXiv · show

Large language model (LLM)-based multi-agent systems (MAS) achieve strong performance by employing specialized multiple agents, yet their performance depends on the prompt design of each agent. For MAS prompt optimization, textual gradient methods that guide prompt updates using natural-language feedback have emerged as a leading paradigm. In this paper, we identify limitations in two stages of existing textual gradient approaches: gradient extraction and gradient aggregation. In gradient extraction, previous works select a target prompt without verifying whether modifying it resolves the failure, and derive gradients without agent-level supervision over the corresponding agent's intermediate output. In gradient aggregation, individual gradients are randomly grouped and concatenated, often mixing unrelated failure modes and producing prompts that fail to generalize. To address these limitations, we propose \textbf{AgentGrad}, a prompt optimization framework for multi-agent systems based on sequential intervention and semantic textual gradient abstraction. For each failure, sequential intervention modifies the behavior of one agent at a time to identify the target agent whose modification resolves the failure. The modified output of the target agent then serves as agent-level supervision for extracting a fine-grained gradient. Semantic textual gradient abstraction clusters semantically similar gradients to prevent mixing unrelated failure modes, and abstracts each cluster into a generalized gradient that captures the shared corrective pattern. Experimental results show that AgentGrad achieves state-of-the-art performance across five MAS benchmarks and reduces wall-clock optimization time by $2.5\times$ on average compared to the next-fastest baseline.

1 Introduction

AgentGrad addresses weaknesses in textual gradient extraction and aggregation for multi-agent systems by identifying responsible agents, using agent-level supervision, and grouping gradients by shared corrective patterns.

  • Multi-agent systems use specialized agents to decompose difficult tasks, making each agent's prompt central to system behavior.
  • Existing methods select target prompts without verifying which agent can resolve a failure and derive gradients without supervision of intermediate outputs.
  • AgentGrad uses sequential intervention to identify the target agent and intervention-adjusted outputs to extract fine-grained gradients.
  • Semantic textual gradient abstraction groups sample-level gradients with shared corrective patterns into generalized gradients instead of randomly mixing failures.
  • Across five MAS benchmarks, AgentGrad achieves state-of-the-art performance and reduces wall-clock optimization time by 2.5× on average over the next-fastest baseline.

2 Related Works

Prior work spans automatic prompt optimization, failure attribution in multi-agent systems, and self-generated supervision, establishing the components that AgentGrad combines.

  • Automatic prompt optimization refines instructions or other textual inputs, extending from single prompts toward compound agent systems.
  • Failure attribution is difficult because system-level errors can arise from interactions among agents, creating a credit-assignment problem.
  • Self-generated supervision uses model-produced rationales, feedback, or reflections as optimization signals without dense human annotations.

3 Preliminaries

The preliminaries formulate MAS prompt optimization as reward-based search over agent prompts and define textual gradients as natural-language directions for prompt revision.

  • An MAS contains N LLM-based agents whose prompt collection P produces an output for each input.
  • Prompt optimization searches for the prompt set maximizing expected reward under a budget of B computationally expensive rollouts.
  • The optimized prompt set is evaluated on a held-out test set, with later agents receiving intermediate inputs constructed from preceding agents' outputs.
  • A textual gradient is a natural-language analog of a numerical gradient used to guide prompt updates.
  • An LLM gradient extractor critiques how a prompt should change, after which a separate optimizer aggregates sample-level gradients into an updated prompt.

4 Method

AgentGrad optimizes MAS prompts by locating the agent responsible for each failure, extracting agent-level textual gradients, and abstracting related gradients into coherent corrective directions.

  • Sequential intervention: Sequential intervention tests agents one at a time in reverse execution order to identify the target agent whose correction resolves each failure.Failures resolved by intervening on agent πn are assigned to that agent; unresolved cases continue to later steps.
  • Gradient extraction: Intervention-adjusted outputs serve as agent-level pseudo-labels for extracting fine-grained textual gradients from target-agent failures.Contrasting the original and corrected outputs under the same input isolates the behavioral change induced by intervention.
  • Gradient aggregation: Semantic textual gradient abstraction clusters semantically similar sample-level gradients and abstracts each cluster into a generalized gradient sharing its corrective pattern.The aggregator LLM performs clustering and abstraction together, producing coherent update directions instead of mixtures of unrelated failure modes.
  • Gradient aggregation: Cluster size controls abstraction granularity: larger clusters yield broader patterns, while smaller clusters yield finer-grained corrections.A soft lower bound on cluster size follows a cyclic schedule such as 5 → 3 → 1 → 5.
  • Prompt updates: Candidate prompt updates are evaluated on their semantic minibatch and then on a held-out validation set before acceptance.Updates are retained only when both evaluation stages show improvement.

5 Experiment

AgentGrad is evaluated across five MAS benchmarks, two backbone settings, ablations, optimization trajectories, efficiency, transferability, and qualitative examples. It consistently improves performance while reducing optimization time and producing more generalizable prompt updates.

  • Main Results: AgentGrad achieves state-of-the-art performance across five MAS benchmarks with both GPT-5-mini and Qwen3-8B.With GPT-5-mini, it improves over no optimization by +11.76 points on average; with Qwen3-8B, the average improvement is +9.67 points.
  • Ablation Studies: All three components contribute positively in ablations, with the full model performing best on HotpotQA and PUPA.Target identification, agent-level supervision, and semantic textual gradient abstraction provide complementary improvements over the vanilla baseline.
  • Optimization Trajectory: At 1,000 rollouts, AgentGrad reaches approximately 70% on HotpotQA, while GEPA requires over 6,000 rollouts to approach a comparable level.Its narrow confidence bands indicate more stable optimization across seeds, and the performance gap persists with additional rollouts.
  • Wall-clock Time Comparison: 136 minutes is AgentGrad’s average optimization time, making it 2.5× faster than GEPA and 4.7× faster than TextGrad.AgentGrad is fastest on all five benchmarks, including HotpotQA at 3.2× over GEPA and IFBench at 3.0×.
  • Efficiency and Generalization: AgentGrad has higher minibatch and validation improvement ratios than GEPA and TextGrad, reaching 0.72 and 0.27 respectively.The higher minibatch ratio increases rollout usage per unit time, while the higher validation ratio indicates more reliable generalization of accepted updates.
  • Transferability and Qualitative Results: Semantic textual gradient abstraction groups related corrective signals into generalized updates, improving prompt transfer to unseen benchmarks.AgentGrad achieves the best transfer performance on all five target benchmarks, including 51.22 versus 44.89 for GEPA on 2WikiMultiHopQA.

6 Conclusion

AgentGrad combines sequential intervention with semantic textual gradient abstraction to optimize multi-agent prompts. Its abstraction step groups semantically similar corrective signals while excluding unrelated ones.

  • AgentGrad combines sequential intervention and semantic textual gradient abstraction to address limitations in gradient extraction and aggregation.Sequential intervention identifies the responsible agent and provides agent-level supervision; abstraction clusters sample-level gradients into generalized corrective patterns.
  • Semantic abstraction excludes out-of-cluster corrective signals while generalizing related organization-name, geolocation, and identifier-leakage corrections into a redaction policy.The generalized policy updates the target agent prompt without mixing unrelated failure modes.
Loading 2609.08572v1…