HyperAIHyperAI

Command Palette

Search for a command to run...

AgentGrad: マルチエージェントシステムのための介入誘導型プロンプト最適化

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

概要

大規模言語モデル(LLM)に基づくマルチエージェントシステム(MAS)は、専門化された複数のエージェントを用いることで高い性能を達成するが、その性能は各エージェントのプロンプト設計に依存する。MASのプロンプト最適化において、自然言語フィードバックを用いてプロンプト更新を誘導するテキスト勾配法が主要なパラダイムとして台頭している。本論文では、既存のテキスト勾配アプローチにおける勾配抽出と勾配集約の二段階における限界を特定する。勾配抽出では、先行研究は対象プロンプトを修正することで失敗が解決されるかを検証せずに選択し、対応するエージェントの中間出力に対するエージェントレベルの監督なしに勾配を導出する。勾配集約では、個々の勾配がランダムにグループ化・連結され、しばしば無関係な失敗モードが混在し、汎化しないプロンプトが生成される。これらの限界に対処するため、我々は逐次的介入と意味的テキスト勾配抽象化に基づくマルチエージェントシステム向けプロンプト最適化フレームワークAgentGradを提案する。各失敗に対し、逐次的介入は一度に一つのエージェントの振る舞いを修正し、その修正が失敗を解決する対象エージェントを特定する。対象エージェントの修正された出力は、詳細な勾配を抽出するためのエージェントレベルの監督として機能する。意味的テキスト勾配抽象化は、意味的に類似した勾配をクラスタリングすることで無関係な失敗モードの混在を防ぎ、各クラスタを共有される修正パターンを捉えた汎化勾配へと抽象化する。実験結果は、AgentGradが5つのMASベンチマークにおいて最先端性能を達成し、次に高速なベースラインと比較して実時間最適化時間を平均2.5倍短縮することを示す。

One-sentence Summary

Researchers from Korea University, KAIST, Meta AI, and UNIST propose AgentGrad, a prompt optimization framework for multi-agent systems that employs sequential intervention to pinpoint target agents and agent-level supervision to extract fine-grained gradients, then clusters and abstracts semantically similar gradients into generalized corrections, achieving state-of-the-art performance across five benchmarks and reducing optimization time by 2.5×2.5\times2.5× on average.

Key Contributions

  • AgentGrad introduces sequential intervention, which identifies the agent responsible for each failure by modifying one agent at a time and uses the corrected agent output as agent-level supervision to extract fine-grained textual gradients.
  • It proposes semantic textual gradient abstraction, which clusters sample-level gradients by semantic similarity to avoid mixing unrelated failure modes and abstracts each cluster into a generalized gradient that captures a shared corrective pattern.
  • Experiments across five multi-agent benchmarks show that AgentGrad achieves state-of-the-art performance with both GPT-5-mini and Qwen3-8B, outperforming MIPROv2, TextGrad, and GEPA, while reducing wall-clock optimization time by 2.5× on average over the next-fastest baseline.

Introduction

Multi-agent systems that coordinate multiple large language models are a powerful way to tackle complex tasks, but their effectiveness depends critically on prompt design. Automatic prompt optimization via textual gradients—natural-language critiques that guide prompt updates—has become a leading method. However, prior textual gradient approaches have systematic flaws: they select which agent prompt to update without verifying that the change can actually resolve a failure, and they aggregate sample-level gradients by simply concatenating them, mixing unrelated failure modes and producing prompts that generalize poorly. The authors propose AgentGrad, a framework that addresses both stages. It introduces sequential intervention to identify the specific agent responsible for a failure and generate an agent-level pseudo-label for fine-grained gradient extraction. It then uses semantic textual gradient abstraction to cluster gradients that share a corrective pattern into semantic minibatches and distill each cluster into a single generalized update. Across five benchmarks spanning question answering, verification, instruction following, delegation, and math reasoning, AgentGrad outperforms strong baselines and reduces wall-clock optimization time by 2.5× on average.

Method

The authors present AgentGrad, a prompt optimization framework for multi-agent systems that leverages sequential intervention and semantic textual gradient abstraction. The overall pipeline is designed to systematically identify failure points, extract fine-grained update signals, and generalize these signals to improve system performance.

To identify the specific prompts responsible for system failures, the authors employ a sequential intervention mechanism. Given a current prompt set P\mathcal{P}P comprising NNN agents and a set of failures F\mathcal{F}F from the training data, the framework modifies one agent at a time to verify whether its correction resolves the failure.

As shown in the figure below, the process begins with failure set construction, where the current prompt set is executed on the training data to obtain the initial failure set F\mathcal{F}F. The framework then applies sequential intervention in reverse execution order. At each step nnn, a hint H\mathcal{H}H is injected into the prompt of agent πn\pi^nπn to guide it toward a corrected intermediate output. The subset of failures resolved by this intervention is denoted as Tn\mathcal{T}^nTn, defined as:

Tn={(xi,yi)Fn+1r(Π(n,H)(xi;P),yi)=rmax}\mathcal{T}^n = \left\{(x_i, y_i) \in \mathcal{F}^{n+1} \mid r\left(\Pi^{(n, \mathcal{H})}(x_i; \mathcal{P}), y_i\right) = r_{\max}\right\}Tn={(xi,yi)Fn+1r(Π(n,H)(xi;P),yi)=rmax}

where Fn+1\mathcal{F}^{n+1}Fn+1 represents the failures still unresolved at step n+1n+1n+1. The resolved failures Tn\mathcal{T}^nTn are removed from the unresolved set, and the procedure proceeds to the next agent. Failures remaining after step n=1n=1n=1 are treated as hard cases and excluded from the current training round.

Once the target agent is identified for each failure, the authors extract textual gradients using agent-level supervision. For a target agent πn\pi^nπn and a failure sample (xi,yi)Tn(x_i, y_i) \in \mathcal{T}^n(xi,yi)Tn, the framework compares the original output y^in\hat{y}_i^ny^in with the corrected output y~in\tilde{y}_i^ny~in obtained via intervention:

y^in=πn(xin;pn),y~in=πn(xin;pn,H)\hat{y}_i^n = \pi^n(x_i^n; p^n), \quad \tilde{y}_i^n = \pi^n(x_i^n; p^n, \mathcal{H})y^in=πn(xin;pn),y~in=πn(xin;pn,H)

The difference between these outputs isolates the behavioral change induced by the intervention. The corrected output y~in\tilde{y}_i^ny~in serves as an agent-level pseudo-label. A gradient extractor LLM then processes the current prompt, input context, original output, and pseudo-label to produce a sample-level textual gradient δin\delta_i^nδin:

δin=LLM(pn,xin,y^in,y~in)\delta_i^n = \mathrm{LLM}_{\nabla}(p^n, x_i^n, \hat{y}_i^n, \tilde{y}_i^n)δin=LLM(pn,xin,y^in,y~in)

This approach bypasses the need for an explicit system-level loss function by implicitly leveraging the contrast between the original and corrected outputs.

To ensure coherent update directions, the framework introduces semantic textual gradient abstraction. Instead of aggregating gradients from random minibatches, an aggregator LLM clusters the sample-level gradients Ωn={δin}\Omega^n = \{\delta_i^n\}Ωn={δin} into semantic minibatches based on shared corrective patterns. The aggregator simultaneously performs clustering and abstraction, generating a generalized textual gradient δˉjn\bar{\delta}_j^nδˉjn for each cluster:

{δˉjn}j=1Mn=LLMAggregator(Ωn)\{\bar{\delta}_j^n\}_{j=1}^{M_n} = \mathrm{LLM}_{\text{Aggregator}}(\Omega^n){δˉjn}j=1Mn=LLMAggregator(Ωn)

The clustering process is guided by a cyclic schedule for the minimum cluster size, encouraging the model to alternate between broad, shared patterns and fine-grained corrections across optimization iterations.

Finally, the authors update the agent prompts using the generalized gradients. The updates are applied in decreasing order of semantic minibatch size, prioritizing broader corrections. A prompt optimizer LLM generates a candidate prompt pnewnp_{\text{new}}^npnewn based on the generalized gradient δˉjn\bar{\delta}_j^nδˉjn and the current prompt pnp^npn:

pnewn=LLMPromptOptimizer(pn,δˉjn)p_{\text{new}}^n = \mathrm{LLM}_{\text{PromptOptimizer}}(p^n, \bar{\delta}_j^n)pnewn=LLMPromptOptimizer(pn,δˉjn)

Each candidate prompt is first evaluated on its corresponding semantic minibatch. If performance improves, it is subsequently evaluated on a held-out validation set. The update is accepted and replaces the current prompt only if it passes both evaluation stages.

Experiment

AgentGrad is evaluated against three prompt optimization algorithms and a no-optimization baseline across five diverse multi-agent benchmarks using two LLM backbones. It consistently achieves state-of-the-art performance, with ablation studies confirming that its three components—target identification, agent-level supervision, and semantic textual gradient abstraction—each contribute complementary gains. AgentGrad also optimizes faster than baselines due to higher-quality gradient signals that lead to more efficient rollout usage and better generalization, and its optimized prompts transfer effectively to unseen benchmarks within the same domain.

AgentGrad sets a new state of the art across five multi-agent benchmarks with GPT-5-mini, outperforming all baselines and achieving an average improvement of 11.76 points over the no-optimization baseline. The largest gains appear on HotpotQA and PUPA, while the method is also the fastest optimizer, completing runs 2.5× faster than the next-fastest baseline and 4.7× faster than TextGrad. These results demonstrate that AgentGrad jointly improves task performance and optimization efficiency. AgentGrad achieves the highest scores on every benchmark, with an average gain of 11.76 points over the no-optimization baseline, compared to 9.24 for the next-best method GEPA. The largest performance margins are on HotpotQA (73.89 vs. 68.33 for GEPA) and PUPA (95.17 vs. 91.87). AgentGrad is the fastest optimizer, finishing 2.5× faster than GEPA and 4.7× faster than TextGrad, while simultaneously delivering the best task performance.

AgentGrad with Qwen3-8B achieves the highest average improvement over the no-optimization baseline, gaining +9.67 points across five multi-agent benchmarks and outperforming all other prompt optimization methods. It ranks first on four of the five tasks, demonstrating consistent gains in multi-hop QA, claim verification, instruction following, and math reasoning with an open-source model. AgentGrad attains the best scores on HotpotQA (60.45), HoVer (52.11), PUPA (91.51), and MATH (85.81), while TextGrad edges ahead only on IFBench (42.52 vs. 41.42). The +9.67 point average improvement over the baseline is the largest among all compared methods, surpassing GEPA (+7.62) and MIPROv2 (+6.27).

An ablation study on HotpotQA and PUPA shows that each component of AgentGrad—target identification, agent-level supervision, and semantic textual gradient abstraction—improves performance over a vanilla baseline. The full combination yields the highest scores, confirming that the components address complementary aspects of prompt optimization. Adding target identification alone improves performance on both benchmarks, showing that identifying the responsible agent yields more effective gradients. Agent-level supervision and semantic textual gradient abstraction each provide further gains, and the full model combining all three achieves the best results.

AgentGrad is the fastest optimization method on all five benchmarks, averaging 136 minutes, which is 2.5 times faster than the next-best baseline GEPA and 4.7 times faster than TextGrad. The largest speedups appear on HotpotQA and IFBench, and AgentGrad remains faster even on MATH where TextGrad is relatively efficient. These wall-clock gains are achieved alongside the best task performance, showing that optimization quality and speed are jointly improved. AgentGrad records the lowest wall-clock time on every benchmark, with an average speedup of 2.5× over the next-fastest method. On HotpotQA and IFBench, AgentGrad finishes in under two hours while GEPA requires nearly six, yielding speedups of 3.2× and 3.0×. On MATH, AgentGrad completes in 88 minutes, outperforming TextGrad's 126 minutes despite TextGrad's unusual speed on that benchmark. AgentGrad's higher minibatch improvement ratio translates into more rollouts per unit time, and its higher validation improvement ratio ensures that accepted updates generalize more reliably.

Prompts optimized by AgentGrad transfer more effectively to unseen benchmarks within the same domain than those from all compared methods. On all five target benchmarks, AgentGrad achieves the highest mean performance, with the largest margins over the next-best method on 2WikiMultiHopQA and PUPA-TNB. This indicates that the prompts capture generalizable improvements rather than benchmark-specific patterns. AgentGrad's prompts achieve the highest transfer performance on every target benchmark, with margins of 6.33 points on 2WikiMultiHopQA and 2.87 points on PUPA-TNB over the next-best method. The transfer results show that AgentGrad's optimization yields prompts that remain effective without further tuning, outperforming GEPA, TextGrad, and MIPROv2 on all unseen benchmarks.

AgentGrad is evaluated across five multi-agent benchmarks using both GPT-5-mini and the open-source Qwen3-8B, where it sets new state-of-the-art results and achieves the largest average improvements over no-optimization baselines. The method is consistently the fastest optimizer, completing runs up to 4.7 times faster than alternatives while delivering top task performance. Ablation studies confirm that target identification, agent-level supervision, and semantic gradient abstraction each contribute complementary gains, and prompts optimized by AgentGrad transfer more effectively to unseen benchmarks, demonstrating generalizable improvements.


AIでAIを構築

アイデアからローンチまで — 無料のAIコーディング支援、すぐに使える環境、最高のGPU価格でAI開発を加速。

AI コーディング補助
すぐに使える GPU
最適な料金体系

HyperAI Newsletters

最新情報を購読する
北京時間 毎週月曜日の午前9時 に、その週の最新情報をメールでお届けします
メール配信サービスは MailChimp によって提供されています