Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Agent-GWO: Collaborative Agents for Dynamic Prompt Optimization in Large Language Models

About

Large Language Models (LLMs) have demonstrated strong capabilities in complex reasoning tasks, while recent prompting strategies such as Chain-of-Thought (CoT) have further elevated their performance in handling complex logical problems. Despite these advances, high-quality reasoning remains heavily reliant on manual static prompts and is sensitive to decoding configurations and task distributions, leading to performance fluctuations and limited transferability. Existing automatic prompt optimization methods typically adopt single-agent local search, failing to simultaneously optimize prompts and decoding hyperparameters within a unified framework to achieve stable global improvements. To address this limitation, we propose Agent-GWO, a dynamic prompt optimization framework for complex reasoning. Specifically, we unify prompt templates and decoding hyperparameters as inheritable agent configurations. By leveraging the leader-follower mechanism of the Grey Wolf Optimizer (GWO), we automatically select three leader agents ($\alpha$, $\beta$, and $\delta$) to guide the collaborative updates of the remaining agents, enabling iterative convergence toward robust optimal reasoning configurations that can be seamlessly integrated for inference. Extensive experiments on multiple mathematical and hybrid reasoning benchmarks across diverse LLM backbones show that Agent-GWO consistently improves accuracy and stability over existing prompt optimization methods. The code will be released publicly.

Xudong Wang, Chaoning Zhang, Chenghao Li, Shuxu Chen, Qigan Sun, Jiaquan Zhang, Fachrina Dewi Puspitasari, Tae-Ho Kim, Jiwei Wei, Malu Zhang, Guoqing Wang, Yang Yang, Heng Tao Shen• 2026

Related benchmarks

TaskDatasetResultRank
Mathematical ReasoningSVAMP (test)
Accuracy92.3
293
Math ReasoningGSM8K (test)
Accuracy95.9
250
Math ReasoningMATH
Accuracy73.8
160
Math ReasoningGSM8K
Accuracy (GSM8K)96.5
131
ReasoningBBH (test)
Accuracy73.9
94
Mathematical ReasoningASDiv (test)
Accuracy95.5
62
Math ReasoningMATH (test)
Accuracy82.1
59
Math ReasoningMultiArith (test)
Accuracy95.9
54
Math ReasoningGSM8K
Accuracy90.6
49
Hybrid ReasoningAQuA (test)
Accuracy78.5
24
Showing 10 of 14 rows

Other info

Follow for update