Multi-Agent Design: Optimizing Agents with Better Prompts and Topologies
Authors: Han Zhou
Xingchen Wan
Ruoxi Sun
Hamid Palangi
Shariq Iqbal
Ivan Vulić
Anna Korhonen
Sercan O Arik
Venue: ICLR 2026 Poster (2026)
Keywords: language agent
multi-agent system
Primary area: foundation or frontier models, including LLMs

Abstract: Large language models, employed as multiple agents that interact and collaborate with each other, have excelled at solving complex tasks. The agents are programmed with prompts that declare their functionality, along with the topologies that orchestrate interactions across agents. Designing prompts and topologies for multi-agent systems (MAS) is inherently complex. To automate the entire design process, we first conduct an in-depth analysis of the design space aiming to understand the factors behind building effective MAS. We reveal that prompts together with topologies play critical roles in enabling more effective MAS design. Based on the insights, we propose Multi-Agent System Search (MASS), a MAS optimization framework that efficiently exploits the complex MAS design space by interleaving its optimization stages, from local to global, from prompts to topologies, over three stages: 1) block-level (local) prompt optimization; 2) workflow topology optimization; 3) workflow-level (global) prompt optimization, where each stage is conditioned on the iteratively optimized prompts/topologies from former stages. We show that MASS-optimized multi-agent systems outperform a spectrum of existing alternatives by a substantial margin. Based on the MASS-found systems, we finally propose design principles behind building effective multi-agent systems.

Published as a conference paper at ICLR 2026
MULTI-AGENT DESIGN: OPTIMIZING AGENTS WITH BETTER PROMPTS AND TOPOLOGIES
Han Zhou 33+ Xingchen Wan
Ruoxi Sun? Hamid Palangi'
Shariq Iybal
Ivan Vulic Anna Korhonen
Sercan Ö. Arik
'Google GGooge DeepMind UUiiersityy of Cambridge
[hzhouml, soarik)
ABSTRACT
Large language models, employed as multiple agents that interact and collaborate with each other, have excelled solving complex tasks. The agents are pro- grammed with prompls that declare their functionality, along with the topologies that orchestrate interactions across agents. Designing prompts and topologies for multi-agent systems (MAS) is inherently complex. To automate the entire design process, we first conduct an in-depth analysis of the design space aiming to under- stand the factors behind building effective MAS. We reveal that prompts together with topologies play critical roles enabling more effective MAS design. Based on the insights, we propose Multi-Agent System Search (MASS), MAS optimization framework that efficiently exploits the complex MAS design space by interleaving its optimization stages, from local to global, from prompts to topologies, over three stages: 1) block-level (local) prompt optimization; 2) workflow topology optimization; 3) workflow-level (global) prompt optimization, where each stage is conditioned on the iteratively optimized prompts/topologees from former stages. We show that MAss-optimized multi-agent systems outperform a spectrum of existing alternatives by substantial margin. Based on the MASS-found systems, we finally propose design principles behind building effective multi-agent systems.
INTRODUCTION
Large language models (LLMs) have showcased extraordinary capabilities in understanding, rea- soning, and generating coherent responses based on user prompts, revolutionizing wide range of applications (Ouyang et al.) 2022] Kojima et al., 2022). LLM-based agents enhance usability by au- tonomously handling complex tasks across diverse domains, including code generation and debug- ging (Jiennez et al.] (2023). velreeeal-augmmnted
MASS
Optimized MAS design topology
Prompt Optimization Space
Instrucioon
Exempiar
Multi-Agami Design Space
aggregate
summarize
to
reflect
took-use
debate
cusilom
generation (Singh et al. | 2025 Wang et al. 2024a),
Topology Optimizer
Optimbeed prompt for exch agent type
data analysis (Hu et al. 2024b) Guo et al. 2024). )
and interactive decision Daccision-making (Su et al. 2025
Figure Proposed Multi-Agent System Search (MAsS) framework discovers effective multi- agent system designs (with both optimized topol- ogy and optimized prompts, right) via inter- leaved prompt optimization and topology opti- mization in customizable multi-agent design space (key components illustrated on the left).
Li et al. 2025). These agents typically pro- grammed with prompts that reinforce them to in- teract with the environment, utilizing available tools, and approach their objectives over multi- ple turns (Yao al., 2023). Beyond individual agents, LLMs can be orchestrated within complex topologies that coordinate multiple agents toward a shared objective. This type of multi-agent system (MAS) typically outperforms its single-agent counterpart by involving more diverse agentic perspectives or role profiles, such as agents as verifiers (Shinn et al. 2024) and multi-agent debate (Wang et al. 2024b Qian et al. 2024).
Work done Student Rescarcher Google.

---

Published as a conference paper at ICLR 2026
However, designing effective MAS for new domains often proves to be challenging. First, the single agent might suffer from prompt sensitivity (Verma et al. 2024), where simple modifications in the prompt can already exert significant but unexpected degradation of performance (Zhou et al., 2024b] Liu et al. 2024a). In MAS, when sensitive agents are cascaded, the compounding effect due to prompt sensitivity may be amplified. Together with the prompt design, crafting an effective topology might demand a substantial amount of manual experimentation, based on trial and error. The problem complexity is exacerbated by the overall combinatorial search space, over not only the unbounded space of prompt design but also the design decisions of what agent to integrate into the topology.
Although recent research has explored automating various aspects of agentic designs, there still gap in understanding of what matters most regarding improved MAS performance. For example, DSPy (Khattab et al., 2024) automates the process of designing exemplars for improved prompt programming. [i et al. (2024a) propose to optimize MAS by scaling up the number of agents in majority voting. ADAS (Hu et al. 2024a) programs new topologies expressed in code via an LLM-based meta-agent. AFlow (Zhang et al. (024b) searches better topologies using Monte-Carlo Tree Search within a set of predefined operators. However, the interplay between multiple design spaces, including prompts and topologies, remains unclear.
In this paper, we first conduct in-depth analyses of common design spaces in MAS, examining the impact of aspects such optimizing the prompts, scaling the number of agents, and involving different types of topologies. Our analyses reveal that prompts frequently form an influential design component that yields strong-pest poronnpprfomingggg. MAS, and influential topologies only represent small fraction of the full search space. Based on these insights, we aim to distill the essence of influential MAS components into a pruned search space, thereby lowering the complexity of the overall search process. We propose Multi-Agent System Search (MASS), a novel multi-stage optimization framework that automates the optimization for MAS over an efficient search space. MASS integrates a and--andyplay prompt optimizer and workflow optimizer over a configurable topology space. It overcomes the complexity of joint optimization on MAS by interleaving the optimization stages, from local to global, from prompts to topologies, over three stages: 1) block-level (local) prompt 'warm-up" for each topology block; 2) workflow topology optimization in a pruned set of topology space; 3) workflow-level (global) prompt optimization given the best-found topology.
By optimizing over the identified influential components, MASS yields optimized MAS that achieves ofate-of-the-ar performance, outperforming existing manually-craftee MAS baselines and cooommttcally-geeezzee
alternatives, by a substantial margin, demonstrated across an extensive selection of tasks, including reasoning, multi-hop understanding, and code generation. Based on the strongest MAS found by MASS, we provide further insights and guidelines behind building effective MAS. Overall, contributions can be summarized as follows: 1) we provide an in-depth analysis of the design factors that influence the performance of LLM-based MAS, highlighting the importance of prompts and identifying the influential topologies; 2) we propose MASS, novel multi-stage optimizer that automates the MAS design by interleaving the optimization of prompts and topologies in an influential search space; 3) MASS shows significant performance improvement on various evaluation benchmarks, delivering guidelines for building effective multi-agent systems for the future.
2 DESIGNING MULTI- SYSTEMS
In this section, we provide a formulation for designing MAS, followed by analyzing the influence of prompt and topology designs. We refer the structural arrangements of agents as the topology of agents and define workflow as the logical sequence across different topologies that builds the MAS. The design of MAS can thus be broadly divided into two levels: block-level design and workflow-level orchestration. At the block level, a building block infers a group of agents that work together for a certain function (e.g., debate), and we aim to design effective individual agents that best perform their intended role with better prompt design. On the other hand, at the workflow level, the optimization involves determining the types and quantities of agents to include and how to arrange them in the most effective way, referred to as the topology optimization. Formally, given search space A = {a,} that defines all valid agentic configuration over the building block search dimensions a, (see Fig. B). individual agents and their composite topologies can both be parameterized as specific configurations in this search space. To obtain the best workflow W (a), the workflow topology optimization is framed the following optimization problem with an objective function f(:)-) on
2

---

Published as a conference paper at ICLR 2026
target input and output set (x, y) D in the defined search space A::
(a)
arg max B
a~A
In the rest of this section, we provide an in-depth analysis of each component of MAS design.
2.1 BLOCK-LEVEL ANALYSIS: PROMPT DESIGN FOR AGENTS
At the block level, the primary "ootimizable component" that significandly influences downstream performance the prompt, which defines the role of the agent (e.g.. "You are an expert reflecting errors..."), provides additional instructions shape its behavior (e.g.. "You should think step by step...") and optionally, contains few-shot demonstrations (in-context examples) to guide the agent's 's responses (Wan al. 2024). For instance, state-of- -f-the--rr- prompt optimizer searches both instructions and few-shot demonstrations, where demonstrations are bootstrapped from the model's the validation set based
own, correct predictions demonstrations, the prompt optimizer then proposes a few candidates for the instruction with a dataset summary various hints to improve candidate diversity (Opsahl-Ong et al. 2024). The instructions and demonstrations are then jointly optimized.
validation metric. Conditioned the
Although it is well known that LLMs are sensitive to prompts (Zhou al. 2024a Verma al. 2024). applying automatic prompt optimization (APO) techniques to MAS is not straightfowarr. In single-turn tasks, APO can be easily performed by treating prompts optimizable variables and performance over a validation set as the target. However, in MAS, APO becomes more complex due the interdependence across agents (e.g., the output of one agent may be the input of another agent in a cascade with ground-truth responses for intermediate outputs not being available) and exponentially increasing complexity for combinatorial optimization with more number of agents involved; The reward signals also become more sparse when in- creases, preventing us for implementing APO directly on MAS in any manageable budget; as such, many prior works (Zhang et al. 2024f Xia et al., 2024) in MAS still primarily use hand- crafted prompts instead of including the prompts as optimizable components in the MAS design.
To systematically understand the influence of prompt design in MAS, specifically and quanti- tatively analyze the effect of prompt optimization and compare its effectiveness other operations common in MAS literature, such as scaling with more agents but with default prompts. We con- duct APO a thain-of-thhuglh (Kojima et al., 2022) agent via state-of-the art prompt optimizer MIPRO (Opsahl-Ong et al., (024) that is capable of joint instruction and (I-shot) exemplar opti- mization, and fairly compare the total inference token cost with seff-consistency (Kojima et al.. 2022), self-refine (Madaan et al. (2024). and multi- agent debate (Du et al. 2024), where the specifica- tions are provided in App. CC] In Fig. 2 prompt- ing, which equips agents with more informative instructions and exemplars, demonstrates signif- over
Reflect
02
Desate
Prompting
Accuracy (%)
76-
10a
Tokens
Figure 2: Accuracy total token counts for prompt-optimized agents per question on MATH by Gemini 1.5 Pro compared to scal- ing agents with self-consistency (SC), self-refine (reflect) and multi-agent debate (debate) only. The error bar indicates I standard devia- tion. We show that by utilizing more compute, better accuracy can be obtained via more effec- tive prompting.
icant ad advantages in its token-effectivenn other building blocks. Furthermore, by applying self-consistency on top of the prompt-optimized agent, we observe an improved scaling perfor- mance on the token cost, whereas standard ap- proaches in scaling the number of agents (e.g. SC, or Reflea flect)) saturate much earlier. This empirical observation sheds light the importance of prompting while providing early evidence for designing effective MAS optimize agents locally before scaling their topology.
3

---

Published as a conference paper at ICLR 2026
Bookkleeeel Prompt Optimization
Workflow Topology Optimication
Workffow-level Prompt Optimizsiion
Aggregate
Self-reflect
Preposed candidate
Best topalogy Step
Predictor
OOODOU
X
A
Summarae
</>
</>
Eveluste on validation task spiit
Evaluate
iddation task// split
Longinpuus
Multi agant debate
Tool-use
Validation metric
Validstion metric
Optimizer: Store evaluetions and propose new workfooow
Instruction optimization
Let's thank ssep by step [Exemple new p prospt)
O O
63%)
75%%)
optimization
Damo
<exerple_ <exarple,
<b> Optteizable prompts
prospts
Figure 3: Illustration of the MASS framework with its search space and the optimization. The search space combines both prompts (Instruction, Demo) and configurable agentic building blocks (Aggregate, Reflect, Debate, Summari cimmarize, ze, and Tool-use). [1PO: Block-level Prompt Optimization]: we conduct block-level prompt optimization for each agentic module individually (denoted by </>); [2TO: Workflow Topology Optimization]: conditioned on the best prompts found in Stage 1 each agent block, MASS samples valid configurations from influence-weightee design space while fusing the prompts of each building block from Stage 1; [3PO: Workflow-level Prompt Optimization]: conditioned on the best workflow found, we again conduct workflow-level prompt optimization on the best-found MAS (topologies visualized for illustration only).
2.2 WORKFLOW-LEVEL SEARCH SPACE DESIGN
At the workflow level, the primary focus is on orchestrating agents to achieve the best performance effectively, and topology optimization has recently garnered significant attention (Li al. 2024c Zhang et al. (2024b). However, while much of the existing research emphasizes search methods such as discovering the most efficient and effective way to identify the optimal configuration -eeeat there has been less focus on the design of search spaces, which determines the perimeter and the scope of any search algorithm. This imbalance draws a parallel to the historical development of neural architecture search (NAS) (White et al., 2023). Initially, the field concentrated on sophisticated search methods, such as Bayesian optimization (Kandasamy et al. 20188) Ru et al. 2021) and differentiable search (Liu al. 2018). Follow-up works have highlighted the overr-ooe importance of search space design, arguing that it can be equally, if not more, critical (Wan et al. 2022 Zhou et al. 2023a).
Inspired by this insight, hypothesize that manually crafted topologies might be sub-optimal, and automatic topology optimization (potentially framed as a rigorous optimization problem) can play similarly pivotal role via judiciously designing search space for MAS. To achieve so, we first define an expressive search space, similar to prior works, that consists of the connections between the following building blocks, which form a unified search space for MASS:
Aggregate: Agents can collaborate in parallel with diversified predictions, which is then followed by an aggregation operator that obtains the most consistent prediction. The aggregate block can be parameterized by N₂ agents and also defines the number of agent chains acting in parallel. Majority vote (Li al. 2024a) and self-consistency (Chen et al. 2024c) sits within this topology.
Reflect: Agents can act as verifiers, providing critics and improvement suggestions based on former predictions. The feedback is then fed into the predictor or the reflector itself for an iterative improvement. Similarly, reflect can be parameterized by N, that defines the number of rounds for self-reflection. The self-refine (Madaan et al. 2024) and Reflexion (Shinn et al. 2024) represent this block, and N, can be interpreted as parameter that contributes to the depth of the MAS network.
Debatt: Agents in debate can elicit more truthful predictions than a single agent (Du et al. 2024 Liang al. 2024), where each debating agent would collect opinions from all other agents and provide an updated response. This topology involves a mixture of agents, and N₂ defines the number of rounds for debating (i.e., number of fully-comnected agent layers in the topology space).
Custom Agents: While the former three forms of agents represent the vast majority of agent topologies constructed multiple parallel, serial, and mixture of agents, more versatile definitions
4

---

Published as a conference paper at ICLR 2026
of agents can be inserted into the MAS design space. For example, for task-specific use cases, introduce an agent as summar ze to improve the long- cong-context capability in the customizable design space, where N, defines the rounds of abstraction of information.
Tool-use: Building towards an effective MAS, enabling agents to leverage tools to access external information is critical for system performance, such as using retriever for RAG (Lewis al. 2020) and executor with test cases in coding (Chen et al.) (024d). We introduce tool-use (e.g., code execute) as an optimizable binary 'insertion' decision NT {0, 13 with the predictor.
3 MASS: MULTI-AGENT SYSTEM SEARCH
Our analyses in Sec. 2 Junderscore the importance of well-designed prompts for individual agents and the careful definition of the search space to achieve effective MAS performance. Building on these, we propose a multistage optimization algorithm, Multi-Agent System Search (MASS), that surpasses prior arts that focused solely on optimizing workflow topology without appropriate prompt designs. Instead, our approach demonstrates the greater effectiveness of MAS design with properly optimized prompts and thoughtfully designed search spaces. MASS framework is illustrated in Algorithm [ and Fig. [1] following an intuition from local to global, from block-level to workflow-leve level,, that conquers the complexity of combinatorial optimization with effective per-stage optimization detailed below.
1) Block-level prompt optimization. Before composing agents, we first ensure that individual agents are thoroughly optimized at the block level, as highlighted in Sec. 2. and Fig. 2 this step ensures that each agent is primed for its role with the most effective instructions in the most manageable computation budget. To further overcome the complexity of joint optimization on a large MAS space, we first warm up the initial predictor with single-agent APO, oj + Op(aa), where both instruction and exemplars are jointly optimized with the modular prompt optimizer O, Followed by conditioning on the warmed predictor, we continue optimizing each topology with a minimum number of agents, of + Op(a,laj) such that, 2 predictors paired with debator form the minimum building block as the debate topology, thereby lowering the complexity for optimization, and this topology can be scaled up later with more predictors and debators but all equipped with optimized prompts. To measure the influence of each building block, we store the validation performance once the optimization is completed. It is important that though Stage (1) serves the warm-up stage per building block, it is still a critical stage that guarantees the follow-up topology optimization is searching in an effective space, composing well-performing agents instead of suffering from the compounding impact from any ill-formed agents with manual prompts.
2) Workflow topology optimization. In this stage, we focus on optimizing the overall MAS struc- ture, determining the most effective arrangement and connectivity between agents. To understand the influence of individual blocks, we report the performance of various topologies in Fig. [ It
HotpotQA
LiveCodeBench
70-
-10%
Performance (%)
+6%
68
41% Base
66
-0%
70
is noticeable that not all topologies are benefi-
cial to MAS design, whereas positively influenced topologies only represent a small fraction of the overall set, such that, in HotpotQA (Yang et al.) 2018), only debate e brings 3% gain while others fail to improve or even degrade systematic perfor- mance. We again observe similar trends in the test-output- preeiccttoreiiiiinnn subtask of LiveCodeBench (Jain et | 2024). It highlights the importance of searching in the influential set of the search space, whereas including decremental building blocks may not only result in higher search complexity but also degrade the performance, The analysis in Fig. shows that beneficial topologies only represent small fraction of the full design space. Therefore, we aim to distill the essence of strong pornngpeforming topologies into a pruned space, thereby making the workflow-level topology search more efficient.
CoT
SC Ref. Deb, Sum. Method
CoT
SC Ref. Deb. Exe. Method
Figure 4: The performance of different topolo- gies with Gemini 1.5 Pro compared to the base agent with each topology being optimized with APO, where Sum. (Summarize) and Exe. (Ex- ecutor) are task-specific topologies as illustrated in Fig. 3 We observe that not all topologies have a positive influence on the MAS design.
5

---

Published as a conference paper at ICLR 2026
Algorithm 1 MASS: Multi-Agent System Search
I: Input: Agentic modules in the search space oi A., workflow agents W(a), prompt optimizer O evaluator &, validation set D, temperature f, number of candidates N, budget B.
2: Output: Optimized multi-agent system W
3: [1PO: Block-level Prompt Optimization]
4: Prompt optimization for the initial agent: án + On (an)-
for a; in AA \ {do} do
6: Local prompt optimization for each building block in the design space: of +- Ob(asla))
7: Obtain incremental Influence: la, + ((a))/E(a))
8: end for
9: (2TO: Workflow Topology Optimization]
10: Obtain the selection probability Pa <- Softmax(Ia: t).
11: while n < N do
12: Search space pruning: Ap = {a:} for in A if u < Pa., where ~ Uniform(O, 1).
13: Reject sampling for agentic configurations in budget: Ap s.t. ((a) < B.
Build workflow W. + (c),) (....) in rule-base order with optimized prompts.
15: Evaluate and record the score (D.).).
16: end while
17: Ohtain the hest-performing workflow W arg E (WW..
18: [3PO: Workflow-level Prompt Optimization]
19: Workflow-level prompt optimization for the best-performing topology: W <- OD(W))
20: Return optimized multi-agent system W
Here, we propose to measure the incremental influence La, (( that quantifies the relative gain for integrating the search dimension a, over the initial agent dy- Following the intuition that influential dimension comes with higher selection probability, search dimension o; if u >> Pa; to form a pruned search space, given u ~ Uniform(O, 1) and Pa -SSootmx Tay f), where is the temperature for the softmax function. Therefore, the workflow can be randomly sampled from a pruned configuration space within maximum budget, such that Ap s.t. (a) < B, where (a) caps the overall number of agents and B is the maximum budget; For instance, given A = }a;} as the original configuration space with the topology building block search dimension a, parameterized by its property No. as defined in Sec. 2.2] each search dimension will be weighted by the influence of that dimension Po.. and rejected to form Ap ~ Uniform(O, (0. 1) > Pa,- Followed by sampling valid configurations from Ap. the workflow W(a) (as; 0;- 1....) is then constructed in a predefined rule arrange the flow of agents, where the rule-based flow removes redundancy in various orders in design and reduce the optimization complexity. The rule follows simple predefined sequence that aligns with the practice of agent designs, such that [summart r ze, reflects debate, te, aggregate) We refer to App. $C for the detailed construction rule, MAS visualizations, and search space per task.
reject the corresponding topology
3) Workflow-level prompt optimization. As a final step, we treat the entire MAS design as an integrated entity and conduct a round of joint prompt optimization over all agents simultaneously, conditioned on the best topology discovered in Stage (2), W = (WW". Although prompts were optimized at the individual level in Stage (1), this stage acts as an adaptation or fine-tuning process, ensuring that prompts are tailored for orchestration within the MAS and that the interdependence between agents is optimized appropriately, Our experiments (Fig. 5 & 6 demonstrate that this stage often yields practical benefits with converged performance as shown in Table 6
4 EXPERIMENTS
Models and evaluation data. Aside from the common benchmarks used for automating MAS (Hu et al. 20244] Zhang et al. (024b), we conduct experiments on an extensive collection of
tasks: 1) Hendryck's MATH (Hendrycks et al., 2021) and DROP (Dua et al., 2019) for rea-
soning; HotpoiQA (Yang et al. 20188) MuSiQue (Trivedi et al., 2022). 2WikiMultHopQA (Ho) et al. 2020) from LongBench (Bai et al. 2024) for long-context understanding: 3) MBPP (Austin et al. 2021), HumanEval (Chen et al. 2021). and LiveCodeBench (LCB) 'test output predic- tion' Jain et al.] 2024) for coding. We refer to App. $ & S for details data splits and prompt templates. We conduct all main experiments primarily on two Gemini 1.5 model sizes (Reid et al. 2024) (gemi -1.---150ppr. flash) (ash)-002) and further validate key findings

---

Published as a conference paper at ICLR 2026
Table 1: Results on the evaluation set with Gemini 1.5 Pro and Gemini 1.5 Flash. We report the mean and standard deviation for all results with 3 runs of evaluations. We report the accuracy (%) for MATH and the test-output-prig crrput--rediction subtask of LiveCodeBench (LCB), Fl score for DROP, HotpotQA, MuSiQue, and 2WikiMQA, and pass@ for MBPP and HumanEval. We note that the meta-prompt of AFlow" only works properly with Claude 3.5 Sonnet. Therefore, we reproduce AFlow with Gemini 1.5 Pro as the executor and Claude 3.5 Sonnet as the optimizer, where' indicates the results are only for reference. The inference cost is controlled comparably as shown in Table 7
Gemind n1 -1 5-pro-002
Task
Reasoning
Molti-hop Long-context
Coding
Method
MATH
DROP
HotpotQA
MuSiQue
2WIkiMQA
MBPP
HumanEval
LCB
Avg.
CoT
71.67
70.59
57,430.2
37.8
63.39
68.33pu47
86, 36.67am
66.33as2
65.28
Self Consistency
27.33
74.06
18.60
41.811m
67.79
69.50gm1
86.00ks
70.33g.4
68.18
Self Refine
79.67236
71.03,,1
60.62333
42. 15.35
66.742,47
63.67a.2
84.00
67.33
66.90
Multi-Agent Debate
78.67a.4
71.78pm
64.87021
46.00sso
71.78aa)
68. a8s
86.67
73.67
70.26
ADAS
80.00ka
72.96
65.88 29
41.95
71.14
73.00
87.67 87.67
65.17
69.72
AFlow"
76.00k
88 88.92
68.62 (8.620.47
32.05
16.51
88, 88.00ggo
MASS (Ours)
84.67a.4
90.52as4
69.91..
51,400.2
73,34eur
86.50a4i
91.67a47
82.33ass
78.79
Gemini 11. w..--1lahh----
CoT
66.67235
71.79a.e
57.82,
37.10,as
63. 63.40pss
63,33
75.67
51.17a24
60.87
Self Consistency
69.33
73.42a.19
60.19 mt
41.94g93
67.98
63.67
77.67
13.83
63.50
Self-Refine
71.33a94
73.71
58.84 58.84so4
41.21,00
65,56,,5
63.33 63.33
81.67
52.00
63.46
Multi-Agent Debate
71.67p94
74.79us7
64.17, m
46.27
72.19
63.00am1
79.67
55.50p41
65,91
ADAS
68.00
75.95
61,362a9
48.81
66.90,00
65 65.83p24
80.67249
50.50
64.75
MASS (Ours)
81.00
91.68
66.53
43.67
76.69
78.00
84.67
72.17
74.30
on Claude 3.5 Sonnet (c1 (claude-3 3-5 sonnet (ocnnet220246222 AAnhrooii 2024 and Mistral Nemo
(mi st r 1 -nemo- 2b) (Mistral 2024) in App. $D
Baselines. We consider the following baselines: 1) CoT (Kojiaa et al. 2022 direct chain-of-thought
reasoning via zero-shot prompting: 2) CoT-SC (Wang et al. 2023) (09 agents): with self-consistency
to find the most consistent answers from diversified reasoning traces; 3) Self-Refine (Madaan et al.,
2024| (Shinn et al. 2024) (2 agents @5 rounds): reflective agents verify and self-refine predictions;
4) Multi-Agent Debate (Du et al. 2024 Liang et al.) 2024) (3 agents @3 3 rounds + 1 judger); with agents justifying answers and aggregating information from other agents in multi-round debate; 5) ADAS (Hu et al. 2024a): an automatic agent design framework, where an L..M-based meta- agent iteratively proposes new agents based on former evaluations: 6) AFlow (Zhang et al. 2024b): automatic workflow design via Monte-Carle Tree Search over set of pre-defined operators. We fairly compare all baselines with a comparable inference cost per query and a maximum number of agents of 10. We refer to Table 7 for the detailed token consumption and App. C for all specifications.
Setup. MASS is plug-and-play with arbitrary prompt optimizers. We integrate MIPRO (Opsahl-Ong et al. 2024) for joint instruction and exemplar optimization, and we ablate other prompt optimizers implemented with MASS in Table 9 We limit the number of bootstrapped demonstrations to 3 and instruction candidates to 10, per agent in 10 rounds. In topology optimization for all tasks, we search for 10 different topologies via rejection sampling. Along with topology optimization, each topology evaluated on the validation set times to stabilize the prediction. The optimized MAS is then reported on the held-out test set over three runs, We set model temperature T at 0.7, maximum output tokens at 4096, and the t in Softmax 0.05 for sharpening the selection probability Pa for each search dimension. We implement the same LLM backbone as both evaluator and optimizer.
Main results. We present the main results of MASS compared to the baselines on the evaluation set in [ MASS yields substantial gains over common forms of multi-agen, agentt systems, (e.g. self- consistency, self-refine, and multi-agent debate), that scale up without optimizing prompts for agents in collaboration. MASS leads to high-performing MAS: 78.8% 8% and 74.3% on average on Gemini 1.5 Pro and Flash, respectively, where we observe consistent improvements on Claude 3.5 Sonnet and Mistral Nemo as reported in Table 4 & 5 By comparing MASS with state-of-the-arr automatic agent design baselines, ADAS and AFlow, we first notice that ADAS only brings subtle gains even by already conditioning its meta-agen generation based on the common forms of agents. The meta-agent keeps proposing complex topologies but without optimizing the prompt design. AFlow, on the other hand, demonstrates competitive performance to MASS, especially on 2WikiMQA and Hvaa
7

---

Published as a conference paper at ICLR 2026
77.3
78.8
68
95
3PQ: Workfoow-leell PO
Performance (%)
75
74.2
Aflow
2TO: More parallel
agents involved
70-
68.0
66
90-
NASS (Ours)
IPD: Agaregate
IPO: Debate
65
Better Prompt
(16)
60-
80-
55
1PO 2TO 3PD
Prune PD-+TD
75
Stage
Ablation
Figure 5: Left: average performance per opti- mization stage of MASS over 8 evaluation tasks on Gemini 1.5 Pro. We compare MASS with single agent (CoT) starting point the refer- ence and an APO baseline that optimizes over the single agent by MIPROv2 (Opsahl-Ong et al.,, 2024). Refer to App. fDr the detailed ablation per task. Right: comparative ablation study on topology optimization (2TO) without pruning and without the former stage of prompt optimiza- tion (1PO) evaluated on HotpotQA.
20
40
Round
Figure 6: The optimization trajectories of MASS compared to agent design baselines per validation round DROP, We note that, as a dis- tinct advantage of MASS, the optimization within stages (1) & (2) of MASS can be completely par- allelized, whereas ADAS and AFlow are itera- tive algorithms that have wait to propose new agents until finishing earlier trajectories.
We attribute the performance of AFlow to: 1) its 'expansion' phase that generates new nodes based on an error log that contrasts the predictions with the ground truth, which provides implicit textual gradients (Pryzant al. 2023) to reflect on any formatting errors in prompt design; 2) more refined search space within a pre-defined set of operators. Though AFlow draws similar inspirations on the importance of search space design as MASS, it still lacks phase of prompt optimization to optimize its pre-defined operators properly. resulting in under muder-performance for MAS search results at MATH and MuSiQue. Different from these baselines, the consistent improvements brought by MASS highlight the importance of searching in both prompt and topology design space.
Ablating optimization stages. To understand the incremental gain per MASS optimization stage, provide a stage-by-stage ablation study in Fig. 5 We list the average performance of MASS from block-level to workflow-level optimization and compare with a single agent APO baseline (MIPROv2), where the block-level optimization performance indicates the best-performing building block a E A after APO. First, we notice that there is large gain, 6% on average, between block-level optimization and single-agent APO, showing that MAS benefits substantially from having its agents optimized inside the building block, outperforming APO alone significantly. In addition, going from Stage (1) to (2), another 3% gain can be achieved by composing influential topologies while searching for the optimal configurations. Here, we provide an ablation on conducting Stage (2) without prompt optimization beforehand or without search space pruning. Fig. 5 (right) shows that both of them are critical for effective search space exploration. Lastly, MASS obtains further gains (~2%% by conducting workflow- level prompt optimization the best-found topology, which indicates that optimizing the prompts towards modeling the interdependence of agents is beneficial in MAS.
costteffectiveness of MASS. We conduct analysis on the cost-effectiveness of MASS. In particular, we visualize the optimization trajectory of MASS as shown in Fig. 6 MASS's trajectory demonstrates steady trend of optimization that gradually improves the validation performance via interleaving the search towards better prompts and topologies. However, when it comes to automatic design baselines without explicit prompt optimization stages, AFlow exposed due to the nature of MCTS, whereas ADAS gets trapped in discovering over- over-complex topologies that appear to be less effective than the prompt design space. Overall, the optimization trajectory of MASS highlights the importance of optimizing in an effective design space, where interleaved optimization further resolves the complexity with more consecutive rewards within the same amount of training costs compared to baselines. Following Sec. 2.1] MASS also demonstrated advanced inference token efffectvecss and a comparable training cost, which we refer to Fig. 9 and Table 7
larger variance in its optimization
Best-found MAS architectures & Design principles. We further inspect an example of optimized prompts and the trajectory of MASS in discovering more effective topologies in Fig. [ The optimiza- tion starts from zero-shot CoT agent, and soon MASS in Stage (1) identifies the high-performe topology in debate with its optimized prompt. However, as found in Stage (2), aggregating with more parallel agents actually outweighs the multi-agent debate. Workflow-level prompt optimization then
8

---

Published as a conference paper at ICLR 2026
Book-level Prompt Optimization (62% - 79%)
Workflow Topology Optimization (79% 63%)
Debator:
You are a seasoned rath professor specializing in clear and concise esplanations. You are reviewing student solutions to nath problens. Below, sill find the problen, followed by solutions fron several students. Carefully exarine each student's solution, adentafying any arrors in their logic or caleulations. Provide corprehensive rationale explaining your analysis of each student's 's work, clearly stating whether their final answer correct or incorrect and why. Finally, provide your definitiva and simplified solution problen, ensuring its acsuracy and clarily. Present your fanal answer bracketed between <answer> and </answer> at the end.
D
Workflow-lvee Prompt Optimization
Predictor:
Let's thank step step given problen. Clearly explain your reasoning process, shoxing all internedsate calculations and justifications. Express your final answer as single nuterical value or sirplified expression anclosed within canewerss/ansver tags, Avoid extraneous text explanations outside the core reasoning and fanal. answer.
Question: Corpute (B)8)
Solutions: Agent 441nAgent 1:
Nationale: <fationale>
Answer: 44
Deno: Exemplar
<Task
Deno: Examplar_
<Task Deno: Exemplar_1>
Figure 7: A demonstration of the optimization trajectory of MASS on MATH. In (1) block-level optimization: multi-agent debate serves as the best-performing topology. In (2) workflow topology optimization, aggregating with more parallel agents outweighs the performance of agents in debate. Lastly, (3) workflow-level optimization discovers the optimal prompt conditioned on the best topology.
leads to the best-performing predictor for aggregation. The overall optimization flow sheds light on our guidelines for building effective MAS: 1) Optimizing individual agents properly is important before composing them into an MAS; 2) A more effective MAS can be built by composing influential topologies; and 3) Modeling the interdependence between agents is beneficial, and can be achieved via workflow-level joint optimization.
5 RELATED WORK
Forms of LLM-based agentic systems. The simplest form of an LLM-based agentic system involves a single agent that can dynamically interact and respond to the environment (Yao et al. 2023). Recent advances endow agents with diverse roles and tools (Wu et al. (023), orchestrating multiple agents to cooperate with each other (Chen et al. 2024b). Standard forms of agent cooperation (i.e., topology) often involve parallel and serial flows of information. The parallel form usually diversifies the exploration among many agents in parallel (Li et al. 2024a), and self-consistency (SC) (Wang et al., 2023) is a representative way for scaling agents in parallel. The serial form aims advance the exploitation of a task via a chain of agents, where LLMs can serve as reflective agents to self-justify and refine former predictions (Madaan et al.) 2024; Shinn et al. 2024). Later, the opinions from multiple agents can be summarized to retrieve the most consistent answer by an aggregation agent (Chen et al. 2024c| Lin al. 2024). Moreover, multi-agent debate consists of more complex flow of information (Chen et al.) 2024a; Wang et al. 2024c Zhang et al., 2024c), and recent research
shows that debating can elicit more truthful predictions (Khan et al. 2024|] Du et al. 2024). Recent
agent topology extends beyond the above connections (Wang et al. 2024b Qian et al. 2024 and
MASS can automatically search the best topology among the aforementioned spaces.
Automatic optimization for MAS. Recent research starts automating agent design by interpreting agent functions as learnable policies (Zhang et al., 2024d e) and synthesizing trajectories for agent fine-tuning QQiao et al.) 2024). Going further from single agent, automatic multi-agent optimization faces higher level of complexity, thereby requiring a more sophisticated design of the search space and algorithms. Among all recent advances in multi-agent optimization, the optimization space has spanned prompts (Khattab et al.) 2024: Wang et al., 2024d), tools (Zhou et al. 2024c), workflows (Li et al. 2024c). and thinking strategies (Shang et al., 2024). Aligning closer to our topology search space, DyLAN (Liu et al. 2024b) dynamically activates the composition of agents, and Archon "Saad-Falcon et al.) (202)) frames MAS as hyperparameter optimization problem. Neither of them has taken the important prompt space into account, where we demonstrated the importance of prompt optimization in Sec. 3 In addition, GPTSwarm (Zhuge et al. 2024) optimizes the connections between agentic nodes using a policy gradient algorithm. State-of-the-art automatic agent design methods, ADAS (Hu et al. 2024a) and AFlow (Zhang et al. 2024b), also attempt to optimize agentic workflows with advanced search algorithms and LLM as optimizers. Concurrently with us, MaAS (Zhang et al.) 2025) optimizes an agentic supernet for -eeendde MAS. However, we observe that the importance of prompt designs has been relatively under-studied in these prior works.
9

---

Published as a conference paper at ICLR 2026
6 CONCLUSION
We approach designing effective MAS by first conducting a thorough analysis of the massive design space, revealing the crucial role of prompts, and identifying the redundancy in MAS search space design. Building on these findings, we introduce MASS, a novel multi-stage optimization framework that searches within a pruned design space, interleaving prompt and topology optimization to efficiently generate high-performing MAS. MASS is agnostic to customized prompt optimizers and topology design space. Our experiments demonstrate that MASS-optimizer MAS significantly outperforms existing manual and automated approaches across an extensive set of tasks. Finally, based on the optimized systems discovered by MASS, we extract valuable design principles to guide the development of future MAS, and we expect future prospective prompt and topology designs integrated with MASS towards building more efficient and effective LLM-based agents.
ACKNOWLEDGMENT
We thank Jinsung Yoon and all other colleagues from Google Cloud AI Research for their valuable feedback. The work has been supported by the UK Research and Innovation (UKRI) Frontier Research Grant EP/Y031350/1 (the UK government's funding guarantee for ERC Advanced Grants) awarded to Anna Korhonen at the University of Cambridge. The work has also been supported in part by a Royal Society University Research Fellowship (no 227;37; 2022-) awarded Ivan Vulić, and by the UK EPSRC grant EP/T02450X/1.
REPRODUCIBILITY STATEMENT
We include detailed implementation details with hyperparameter settings in Sec. 4 and Appendix, C The specification of datasets is listed in Table 2 We list the MASS search space in Table 3 and the multi-agent construction rules in Appendix. C.3 In addition, we provide the visualization of both the minimum building blocks and the optimized topology Fig. g Furthermore, we provide the full prompt templates to each agent to fully reproduce the main experiments in Appendix.
REFERENCES
Anthropic. The claude 3 model family: Opus, sonnet, haiku. 2024.
Jacob Austin, Augustus Odena, Maxwell Nye. Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoe Le, al. Program synthesis with large language models. arXiv preprint arXiv:2 008.0773, 2021.
Yushi Bai, Xin Lv, Jiajie Zhang, Hongchang Lyu, Jiankai Tang, Zhidian Huang, Zhengxiao Du, Xiao Liu, Aohan Zeng, Lei Hou, Yuxiao Dong, Jie Tang, and Juanzi Li. LongBench: A bilin- gual, multitask benchmark for long context understanding. In Lun-Wei Ku, Andre Martins, and Vivek Srikumar (eds.), Proceedings of the 62nd Annual Meeting of the Association for Com- putational Linguistics (Volume 1: Long Papers), pp. 3119-3137, Bangkok, Thailand, August 2024. Association for Computational Linguistics. doi: 1...866331/20222acllooo 172. URL org. 2024 1ong.
Justin Chen, Swarnadeep Saha, and Mohit Bansal. ReConcile: Round-table conference im- proves reasoning via consensus among diverse LLMs. In Lun-We Ku, Andre Martins, and Vivek Srikumar (eds.), Proceedings of the 62nd Annual Meeting of the Association for Com- putational Linguistics (Volume 1: Long Papers), pp. 7066-7085, Bangkok, Thailand, August URL
2024a. Association for Computational Linguisties. doi: 10. 12.18663/1/2024.acloooggg... 3817
Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde De Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code. arXiv preprint S..iv:22077033777 2021.
Weize Chen, Yusheng Su, Jingwei Zuo, Cheng Yang. Chenfei Yuan, Chi-Min Chan, Heyang Yu, Yaxi Lu, Yi-Hsin Hung, Chen Qian, Yujia Qin, Xin Cong, Ruobing Xie, Zhiyuan Liu, Maosong
10

---

Published as a conference paper at ICLR 2026
Sun, and Jie Zhou. Agentverse: Facilitating multi-agent collaboration and exploring emergent behaviors. In The Twelfth International Conference on Learning Representations, 2024b. URL
net/ httts::/ h Iorummid-Ellg5GDyye
Xinyun Chen, Renat Aksitov, Uri Alon, Jie Ren, Kefan Xiao, Pengcheng Yin, Sushant Prakash, Charles Sutton, Xuezhi Wang, and Denny Zhou. Universal self-consistency for large language models. In ICMML2222 Workshop on In-Context Learning, 2024c. URL UBLL:ttp:////ppeeeeee Det/Eozum?idd-issjHl 7nAN
Xinyun Chen, Maxwell Lin, Nathanael Schärli, and Denny Zhou. Teaching large language models to self-debug. In The Twelfth International Conference on Learning Representations, 2024d. URL
Tttts://apenreviee
net wttp:/ewweee/oormteeteitooo
Ching-An Cheng, Allen Nic, and Adith Swaminathan. Trace the next autodiff: Generative optimization with rich feedback, execution traces, and LLMs. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL httpp:: Det//oormmideee Sdt.ummDniddrrrdmmmmmmmmm 9tD
Yilun Du, Shuang Li, Antonio Torralba, Joshua B. Tenenbaum, and Igor Mordatch. Improving factuality and reasoning in language models through multiagent debate. In Forty-first International Conference on Machine Learning, ICML 2024, Vienna, Austria, July 21-27, 2024. OpenReview.net, 2024. BRLbttps:: /ttpss://ppezzevicc. htt.://www....ae..ooooooaaaaaaaa
net wow.mooi-=
Dheeru Dua, Yizhong Wang, Pradeep Dasigi. Gabriel Stanovsky, Sameer Singh, and Matt Gardner. DROP: reading comprehension benchmark requiring discrete reasoning over paragraphs. In Jill Burstein, Christy Doran, and Thamar Solorio (eds.), Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volune I (Long and Short Papers), pp. 3368-2378, Minneapolis, Minnesota, June 2019, Association for Computational Linguistics. doi: 10. 10.18653////N19-12466 URL https
//aclanthology:
Siyuan Guo, Cheng Deng, Ying Wen, Hechang Chen, Yi Chang, and Jun Wang. Ds-agent: Automated data science by empowering large language models with case-based reasoning, 2024. URL
https://arxiv http://awwxxv.oo/////////////
1743
Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. Measuring mathematical problem solving with the math dataset. NeurIPS, 2021. URL bttps::/openrevieet http://ee///tteeeeeeeeeee wwtp:eeeeeeiieeeeeeeeeeeeeeeeeee 2mOsCe,
Xanh Ho. Anh-Khoa Duong Nguyen, Saku Sugawara, and Akiko Aizawa. Constructing multi- hop QA dataset for comprehensive evaluation of reasoning steps. Donia Scott, Nuria Bel, and Chengqing Zong (eds.), Proceedings of the 28th International Conference Computa- tional Linguistics, pp. 6625,6625, Barcelona, Spain (Online), December 2020, International Committee on Computational Linguistics. doi: 10.18653/11/2220.oolii wtwp::222220.oiinnnmm.....0. m8in.580. URL
Shengran Hu, Cong Lu, and Jeff Clune. Automated design of agentic systems. arXiv preprint wrXiv:2408.08435 2024a.
Xueyu Hu, Ziyu Zhao, Shuang Wei, Ziwei Chai, Qianli Ma. Guoyin Wang, Xuwu Wang, Jing Su, Jingjing Xu, Ming Zhu, Yao Cheng, Jianbo Yuan, Jiwei Li, Kun Kuang, Yang Yang, Hongxia Yang, and Fei Wu. Infiagent-dabench Evaluating agents on data analysis tasks, 2024b. URL https:
// httpvvivvv... org/ awwpg//b///// 2401. 05507
Naman Jain, King Han, Alex Gu, Wen-Ding Li, Fanjia Yan, Tianjun Zhang, Sida Wang, Armando Solar-Lezama, Koushik Sen, and Ion Stoica. Livecodebench: Holistic and contamination free evaluation of large language models for code. arXiv preprint 2xXiv22403.07974, 2024.
Carlos E Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, and Karthik Narasimhan. Swe-bench: Can language models resolve real-world github issues? arXiv preprint arXiv:2310.06770, 2023.
11

---

Published as a conference paper at ICLR 2026
Kirthevasan Kandasamy, Willie Neiswanger, Jeff Schneider, Barnabas Poczos, and Eric P Xing. Neural architecture search with bayesian optimisation and optimal transport. Advances in neural information processing systems, 31, 2018.
Akbir Khan, John Hughes, Dan Valentine, Laura Ruis, Kshitij Sachan, Ansh Radhakrishnan, Edward Grefenstette, Samuel R. Bowman, Tim Rocktäschel, and Ethan Perez. Debating with more persuasive LLMS leads to more truthful answers. Forty-first International Conference on Machine Learning, 2024. httth:://pppeeettt
ew net. ftrrmrorrmm//m fatrrrmmmd=iIZC5 7F
Omar Khattab, Amny Singhvi, Paridhi Maheshwari, Zhiyuan Zhang, Keshav Santhanam, Sri Vard- hamanan A, Saiful Haq, Ashutosh Sharma, Thomas T. Joshi, Hanna Moazam, Heather Miller, Matei Zaharia, and Christopher Potts. DSPy: Compiling declarative language model calls into state-of-the-arr pipelines. In The Twelfth International Conference on Learning Representations, 2024. URL htttt:t//
net
Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. Large language models are zero-shot reasoners. Advances in neural information processing systems, 35: 22199-222 2022.
Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, al. Setrieval-augmente genera- tion for snowledge-intensing nlp tasks. Advances in Neural Information Processing Systems, 33: 9459 9474, 2020.
Junyou Li, Qin Zhang, Yangbin Yu, QIANG FU, and Deheng Ye. More agents is all you need. Transactions Machine Learning Research, 2024a. ISSN 2835-8856. URL https
//openreview.oo net.:/iwwwweeeeeeeeeeeeee.e.eeee
Manling Li, Shiyu Zhao, Qineng Wang, Kangrui Wang, Yu Zhou, Sanjana Srivastava, Cem Gokmen, Tony Lee, Li Erran Li, Ruohan Zhang, Weiyu Liu, Percy Liang, Li Fei-Fei, Jiayuan Mao, and Jiajun Wu. Embodied agent interface: Benchmarking Ilms for embodied decision making, 2025.
URL htt.htttt/s/ettt http:///xvvvv..eeeeeee wtwp://ggg/ab//a//e..
07166
Yunxuan Li, Yibing Du, Jiageng Zhang, Le Hou, Peter Grabowski, Yeqing Li, and Eugene Ie. Improving multi-agent debate with sparse communication topology. In Yaser Al-Onaizan, Mohit Bansal, and Yun-Nung Chen (eds.), Findings of the Association for Computational Linguistics: EMNLP 2024, pp. 7281-7294, Miami, Florida, USA, November 2024b. Asso- ciation for Computational Linguistics. doi: 10.18653/v1/200 petes://aclantholo.e otg/22/2....2222/0/ findings-emrl 427/
htt.://iin.iinnneemmii.. findings-emmlp.4271 URL
Zelong Li, Shuyuan Xu, Kai Mci, Wenyue Hua, Balaji Rama, Om Raheja, Hao Wang. He Zhu, and Yongfeng Zhang. Autoflow; Automated workflow generation for large language model agents. arXiv preprint ArXiv:2407. 10.0007.//282 1221,, 2024c.
Tian Liang, Zhiwei He, Wenxiang Jiao, Xing Wang, Yan Wang. Rui Wang, Yujiu Yang, Shuming Shi, and Zhaopeng Tu. Encouraging divergent thinking in large language models through multi-agent debate. In Yaser Al-Onaizan, Mohit Bansal, and Yun-Nung Chen (eds.), Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pp. 17889 17904, Miami, Florida, USA, November 2024. Association for Computational Linguistics. doi: 10. 18.15653/vI/ www..emnlppaaa 992. URL /tt.tttss://aclaaaaiatt htt///aaaaaatttooooyoooooo org/ 22rgg/22222 2224
emnlp main. 9927
Lei Lin, Jiayi Fu, Pengli Liu, Qingyang Li, Yan Gong, Junchen Wan, Fuzheng Zhang, Zhongyuan Wang, Di Zhang, and Kun Gai. Just ask one more time! self-agreement improves reasoning of language models in (almost) all scenarios. In Lun-Wei Ku, Andre Martins, and Vivek Srikumar (eds.), Findings of the Association for Computational Linguistics: ACL 2024, pp. 3829-3852, Bangkok, Thailand, August 2024. Association for Computational Linguistics. doi: 10. 1//2024findings-a ac1.230. URL https: https////claaatolloyoooo/////// www.:iii...iiiinisn.s........e..
2307
Fengyuan Liu, Nouar AlDahoul, Gregory Eady, Yasir Zaki, Bedoor AIShebli, and Talal Rahwan. Self-reflection outcome is sensitive to prompt construction. arXiv preprint 2.V::2406.10000 2024a.
12

---

Published as a conference paper at ICLR 2026
Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search, arXiv preprint arXiv:1806.0905: 2018.
Zijun Liu, Yanzhe Zhang. Peng Li, Yang Liu, and Diyi Yang. dynamic LLM-ppoeree agent network for task-oriented agent collaboration. In First Conference Language Modeling, 2024b.
URL
net tameee/forumt forum? dd=XIIOmpXXA9
Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, et al. Self-refine: Iterative refinmmnt with self-feedback. Advances in Neural Information Processing Systems, 36, 2024.
Mistral. Mistral nemo. 2024. URL https: http://issaaaaainniiaaaa
Krista Opsahl-Ong, Michael Ryan, Josh Purtell, David Broman, Christopher Potts, Matei Zaharia, and Omar Khattab. Optimizing instructions and demonstrations for multi-stage language model programs. In Yaser Al-Onaizan, Mohit Bansal, and Yun-Nung Chen (eds.), Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pp. Florida, USA, November 2024. Association for Computational Linguistics. doi: 10.18653/v1/ 4024.emnlp-mane 525.. URL htwp::ttts/// //acs htt///acaannhhooo ant ogy org/ 2224.. emn mammaan.... 5255
Miami,
Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang. Sandhini Agarwal, Katarina Slama, Alex Ray, et al. Training language models to follow instructions with human feedback. Advances in neural information processing systems, 35:27730- 27744, 2022.
Reid Pryzant, Dan Iter, Jerry Li, Yin Lee, Chenguang Zhu, and Michael Zeng. Automatic prompt optimization with "gradient descent" and beam search. In Houda Bouamor, Juan Pino, and Kalika Bali (eds.), Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pp. 7957-7968, Singapore, December 2023. Association for Computational Linguis- tics. doi: 10. (0.18853311/2023.1 http:////2200.../mmma.m....mmmm www.l--mannnnnnee URL httpps://aclantholoogy.. org/2023 emm p- ma n. 4 4
Chen Qian, Zihao Xie, Yifei Wang, Wei Liu, Yufan Dang, Zhuoyun Du, Weize Chen, Cheng Yang, Zhiyuan Liu, and Maosong Sun. Scaling langeal wee-llngug--mmmll-baaeeeeee masel- multi-agent collaboration. arXiv preprint arXiv:2406.07155, 2024.
Shuofei Qiao, Ningyu Zhang, Runnan Fang, Yujie Luo, Wangchunshu Zhou, Yuchen Jiang, Chengfei Lv, and Huajun Chen. AutoAct: Automatic agent learning from scratch for QA via self-planning. In Lun-Wei Ku, Andre Martins, and Vivek Srikumar (eds.), Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume I: Long Papers). pp. 3003- 3021, Bangkok, Thailand, August 2024, Association for Computational Linguistics. doi: 10.18653/ v1/2024.acl-long. 165. URL /RLLhhtss://accal http:////aaaaattoooooooo wwwpl/oooyorgg/2230 org/2024 lacc-looge 1657
Machel Reid, Nikolay Savinov, Denis Teplyashin, Dmitry Lepikhin, Timothy Lillicrap. Jean- Baptiste Alayrac. Radu Soricut, Angeliki Lazaridou, Orhan Firat, Julian Schrittwieser, Ioannis Antonoglou, Rohan Anil. Sebastian Borgeaud, Andrew M. Dai, Katie Millican, Ethan Dyer, Mia Glaese, Thibault Sottiaux, Benjamin Lee, Fabio Viola, Malcolm Reynolds, Yuanzhong Xu, James Molloy, Jilin Chen, Michael Isard, Paul Barham, Tom Hennigan, Ross Mcllroy, Melvin Johnson, Johan Schalkwyk, Eli Collins, Eliza Rutherford, Erica Moreira, Kareem Ayoub, Megha Goel, Clemens Meyer, Gregory Thornton, Zhen Yang, Henryk Michalowski, Zaheer Abbas, Nathan Schucher, Ankesh Anand, Richard Ives, James Keeling, Karel Lenc, Salem Haykal, Siamak Shakeri, Pranav Shyam, Aakanksha Chowdhery, Roman Ring, Stephen Spencer, Eren Sezener, and al. Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context. CoRR, abs/2403.055500, 2024, doi: 10.48550/ARXI..4003.5555 URL https //doi.org/11 48550 2403. 05530
Binxin Ru, Xingchen Wan, Xiaowen Dong, and Michael Osborne. Interpretable neural architecture search via bayesian optimisation with weisfeiler-lehman kernels. International Conference on Learning Representations (ICLR), 2021.
Jon Saad-Falcon, Adrian Gamarra Lafuente, Shlok Natarajan, Nahum Maru, Hristo Todorov, Etash Guha, E Kelly Buchanan, Mayee Chen, Neel Guha, Christopher Ré, et al. Archon: An architecture search framework for inference-tine time techniques. arXiv preprint a4Xiv:2409. /5254, 2024.
13

---

Published as a conference paper at ICLR 2026
Yu Shang, Yu Li, Keyu Zhao, Likai Ma, Jiahe Liu, Fengli Xu, and Yong Li. Agentsquare: Automatic Ilm agent search in modular design space. arXiv preprint arXiv:2410.06153, 2024.
Noah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. Reflexion: Language agents with verbal reinforcement learning. Advances in Neural Information Processing Systems, 36, 2024.
Aditi Singh, Abul Ehtesham, Saket Kumar, and Tala Talaci Khoci. Agentic retrieval-augmennne generation: A survey on agentic rag. arXiv preprint arXiv:2501.09133 2025.
Hongjin Su, Ruoxi Sun, Jinsung Yoon, Pengcheng Yin, Tao Yu, and Sercan Ô Ank. Learn-by- interact: A data-centric framework for self-adaptive agents in realistic environments. arXiv preprint arXiv:2501.1089) 2025.
Harsh Trivedi, Niranjan Balasubramanian, Tushar Khot, and Ashish Sabharwal. MuSiQue: Multihop questions via single-hop question composition. Transactions of the Association for Computational doi: 10. 00475. URL httthttps: http:///aalaahhhh//ooo ogy
Linguistics, 10:539-554 554, 2022.
htg/2022.tacl-12 tac
Mudit Verma, Siddhant Bhambri, and Subbarao Kambhampati. On the brittle foundations of react prompting for agentic large language models. arXiv preprint arXiv:2405. 1366, 2024.
Xingchen Wan, Binxin Ru, Pedro M Esperança, and Zhenguo Li. On redundancy and diversity in cell-based neural architecture search. In International Conference on Learning Representations, 2022.
Xingchen Wan, Ruoxi Sun, Hootan Nakhost, and Sercan O Arik. Teach better show smarter? on instructions and exemplars in automatic prompt optimization. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL / net/ -eeeeiidddddtoooooooo oJVWVVX
Fei Wang, Xingehen Wan, Ruoxi Sun, Jiefeng Chen, and Sercan Ô Ank. Astute rag: Overcoming imperfect retrieval augmentation and knowledge conflicts for large language models. arXiv preprint arXiv:2410.07176, 2024a.
Junlin Wang. Jue Wang, Ben Athiwaratkum, Ce Zhang, and James Zou. Mixture-of cexture-of-agent enhances large language model capabilities. arXiv preprint arXiv:2406. 240.:229...6.9.,, 2024b.
Qineng Wang. Zihao Wang, Ying Su, Hanghang Tong, and Yangqiu Song. Rethinking the bounds of LLM reasoning: Are multi-agent discussions the key? In Lun-Wei Ku, Andre Martins, and Vivek Srikumar (eds.), Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Pupers), pp. 6106-6131, Bangkok, Thailand, August 2024c. Association for Computational Linguistics. doi: 10. htt/33/w112224.aclooongggg 2024 acl- 3317]
URL
https://aclanthnn
Wenyi Wang, Hisham A Alyahya, Dylan R Ashley, Oleg Serikov, Dmitrii Khizbullin, Francesco Faccio, and Jürgen Schmidhuber. How to correctly do semantic backpropagation on language-based agentic systems. arXiv preprint arXhv:2412.03622 2024d.
Xuezhi Wang. Jason Wei, Dale Schuurmans, Quoc V Le. Ed H. Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. Self-consistency improves chain thought reasoning in language models. In The Eleventh International Conference on Learning Representations, 2023. URL
http::////pe.eeei.....mm net/ wtt..eeeeeeoooooeee.1ee1
Colin White, Mahmoud Safari, Rhea Sukthanker, Binxin Ru, Thomas Elsken, Arber Zela, Debadeepta Dey, and Frank Hutter. Neural architecture search: Insights from 1000 papers. arXiv preprint arXiv:2301.08777. 2023.
Qingyun Wu, Gagan Bansal, Jieyu Zhang, Yiran Wu. Shaokun Zhang, Erkang Zhu, Beibin Li, Li Jiang, Xiaoyun Zhang, and Chi Wang. Autogen: Enabling next-gen Ilm applications via multi-agent conversation framework. arXiv preprint arXiv:2308.08/55, 2023.
Chunqiu Steven Xia, Yinlin Deng, Soren Dunn, and Lingming Zhang. Agentless: Demystifying llmebased software engineering agents. arXiv preprint arXiv:2407.01488 2024.
14

---

Published as a conference paper at ICLR 2026
Chengrun Yang. Xuezhi Wang, Yifeng Lu, Hanxiao Liu, Quoe V Le, Denny Zhou, and Xinyun Chen. Large language models as optimizers. In The Twelfth International Conference on Learning Representations, 2024.
Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William Cohen, Ruslan Salakhutdinov, and Christopher D. Manning. HotpotQA: A dataset for diverse. explainable multi-hop question answer- ing. In Ellen Riloff, David Chiang. Julia Hockenmaier, and Jun' ichi Tsujii (eds.), Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 2369-2386 Brussels, Belgium, Octoher-November 2018. Association for Computational Linguisties. doi: 1/D/////////I8/II/1
URL https: http://///aaattoooo..oo..oo org/D1 1
Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik R Narasimhan, and Yuan Cao. React: Synergizing reasoning and acting in language models. In The Eleventh International
Conference on Learning Representations, 2023. BRLhttps::/ http://////ppreeeee.eeeee net forum??
/
1d WE vluYUL-X X
Mert Yuksekgonul, Federico Bianchi, Joseph Boen, Sheng Liu, Pan Lu, Zhi Huang, Carlos Guestrin, and James Zou. Optimizing generative ai by backpropagating language model feedback. Nature, 639:609-616, 2025.
Guibin Zhang, Yanwei Yue, Zhixun Li, Sukwon Yun, Guancheng Wan, Kun Wang. Dawei Cheng, Jeffrey Xu Yu, and Tianlong Chen. Cut the crap: An economical communication pipeline for Ilm-based multi-agent systems. arXiv preprint arXiv:2410.02506 2024a.
Guibin Zhang, Luyang Niu, Junfeng Fang, Kun Wang, Lei Bai, and Xiang Wang. Multi-agent architecture search via agentic supemet. arXiv preprint arXiv:2502.04118 2025.
Jiayi Zhang, Jinyu Xiang, Zhaoyang Yu, Fengwei Teng, Xionghui Chen, Jiaqi Chen, Mingehen Zhuge, Xin Cheng. Sirui Hong. Jinlin Wang, et al. Aflow: Automating agentic workflow generation. arXiv preprint arXiv:240.. 10762, 2024b.
Jintian Zhang, Xin Xu, Ningyu Zhang, Ruibo Liu, Bryan Hooi, and Shumin Deng. Exploring collaboration mechanisms for LLM agents: A social psychology view. In Lun-Wet Ku, Andre Martins, and Vivek Srikumar (eds.), Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume I: Long Papers), pp. 14544-14607, Bangkok, Thailand, August 2024c. Association for Computational Linguistics. doi: 10. 10.18653111/2222aco-ooggg
URL https: http::://acaaattth..o
org/ 2024 acl- -ong. 782/|
Shaokun Zhang, Jieyu Zhang, Jiale Liu, Linxin Song, Chi Wang, Ranjay Krishna, and Qingyun Wu. Offline training of language model agents with functions as learnable weights. In Forty-first International Conference on Machine Learning, 2024d. URL
2orum?id-2xbkWi 2xbkWiEuRl
Wenqi Zhang, Ke Tang, Hai Wu, Mengna Wang, Yongliang Shen, Guiyang Hou, Zeqi Tan, Peng Li, Yueting Zhuang, and Weiming Lu. Agent-pro: Learning to evolve via policy-level reflection and optimization. In Lun-We Wei Ku, Andre Martins, and Vivek Srikumar (eds.). Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume I: Long Papers), pp. -375, Bangkok, Thailand, August 2024e. Association for Computational Linguistics. doi: 10. 1/8663//1/2024.clllloooo 2927
URL httttp::/acllanthologg... hwwp://hooooyy.../222...o2o attp./.....0.2..1110............ -ong
Yusen Zhang, Ruoxi Sun, Yanfei Chen, Tomas Pfister, Rui Zhang, and Sercan O Arik. Chain of agents: Large language models collaborating on long-context tasks. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024f. URL httl:ttss///opeeeeeeee
nett/oorumidd=occe 4BJsr
Han Zhou, Xingchen Wan, Ivan Vulić, and Anna Korhonen. Survival of the most influential prompts: Efficient black-box prompt search via clustering and pruning. In Houda Bouamor, Juan Pino, and Kalika Bali (eds.). Findings of the Association for Computational Linguistics: EMNLP 2023, pp. 13064-13077, Singapore, December 2023a. Association for Computational Linguistics. doi: 1 1/2023. hang:///i/022....nnnnnnmoomm aiddings-emnl..800.. URL https: http:///aaaaattoy...c// wwwphooloooyyy..2223333333
find findings--ae emn emn
870/
15

---

Published as a conference paper at ICLR 2026
Han Zhou, Xingchen Wan, Yinhong Liu, Nigel Collier, Ivan Vulić, and Anna Korhonen. Fairer preferences elicit improved human-aligned large language model judgments. In Yaser Al-Onaizan, Mohit Bansal, and Yun-Nung Chen (eds.), Proceedings of the 2024 Conference Empirical Methods in Natural Language Processing, pp. 1241-1252, Miami, Florida, USA, November 2024a. Association for Computational Linguistics. doi: 10.
72. URL
https::/acllanhclloryoooo wttp://iwoo..rr/.2....ooo emnlp main... 727
Han Zhou, Xingchen Wan, Lev Proleev, Diana Mincu, Jilin Chen, Katherine A Heller, and Subhrajit Roy. Batch calibration: Rethinking calibration for in-context learning and prompt engineering. In The Twelfth International Conference on Learning Representations, 2024b. URL https
/
//openreviww.o n -eiiddd3-.o22--
Wangchunshu Zhou, Yixin Ou, Shengwei Ding, Long Li, Jialong Wu, Tianaan Wang, Jiamin Chen, Shuai Wang, Xiaohua Xu, Ningyu Zhang, al. Symbolic learning enables self-evolving agents. arXiv preprint arXiv:2406. 18532, 2024c.
Yongchao Zhou, Andrei Ioan Muresanu, Ziwen Han. Keiran Paster, Silviu Pitis, Harris Chan, and Jimmy Ba. Large language models are human-level prompt engineers. In The Eleventh International Conference on Learning Representations, 2023b. URL httpss://ppptrreeeee
Mingchen Zhuge, Wenyi Wang, Louis Kirsch, Francesco Faccio, Dmitrii Khizbullin, and Jürgen Schmidhuber. GPTSwarm: Language agents optimizable graphs. In Forty-first International Conference on Machine Learning, 2024. URL uTC9AFXIhq
ew www.tetttorrnoeeo forum? id==
16

---

Published as a conference paper at ICLR 2026
A THE USE OF LARGE LANGUAGE MODELS
Large language models (LLMs) were used as general-purpose assist tools in this work. Specifically, LLMs assisted in polishing the writing improve clarity and readability.
B LIMITATIONS AND FUTURE WORK
MASS is multi-agent design meta-frameworf also orthogonal prompt and topology optimizers. MASS has brought substantial improvements over a single agent design by searching in customizable topology space. Though our proposed topology space has covered the vast majority of effective MAS designs, including serial, parallel, and mixture of connections, it is still likely that incorporating other topologies may further improve the final performance of MASS, which is complementary to the development of MASS. For instance, the debate topology proposed in MASS involves fully-connected topology across agents. Recent work has been identifying the sparsity of agent communications (Li et al. 2024b Zhang al.) 2024a), and pruning redundant communications may further enhance the overall efficiency of the strongest MAss-found design. Though the topology optimizer in MASS already traverses efficiently in the proposed topology space, incorporating more advanced search algorithms, such as the Bayes optimizer (Kandasamy et al.) 20188 Ru et al., (02I), may further improve the sample efficiency of MASS when f'aes a more complex design space. Similarly, the sample efficiency of the prompt optimizer may be further enhanced by conditioning on textual feedback from error logs (Pryzant al. 2023] Cheng al. (2024), which will endeavor to explore in future work. These prospective future topology and prompt design methods will further strengthen MASS, while MASS has been served as generalizable guideline in identifying influential agentic design components and systematic framework for scalable MAS optimization.
C IMPLEMENTATION DETAILS
C.I DATASETS
In this work, we included the following dataset: 1) Hendryck's ' MATH (Hendrycks et al. 2021
consisting competition-leve mathematics problems, and DROP (Dua et al. 2019) requires discrete and symbolic reasoning over paragraphs; 2) HotpotQA (Yang al., 2018). MuSiQue (Trivedi
al. 2022). and 2WikiMultiHopQA (Ho et al.) 2020) to evaluate long-context reasoning with agentic systems, which we report from standardized versions in LongBench (Bai et al. 2024); 3) MBPP (Austin et al. 2021). HumanEval (Chen et al. 2021), and LiveCodeBench (Jain et al. 2024 as well-established coding benchmarks. Regarding BeveCh task as an agent cooperative task. In line with AFlow (Zhang et al., 2024b), we use the public test cases of MBPP and HumanEval for the executor retrieve reliable external feedback signals. To
use the 'test output prediction'
save computation resources, we randomly sample a subset of the original validation and test splits to conduct all the experiments, where the specifications are reported in Table
Table The specification of evaluation tasks: dataset split, topology search space, and the MASS- optimized MAS (on Gemini 1.5 Pro).
Task
Type
Val]
[Test]
Topology Search Space
MAsS
MATH
Mathematical Reasoning
60
100
(Aggregate, Reflect, Debate] (Aggragate, Reflect Debate)
(9. 0p.0.00
DROP
Discrete Reasoning
60
(5
HorporQA
Long-context Understanding
50
(Summarize,, Aggregate, Rec, Debate)
(0. 1}
MuSiQue
Long-comtext Understanding
50
(Summarize, Aggreqate, Augrarrte. Retlect, Debate)
(0.3,
2WikIMQA
Long-comtext Understanding
50
(Summarize, Auggarize..gggeeaate Aggzegate, Reflect, Debate]
(0.
MBPP
Coding
60
200
(Aggregate, Reflect, Debate, Executor)
(1.4.0,
HumanEval
Coding
50
100
(Aggregate, Reflect, Debate, Executor]
(1.3,0,
LiveCodeeench
Coding: lest output prediction
100
200
(Aggregate, Reflect, Debate, Executor)
1.
17

---

Published as a conference paper at ICLR 2026
@
Topology Building Blocks
Summarize
Aggregate
Reflect
Debate
Executor
R
+
MASS-optimized Topology
MATH
DROP
HorporQA
MuSiQue
ZWixMGA
MBPP
Humenisell
LiveCocleBecch
D
D
DDI
E
R
X5
x5
E
Figure 8: Visualization the topology building blocks and best MASS dissoveico topologies from Gemini 1.5 Pro.
Table 3: The search dimension for each topology. The minimum topology defines the building block that MASS Stage (1) optimized. We refer the definition search space to Sec 2.2
Topology
Search Space
Minimum Topology Building Block
Definition
Summazize
N, E
[0, 1, 4)
Summarizer Predictor
Rounds of summarization
Aggrogate
N, E (1,9,5,7,9)
3 Predictor Aggregatoor
Number of parallel agents
Reflact
N, E (,
1 PFedicctor+ + Reflector
Rounds of rell-reetection
Debate
Na E 1,,,343)
2 Frediettrr Debator
Rounds of debating
Execute
N. (0,1)
Predictter Executer Reflecter)
Use of code execution
C.2 BASELINES
In this section, we report the specifications of all our baselines. We note that for the baselines: CoT, SC, Self-Refine and Multi-Agent Debate, follow the prompts given in ADAS (Hu al. 2024a).
1) ofain-of--hhuugh (CoT) (Kojima et al. (022). Direct chain-of -hhtuughht reasoning via zero-shot prompting: "Please think step by step and then solve the task."
2) Self-Consistency (SC) (Wang et al. 2023 In self-consistency. we generate diverse chain-of- thought reasoning traces with temperature of 0.8, followed by rule-based majority vote that collects the most consistent answer. In Table I baselines.
we report SC@9 to provide a fair comparison across
3) Self-Refine (Madaan et al. 2024): This baseline consists of one predictor that constantly takes feedback and self-reflector that provides criticism. It involves a stop criterion whenever the self- reflector outputs "correct" in its prediction. We set the maximum number of rounds of reflections to 5) calls.
5, such that the worst case will involve 11
4) Multi-Agent Debate (Du et al. 2024 Liang et al. 2024). In this baseline, it involves 3 agents that conduct reasoning and debating for rounds. The opinions along the rounds of debating are finally judged by aggregator that makes the final prediction. Hence, it contains 10 (3 x 3 + 1) agents.
5) Automated Design of Agentic Systems (ADAS) (Hu et al., 2024a). Consistent with our main experimental setups. We use Gemini 1.5 as both I.LM optimizer and evaluator for reproducing all ADAS results. The generation of ADAS conditioned on former evaluations of baselines, including COT, SC, Self-Refine, and Multi-Agent Debate. We report ADAS with 30 rounds of search, and each round is evaluated on the validation set 3 times to stablize the prediction.
6) AFlow (Zhang al. 2024b). Automatic workflow design via Monte-Carlo Tree Search over set of pre-defined operators. Similar to ADAS, AFlow also relies on an LLM optimizer to generate new nodes and topologies expressed in codes. However, find the meta peta-prompp of AFlow does not generalize to other LLM backbones. Consequently, we report AFlow with its original LLM optimizer by Claude 3.5 Sonnet, and reproduce experiments with Gemini 1.5 Pro the LLM executor.
18

---

Published as a conference paper at ICLR 2026
Therefore, the comparison is not completely fair, and treat the results from AFlow good reference. We note that the '-' in Table refers to out-of-time errors, where the LLM executor has been trapped in executing accidental scripts with infinite loops. We still endeavored to report most results from AFlow as shown in Table & Fig. 6 with the default experimental setup from AFlow: 20 rounds, runs of validation per round, and k at
C.3 MASS DETAILS AND CONSTRUCTION RULES
In this section, we provide additional details for MASS. The topology search space for each task is defined Table 2 In addition, for Stage (1) block-level prompt optimization, the specification the building block is defined in Table 3 MASS follows simple and predefined rule for constructing different topologies in sequence. Throughout our study, we find that the impact of different agentic configurations outweighs the ordering substantially. Consequently, agent designs by constructing topology in fixed order of
rule follows the practice of aggregate] e] When multiple search dimensions (s Isumarizee, re reflect, debate, kept active, aggregate basically controls the number of chain-of agentts in parallel, where the length of the chain defined via the pre-defined order. We provide the visualization of both the minimum building blocks and the optimized topology in Fig. [ We refer the reader to App. $E& & F for the prompt templates we used to define each type of agent and the best prompts discovered.
D ADDITIONAL EXPERIMENTS
D.1 GENERALIZATION ACROSS LLM BACKBONES
Table Results on the evaluation set with Claude 3.5 Sonnet. We keep the same experimental setup as T Since Claude 3.5 Sonnet does not support the same context window as Gemini, we report the standard HotpotQA instead of the LongBench. As we transfer the prompt template for each agent from Gemini to Claude, it is noticeable that the basic topology some tasks may result in severe degradation performance, and MASS successfully recovers the performance and brings significant improvements over the initial agent.
Claude-2 1ereeee3.5-8000 G-8onnet
Task
Reasoning
Multi-hop HotpotQA
Coding HumanEval
Method
MATH
DROP
MBPP
LCB
Avg.
CoT
57,33,
a5
23.56
67.50, A7
88.67 no
72.67
60.21
Self-Consistency
61.67,.89
57 37.86
25.69
69.17e.2
90. 90.00usz
72.672.99
62.84
Self-Refine
57.00
$6.26ise
23.57
68. 68.00
87.00 87.00,a
49,33
56,86
Multi-Agent Debute
45.00
26.62o.1
31.413.30
00.00k.00
84. 84.33
72.821.4
43.36
63.00..c
68.93)
66.98,.9
68.83662
93.00buz
73.73
72.43
Table 5: Results the evaluation with the open-source model, Mistral-Nemo- 12B. We keep the same experimental setup as Table evaluate subset of representative coding tasks to save resources. MASS demonstrate consistent improvements over the baselines on Mistral Nemo.
Mistral Nemo -1B
Reasoning
Multi-hop HotpoiQA
Coding MBPP
Method
MATH
DROP
Avg.
C6T
13.3
49.0
55.9
43.5
40.4
Self-Consistency
22.0
57.6
58.9
46.5
46.3
Self-Refine
14.3
40.9
Multi-Agent Debate
26.0
61.4
59.5
40.5
46.9
MASS
43.7
68.4
62.6
48.7
55.9
D.2 DISCUSSION ON MASS-FOUND TOPOLOGIIS
In Fig. g we find that the optimal MAss-found topologies indicate certain patterns per task family, and there are topologies that demonstrate clear advantages other topologies in particular tasks.
19

---

Published as a conference paper at ICLR 2026
Table 6: The detailed ablation results per optimization stage of MASS. Practical gains can be obtained by further conducting workflow-level prompt optimization (3PO) on the best-found topology.
Gemini 1. 5-pro-002
Task
Reasoning
Multi-hop Long-context
Coding HumanEEvll
Method
MATH
DROP
HoipotQA
MuSiQue
2WikiMQA
MBPP
LCB
Avg.
Base Agent
62.33p
71.65p.1
56,961
43.32a.13
49.20n.s
68.8 68.83ass
89.33
66.332.m
63,54
APO
79.33
77.5
59.72am
43.97am
61.49h.24
67.00,.s
86.33
68.50
67.44
+ IPO
80.00gm
86.45ps0
62.52 s6
48. 8..86.
67.40g
80.33
91.67
76.00p.
74.56
+ 2TO
83.00
86.75
65.22
52.61asz
72.82qa6
85.00,
92.00uxa
81.330000
77.55
3PO
84.67p.r
90.52p.64
69.91
51.40gu2
73.34p67
86.50k.
91.670.47
82.33
78.40
Table 7: The training and inference cost for rumning MASS and baselines, where we show the training cost and the actual run-time of MASS is comparable to the training cost of auto-agent baselines. We note that the performance of self-consistency, self-refine, and multi-agent debate is already saturated, and further scaling the inference cost of these baselines only brings marginal gains, whereas the MASS-found MAS outperforms the baseline substantially comparable inference token cost.
Training
Inference (per query)
Method
Input Token
Output Token
Cost (S)
Input Token
Ouiput Token
Cost
(%)
Self-C Self-Consistency
1538
3013
0,0010
69.3
Self-Refine
2051
0.0004
71.3
Multi-Agent Debate
6536
2483
0,0012
71.7
AFlow
11M
3.89
2523
1481
0.0006
64.3
ADAS
23 M
13 M
5.61
7850
3335
0.0016
72.7
MASS
24
11 M
5.09
6645
3263
0.0014
81.0
By inspecting Fig. 8 we notice that the "debating" topology brings significant gains to all multi-hop tasks that require factual knowledge: HotpotQA, MuSiQue, and 2WikiMQA, which aligned with previous multi-agent debate work (Khan et al., 2024) that argues debating will clicit more truthful answers. Reasoning tasks: MATH and DROP benefit from more exploration, where SC becomes more effective. Lastly, the coding tasks share a common pattern of reflection with tool-using. However, even the best configuration in the same task family still shows differentiations, indicating the necessity of automatic optimization. Therefore, no matter the underlying complexity of the task-dependent topology. the unique advantage of MASS is being able to identify the most influential topology automatically for any customized search space.
D.3 COST ANALYSIS
To estimate the computation cost, the prompt optimizer evaluates the MAS with K rounds of evaluation, where each round consists of M prompt candidates, and each inference requires ((a) API calls by the number of agents in the MAS. Hence, IPO scales linearly with the number of building blocks J, and its cost can be computed as C(IPO) = N((a), Maa;)) M K. The topology optimization evaluates N topology candidates. Hence, C(2TO) = DN ((W,)) Similar to IPO, 3PO conducts PO on the best-found workflow W such that C(3PO) = -N(") x M x K, and the cost of 3PO scales linearly with the number of agents the network. The final computation cost therefore summation of the cost at individual stages.
In Table 7 we report the detailed token cost for both training MASS and the inference cost per query with reference costs from baselines, where we show that the training cost of MASS is comparable to the training cost of auto-agent baselines. is worth noting that the performance of training free baselines (e.g., self-consistency @9) is already saturated, and further scaling the inference cost of these baselines only brings marginal gains, whereas the MASS- found MAS outperforms baselines substantially. In addition, we record the Pareto-front of MASS optimized designs in Fig. Though the primary objective of this work is a single-objective optimization that targets to maximize the task performance within the same training budget, show that MASS generate Pareto-front of
20

---

Published as a conference paper at ICLR 2026
MATH (gemmm--1.5-pro-0002
MASS
MASS
MASS
MASS
Refine@5
Accuracy (%)
Debate 2R@3A
Step-B COT-CC@sADAS-TSS
Debate 1R@2A
Quality-Diverse
CoT-SC@3
X
AD
CoT
Role Assign
0
1000 2000
3000
4000
5000
6000
7000
8000
Total Tokens
Figure 9: The Pareto-front of MASS MASS-optimized designs compared to multi- agget baselines. Total tokens include both inference input tokens and output tokens. Additional aalti- baselines from ADAS (Hu et al. 2024a) and the two best-found ADAS designs are included.
Table 8: Comparison of MASS with graph optimization baselines. We reproduce GPTSwarm with (Zhang et al. 2024a), and (Pro) (Flash) indicate optimization results from Gemini 1.5 Pro and Gemini 1.5 Flash, respectively.
Method
MATH (%)
HumanEval (%)
Average (%)
GPTSwarm (Pro)
85.0
80.5
MASS (Pro)
84.7
91.7
88.2
GPTSwarm (Flash)
73.0
67.0
MASS (Flash)
81.0
84.7
82.9
optimized MAS designs with stronger token-effectivveess than baselines, and the more cost-efficient workflows can be selected from the pivotal points in the MASS Pareto-front.
D.4 GRAPH OPTIMIZATION BASELINE
We further compare MASS against a graph optimization baseline, GPTSwarm (Zhuge et al. 2024), on the overlapped of tasks from the original work. We observe that the graph optimization is more effective in improving the inference efficiency from fully-connected graph to sparse graph rather than enhancing the task performance, whereas the prompt optimization component of MASS particularly led to more significant contributions. Overall, MASS brought substantial gain (8% and 6% over MATH & HumanEval, respectively) representative reasoning and coding tasks compared to graph optimization methods.
D.5 ABLATION ON PROMPT OPTIMIZERS
MASS is a plug-and-play framework with arbitrary prompt optimizers. We integrate MIPRO Opsahl Ong al. 2024) a representative prompt optimizer due the importance of
instruction and exemplar optimization, which has been justified in both (Wan et al. 2024 Opsahl Ong al. 2024) that show superior performance over OPRO-style (Yang et 20224) instruction-only optimization methods. It is also worth noting that the MASS framework itself is agnostic to the prompt optimizer, and thus any prospective better methods can only enhance the overall performance of MASS. In Table 9 we additionally provide an ablation of common prompt optimizers, APE (Zhou et al., 2023b) & DSPy (Khattab et al.) 2024), and we show MASS with exemplar optimization (+DSPy) also led significant gains. We consider extending the existing PO to feedback-base optimizers (c.g., ProTeGi (Pryzant et al. 2023) or TextGrad (Yuksekgonul et al. (025)) that may come with better sample efficiency desirable future work.
21

---

Published as a conference paper at ICLR 2026
Table Ablation of MASS with different prompt optimizers Gemini 1.5 Flash.
Method
CoT
MASS (APE)
MASS (DSPy)
MASS (MIPRO)
MATH (96)
66.7
73.3
78.2
81.0
E PROMPT TEMPLATE
We provide all the prompt templates we used for defining the MASS search space. We use <> to enclose texts that have been skipped for presentation purposes. We follow the DSPy (Khattab et 2024) in constructing these agentic templates.
The general template for instruction, exemplar, and input/output fields:
cinstructiio>
Tollow following format.
Inpuu: (TTputt)
Output: ;ooutptt;
<example_1>
input: <input>
Output: <output>
MATH:
Predictor:
T think step.
Question: Siquestion)
Reasoning: Let's think stop by step in order to siproduce the answer). We Answer: Blnnswer)
Reflector:
criticize might wrong. you absolutely sure it is correct, output "Trus' in "correctness"..
review answer
Question: Siquestion] s[text]
Reasoning: Let's think step by step in order to 8(produce the cocreciness). Re Feedback: 9ifeedback]
correctneas: Trua/Falae indicating if answer is correct given the question,
Refiner:
Given previous attempts and feedback, carefully consider where you could wrong in your latess attempt. Jaing insights previous attempts, try to salve task your final answer bracketed between <answer> and </anawer> at the end.
Question: Siquestion
Previous enswer: s(peevicus_answez)
Reflection: 3(reflection)
Carrectneass $(carrectness)
Thinking: Sithinking)
Answer: Flanewe:
pabator:
22

---

Published as a conference paper at ICLR 2026
the question agenta in your rationale, firish by giving an updatied answer. Show your finel onswer bracketed between sanswer> </answer> at the end.
agents. ixamine
Question:
liquestion]
Bonsttons: the solutions to the quest from other agents
Raasoning:
step by step
B[Examine the solutions agents!. No
Anawez: The updated anawer for the question. not zepeat Answez:
DROP:
Predictor:
think step by step
Task:
please answar the following questien based on the giver context.
Question: Siquestion)
Context: S(centext)
Thinkings 9ithinking)
Answer: Directly answer the questien. Keep it very conciss.
Reflector:
verify that the answer is based on the provided context. Sive your reflection in the rationale
Question: soguestion]
Context: Stcontext)
Text: S[text)
Reasoning: Let's think stop by step order to siproduce the correctness), We
cortectness: Trua/False indicating if answer correct the chservat and questionn,
Refiner:
elease think step by step and then solve the task. Your Task: Bosed on the reflection, correctness of the previous answar, and tha context again, give an
Question: Siquestion)
Context: $[centext]
Previous s[previcuss_nswer)
Raflection: ((reflection)
Correctneas: $(correotness)
Thinking: S(thinking)
Anawer: Directly anawer the queation. Keep it very concise.
Debator:
These are the stiinsoon to the question from other agents. Rased the context, exam re the solutions from other agents in your rationale, finish by giving an updated answer.
Question: siquestion]
Context: bicontext!
Solutions: solutions question
agents
Reasoning: bet's think step step order to S|Bxamine the solutions from other agenta). Ne
Answer: The updated
for the question. repeat
HotpotQA, MuSiQue, and 2WikiMQA: Predictor:
Answer the question with information based on the context. Only return the answer your outpuz.
Question: Siquestion]
Context: ||context]
Anawer: Only give me the answer. Do not output any other words.
Summa: :izer:
23

---

Published as a conference paper at ICLR 2026
Based on questien, retrieve relevant information context answaring the question. Include all key information. Do not repeat context.
helpfu:
Question: Siquestion)
Context: S(centext)
Summary: Only generata the summary, with Summary:
Reflector:
Verify that the answer is based on the provided context.
Question: iiquestion]
Context: [[context]
Text: S[text]
Reasoning: let's think step by step order to Siproduce the cozreciness), We
Correctness:
True/False indicating if answer correct given the cbservations and question.
These are the solutions to the question from other agents. Based on the context, exemine the solutions from other in your rationale, finish by giving updated enswer.
Question: siquestion]
Context: S[context]
solutions: the solutions the question from other agents Reasoning: let's think step by step in order to S[Examine the solutions from other agents). Ne
Answer: The updated answer "ar the queation. Do not repeat Answer:
MBPP:
Predictor:
Let's think step by step. Provide a complete and correct code implementation in python.
Question: iiquestion]
Thinking: Sithinking)
Answer: Only the code implementation. Do not include example usage explaimations.
Reflestor:
ease determine the correctnesa of the solution in passing all test cases. it fat's, ss, based error message trackback, step by step, carefully propose updated solution in the answer output with corract code implementation in python.
Question: Siquestion)
Previous solution: collution
Traceoack: It containa the test casea, execut fon results, and ground truth, If there is an ecror, zelevant t:aceback is given.
Correctneas: "True/False based on the correctneas of executive "eedback. If there is an error message, output 'False" Thinking: Sithinking) Ansver: Hanswer;
Debator:
These the solutions the question from other agents. Examine the solutions from other agento in your rationale, finish by giving en updated ansxer. Lat's a think stop by step. implementation in python.
Provide corplete
Question: Siquestion]
Solutions: the solutions the question from other agents Reasoning: Let's think step step order S[Examine the solutions from other agents).
Anawer:
Blanawer:
HumanEval:
Predictor:
Let'ss think Provide complete end correct code implementation in python.
24

---

Published as a conference paper at ICLR 2026
Question:
Riquestion] Thinking: 9(thinking]
Anawer: alnnawer;
Roflector:
determine correctness
passing test cases. fails, based the error message ard trackback, think step by step, careful ly propose updated
solution the answer output with correct code implemeatation in python.
Question: iiquestion]
Previous solution: Siprevious_
Traceback: 8[tracebask]
Thinking: Sithinking)
Answec: 9lanewe;;
Debator:
These the solutions to the question Iron other agenta. Examine the solutions from other agents in your rationale, finish by giving en updated answer. Let's think step by step. Provide complete and correct code implementation in pytion.
Question: Siquestion]
Solutions: the solutions
question other agents Reasoning: let's think step step order to S[Examine the solutions from other agents), Ne
Answer: slanswer)
LiveCodeBench:
eredictor:
You are helpful programming aaslatant and expert Fython programmer, The user has written input for the testcase. Think step by step. You will generate the code based on the problem requirepement. will calculate the output of the testcase and write the whole assercion statement in the markdown code block with the correct cutput.
Question: Siquestion]
Thinking: s/thinking)
Code: S(code) Answer: complete the testcase with assertion.
ReClector:
Ir there is an executive output in the traceback, parae the output into an assection in the given the executive output.
Question: Eiquestion]
Previous solution: Siprevious solution;
siprevioos_eolution:
Tracsback: It containa the test cases, execution results, and ground truth, Tf there
ecror, the zelevant tzaceback is given. Correctness: 'Isue/Balse' based the correctness of executive Seedback. If there is error message, output "False" Thinking: Sithinking) Anawez: Flanawer;
Debstor:
These the solutioon question
agenta. Txamine the solutions other agenta in your rationale, finish by giving an updaled anawer.
Question: Siquestion)
Solutions: the solutions the question from other agents Reasoning: let's a think step by step in order to G|Rxamine the solutiona from other agents). No
Answer: assert SiSunction [input]] -- texecative_outpue
25

---

Published as a conference paper at ICLR 2026
F BEST PROMPTS DISCOVERED
In this section, we show few typical prompts that have been discovered by MASS. Similarly, we indicate that skips some comments.
MATH:
Predictor:
Let's think step by step sclve the given preblem. Clearly explain your reasoning process, showing all internediste calculations and justifications. Express your finel answer as simplified expression enclosed within avoid extraneous text or explanations cutside of the core reasoning and final angwer.
single
tags.
Follov the following format.
Question: Riquestion]
Reasoning ng: let's a think step by step in order alprodice the answer). We
Anawez: flanawer)
Question: What is the average of the two smallest positive intager solutions to the congruence $514u Vaquiv Vppmed(100 "253
Reasoning: Tet's s think step step order to rind the average of the tuo smal est positive the congruence 814u Mequiv 46 Vlpmod:100ss, solutions $14u Veguuv 46 Vppoo((10058. We
are looking for divide the congruence Wequiv 23 Upmod We want to find the inverse of 7 modulo 50. Ne usa the suclidean Algorithm: Abbegtn[alfgra] 50
intege: solutioas
2 to get $7u
7 Wodot 7 Vendla ligns) Thus, $7(-7) Veguii 1 V)pmed(5015, so s-"1-1] Veequiv -7 Veguiv 43 Vipmod
Veede
W11
Multiplying 37u Wequiv (5m0 by 43 given Su Vequiv 23 Wedot V1pmod(50)s. $23 Wedot 43 989 50 Wedot 19 + 395, so $23 Medot 43 Vequiv 39 Vamodd
Therefore, $u Vequiv 39 (1pmod(50)8. The two smallest positive integer solutions are 398 and &u 39-50m639. the average these solutions (11))ac(39463) froc (21 643.
In the following prompts, interestingly, we observe that including the data summary, task demonstra- tions, and past instructions that have been used MIPRO (Opsahl-Ong et al. 2024 to propose new candidates actually improves the final performance. Hence, we keep these prompts that lead to strong task performance.
DROP:
Predictor:
This dataset designed excractive question answering, focusing on retrieving concise, factual answers from short texts. Kany quastions involve extracting numerical information and performing simple calculatiors, suggesting appl ioationa areas like sports analy:ies financial dala analysis. Ilowever the dataseL's Restern cultural biss and lack of comp lex reasoning questiora lmmit ita generall zability and real wwrld applicability.
TASK JEND
<axample_ e_1>
Quest lon: How many more pointa the Spuze win by in Game againsz the Mavericks?
Context:
Mavericks finished
playoff spot, which meant that they would once again have to face their in-state rivals, the San 62-20 record.
one game
Phoenix
eighth
Antonio Spura,
were top seed the Keatern Conference Game 1 in San Antonto, Dallas had an 81-71 lead in the fourth quarter, but the Spura rallied back and Look Game 85 90, Howeves, the Mavs forced 22 tuznovers in Game 2 to the
113-92, splitting the first two games before the series Game 3, Manu Ginhu00r3bil1 hit a shot that put the Spura up 138-106 with 1.7 seconda by
to Dellas. In
left, but buzzer
victery, putting in the series. The Spurs tock Game 4 in vallas 93-89 despite a late Dallas comebzck after 20-poin:
Carter geve
up
latar won Game at home, 109-103, giving then 3-2 series lead. The Mava avoided elimination in Game at home rallying in the fourth quarter, winning 111 113. Gene was on the Spurs hone court, and the Spurs beat the Mavericks 119-96, putting end to the Kavericks
the spura at one point
Thinking:
The Spurs scored 93 points in Game 4. the Mavericks scored 89 points in Game 4. The la
26

---

Output sonlys Published as a conference paper at ICLR 2026
AnsweE:
BASIC INSIRUCTION;
highly specialized tasked with extracting eritical numerical information for urgent news report. A Live broadcast la relying on your accuracy and speed, Think atep- by-step, focusing
informaticn previded in centext. then, answer questton concissely with the extracted numerical answer. Pailure to provide the correct nurerical information will result in the broadcast being intercupted.
Question: (question)
Context: [context]
TIP: Keep the instruction clear and concise.
PROFOSED INSTRUCTION:
...
Extract the numerical answer to the Following queetion. Show your reasoning by Ldentifying the performing any necessary calculations. Respond with only the final numerical answer,
numbers
provided
Question: (question)
Context: [cantext]
HotpotQA:
Predictor:
This multi passage question answering dataset focuses complex questions requiring syathesis information from multiple wikipediz-likke sources, often involving namad entities and temporal ressoning, emphasizas integrating information, hand ambiguity, and leveraging seal-werld knowledge, pasing significan: challenge for models relying solely provided text. dataget appears l-liieed for evaluating advanced language modela' reasoning abilities acroas diverse domaina and varying complexity levels.
TASK
Question:
The actor that plays Phileas Fogg in \*Around the Norld in 80 Daya co-starred what author?
Gary Cooper 1939 Goldwyn Productions film based Context: Provided in prompt Anawer: Charles L, Clifford
BASIC INSTRUCTION; the provided the ansиer.
the the question.
TIP: Keep the instruction clear and concise. Emphosize ral lance vonly on the provided text.
PROPOSED INSTRUCTION: Answer the question using only the provided context. net externel knowledge.
cexample_1>
Jebator:
This multi multi-passage queation answering dataset focuses on complex queationa requiring synthesia involving named entities and temporal ressoning, It emphasizea integrating information, handling ambiquity, and leveraging zeal world knowledge, posing a significant chellenge for models relying solely provided text. The dataset appears vell-suited for evalusting advanced language models' raasening abilities serass diversa demaing and varying aemplaxity levels.
information multiple Wikipedis sources,
TASK (81:
Previded
BASIC INSTRUCTION: These are the selutions to the question frem other agents. Based on the examine the sclutions from other agents your rationale, finish giving updated answer.
TIP: Don't t be afraid to be creative when creating the new instruction!
PROPOSED INSTRUCTION: You are an expert fact-checker for mojor publication. Your taak is to meticulously reviex preposed enswers to complex research question, ensuring accuracy and correcting any passages from credible sources, and several proposed ansuers from different resesrch
providad with the original question, multiple context
27

---

Published as a conference paper at ICLR 2026
assistents. Your job carefully analyze each propesed answer, creas-refesencing with the provi ded context passages and idantifying any inconcistencies, inaccuracios, unsupported claims,
Question: [insert Question Here]
Context Passages:** [insert Passages sere]
e>Propoeed Answera:**
Assistent 1: [Insert Assistant L's Answe::
Assistent 2:
[insert Assistant 2's Ansver
Assistant K: [Insert Assistant N's Anawe:;
.IIstructions::>
-ract-Chhcck Analyze:** Evaluate sach proposed answer individually, For each ansker: \CCorrect, \ \"Tncorrect, V MPPrtiiall Correct
Verroftt: Tndicate whether the
.t or \"Not Supported by Contexi,
v*Byidence: Provide specific quoces verdict. Explaia how the evidence supports refutea the proposed anawer. Highlight any embiguities, assumptiens, ez leaps in logic made by the research assistants. pegrrattoonlV/mmgoveeeet
passage
context support your
(if applicable):-- Suggest specific corrections improvements to partially correct or incorract answers. Explain how these changes align with the
syntheesize Refine:** Synthesize informatio gathered during fact-checking proceas to formulate the most accurate and comprehensive answer to the question. This may involve:
selesting the
propesed conoining elemanta from multiple proposed anawers.
Developing completely
based on your analysis of evidence.
sssinal AnsMeT:** Clearly state your final, verified ansver so quastion.
4. Confiideeee Level:.s indicate your confidence in the final answer using a scale \"High \MModium, \"Low. Briafly explain the factors influencing your confidence level
revised instruction emphasizes more rigerass fact-shecking process, ancouraging the critically evaluate each proposed answer and provide detailed justifications for its assessments. the addition of confidence level prompts the 18 to reflect on the \o
certainty final exper: checker"" persona further reinforces the importance of accuracy and attention detail.
promoting nuanced and reliable responses.
<example_li
<oxample_22
MBPP:
Predictor:
You ace a highly skilled Python programmer Lasked with generating correct and efficient Python function based en the natural language preblen description. Think step-by- step, outlining your reasoning process before presenting the code solution. Your reapanse should adhare the following
Thinking: Provide
breakdowa your thought process, including steps you' 11 take solve the problem. This should demonst logical progreasion cowards the final solution and may include considerations of data types, algorithms, and example:
type expected output. 2. Determine the coze logic or algerithm required.
Tdentify
Consides potential edge cases special scenarics.
4. Outline the steps for implementing the solution in Python.
.AnSwer:**
your complete and (saing triple backticks). The cade should be well-formatted, efficient, and directly description.
Pythen code implementation within code block
your functioo signssure if given. Per example:
addreas the
the function
'python
def function_name _rrguuess))m_)s)
code implamentation here
28

---

Published as a conference paper at ICLR 2026
oucput
Tocus producing functional code that accurately solves the problem. Avoid including unnecessary explenations or examples within the \"Answer\" secticn. if the problem description includes implicit explicit
your code passes those Strive for clarity, conciseneas, and correctneas in both your thinking and your code.
texample_1s
rexample_2>
<example_3>
Reflector:
This dataset is designed foz Pychon code generation, trenslating natural language problem descriptions into simple functions and their corresponding
The 'answer' and cest' fields are ideatical, indicating a potential redundancy or unique teak socusing generation.
likely ori ginates from coding challenge websites and emphasizes basic programming concepta with Locus on correctness, handling.
taneoua
complexity inputs
TAaK (91:
Question: Write functien that takes in numbers and tuple with the sezond number and then the first number.
def swap_mumerrs (a previous Solution: axap_nunbers return (b,
Traneback: Test
print (awap (10,
Output: (23, 10)
Ground Truth: (20,10)
Correctness: True
Thinking: provided sclutien correstly swaps order two inpuz returns then tuple. The test demonstrates this functionslity, and the output matches the ground truth. Therefore, no changes are required. Answer: "'python
det swap_nunbersiayb)
return (b,
<oxample_2> <example_3>>
BASIC IKSTRUCTION:
fails, Please determine the co:rectness of the solucion in paasing all Lest cases. the esror message trackback, think step by step, carefully propase an updated solution in the answer output with correct code implementation in python.
TIP: The instruction should include a high atakea scenaria in which the tM must solve the task
PROPOSED INSTRUCTION:
are automated code reviewer for miaston-critionn satel control system. A bug the code could lead catastrophic failure, absolute correctness are given a Python function along with ita sasoct at test case (Inal uding the expected outpuc). Analyze provided
You
<example_1>
coxample_22
29


Reviews:
[{"review_id": "lXNHsABm1I", "reviewer": "Reviewer_TPid", "summary": "This paper proposes MASS (Multi-Agent System Search), a framework for automatically optimizing multi-agent systems (MAS) by jointly optimizing both prompts and topologies. The authors first conduct an analysis showing that prompt optimization and topology design are critical factors for MAS performance. Based on these insights, MASS employs a three-stage optimization approach: (1) block-level prompt optimization for individual agent types, (2) workflow topology optimization in a pruned search space, and (3) workflow-level prompt optimization for the complete system.", "questions": "See weakness", "limitations": "", "rating": 6, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1, Comprehensive Analysis: The paper provides valuable insights into what makes effective MAS through systematic ablations (Sec 2.1-2.2), showing that prompts matter more than previously recognized and that only a small fraction of topologies are beneficial.\n\n2, Well-Motivated Design: The three-stage optimization approach (local→global, prompts→topologies) is intuitive and addresses the complexity of joint optimization effectively. The influence-weighted search space pruning (Eq. at line 269) is a practical contribution.\n\n3, Strong Empirical Results: MASS achieves substantial improvements across diverse tasks (78.79% avg on Gemini Pro vs 70.26% for best baseline). The results are consistent across multiple LLM backbones (Gemini, Claude, Mistral).", "weaknesses": "1, Limited Novelty: The core contribution is primarily engineering—combining existing prompt optimization (MIPRO) with topology search. The individual components (APO, topology search) are not novel. The main novelty lies in the specific combination and the three-stage approach.\n\n2, Search Space Design Limitations:\n- The topology space is limited to 5 predefined building blocks. More complex or novel topologies are not explored.\n- The \"rule-based\" construction order (line 275-276) seems arbitrary and is not well justified. Why is [summarize, reflect, debate, aggregate] the right order?\n- The search space is task-specific (Table 2), limiting generalizability.\n\n3,Methodological Concerns:\n- AFlow comparison: The authors acknowledge AFlow uses Claude 3.5 as optimizer while Gemini as executor, making comparison unfair (marked with *). This is a significant limitation.\n- Statistical significance: While error bars are shown, no formal significance tests are provided.\n- Validation/test split: Using only 50-100 examples for validation seems small and may lead to overfitting to the validation set.\n\n4, Incomplete Analysis:\n- Why does prompt optimization help so much? The paper shows that it does (Fig 2) but provides limited insight into what makes optimized prompts better.\n- Topology analysis: Fig 4 shows different topologies work for different tasks, but there's limited discussion of why. What task characteristics favor which topologies?\n- Workflow-level optimization gains: Stage 3 provides only ~2% improvement (line 342). Is this consistent? When does it help?", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "g7Jlfw7c8J", "reviewer": "Reviewer_P2XL", "summary": "This paper formalizes the Multi-Agent-System into a complex problem of joint optimization prompts and topology, and proposes the MASS framework to efficiently search in the MAS design space. The framework is divided into three parts, block-level prompt optimization, workflow topology optimization, and workflow-level prompt optimization, and the author claims that this method outperforms existing MAS in multiple tasks.", "questions": "How does the MASS consider the combination order of topology modules, and is the current MASS framework effective for the combination order of different topology modules? Since the authors already want to use the random search strategy to select the number of modules, can we put the combination order of modules into the search space to realize the automatic combination of different tasks?", "limitations": "", "rating": 6, "confidence": 3, "soundness": 4, "presentation": 4, "contribution": 3, "strengths": "The paper presents a clear and logical narrative process. It explicitly formalizes the design of MAS as a joint optimization problem of prompts and topology, introduces an incremental impact metric to prune the huge space, and demonstrates the significance of this consideration through detailed experiments.\nThe experiments show the optimization trajectory while taking into account cost-effectiveness. MASS is a plug-and-play module that provides a platform for future expansion and promotes MAS from manual trial and error to automated search.", "weaknesses": "The MASS framework mentions that the topology search in the second stage is guided by the \"incremental influence\" indicator, which evaluates each module independently and cannot find synergies between dependent modules.\nThis \"exhaustive task\" can be performed by some more advanced algorithms, such as evolutionary algorithms, and the operation of this random search can be more fully demonstrated according to the change of performance scores, and the potential optimization direction in the future can also be more complete.\nThis framework is theoretically highly sensitive to temperature parameters, and it is helpful to analyze on temperature settings.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "MzXS9h4P5F", "reviewer": "Reviewer_ib6h", "summary": "This paper proposes Multi-Agent System Search (MASS), an optimization framework that seeks the optimal multi-agent system. It models a workflow as a collection of building blocks and their logical relationships, and constructs a better MAS through a three-stage process: first optimizing prompts at the building block level, then optimizing the workflow topology, and finally refining the global prompt.", "questions": "- How does the evaluator assign scores? How is the validation set determined, and how is the validation performance computed?\n- The description in lines 260–269 is confusing, largely due to the ambiguous reuse of the symbol $a$. Could you provide a clear and precise explanation of this section?", "limitations": "", "rating": 4, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "- This paper jointly considers prompt and topology optimization, and alternately updates both components, offering a novel optimization strategy for MAS.\n- The building block design decouples prompt optimization from topology optimization, effectively reducing the cost of searching for an effective MAS structure by pruning the search space.\n- Experimental results demonstrate performance improvements compared to baselines.", "weaknesses": "- Inconsistent notations. In Equation (1), the symbol $a$ is defined as a configuration. However, later in the text, $a$ is ambiguously reused to refer to individual agents and topologies.\n- Figure 4 evaluates individual topologies in isolation on specific tasks. However, the final MAS in this work is a composition of multiple topologies. It is unclear whether these isolated results sufficiently support the claim that ``not all topologies have a positive influence on MAS design.'' Similarly, during search space pruning, the selection criterion is based on the performance of each building block relative to an initial agent, rather than the performance of the full composite structure. This raises a concern: Could this approach inadvertently prune away building blocks that are suboptimal in isolation but essential for achieving global optimality in combination?\n- The proposed pipeline first performs prompt optimization on all building blocks before search space pruning. Given that some of these blocks may ultimately be discarded during pruning, this may incur potentially unnecessary computational overhead.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "lmu9i0QdJ6", "reviewer": "Reviewer_NqFK", "summary": "This paper presents Multi-Agent System Search (MASS), a novel three-stage framework to automate the complex design of multi-agent systems by optimizing both prompts and interaction topologies. The contribution is an interleaved optimization process that first locally optimizes individual agent prompts, then uses those insights to search a pruned topology space, and finally performs a global prompt optimization on the best-found workflow. The experiments are extensive and show that this method substantially outperforms current SOTA baselines.", "questions": "1.\tThe paper convincingly shows that “Prompting to SC” is effective, but it does not include the critical baseline of “SC to Prompting”. How to determine the optimal order of optimization directives before topology optimization, rather than the opposite?\n\n2.\tCould the authors provide a more detailed analysis of the framework's scalability? Specifically, how does the optimization cost of Stage 1 (1PO) scale with the number of available topology building blocks, and how does the cost of Stage 3 (3PO) scale with the complexity (e.g., number of nodes) of the final discovered topology?", "limitations": "", "rating": 4, "confidence": 4, "soundness": 2, "presentation": 3, "contribution": 2, "strengths": "1.\tNovel and Effective Framework: The proposed three-stage MASS framework is a novel and intuitive contribution. It effectively decomposes the highly complex joint-optimization problem of prompts and topologies into three manageable stages.\n\n2.\tStrong Empirical Performance: The paper demonstrates substantial and consistent performance gains across a diverse set of 8 benchmarks, significantly outperforming existing manual MAS designs and state-of-the-art automated frameworks.\n\n3.\tGood Presentation: The paper is well-written, clearly structured, and easy to follow, which effectively communicates the authors' core contributions and experimental results.", "weaknesses": "1.\tThe core three-phase framework of this paper is inspired by two preliminary analyses, which seem to have methodological flaws. The \"prompt-first\" conclusion shown in Figure 2 has not been strictly proven, as it lacks a key benchmark to compare it with the \"topology-first\" method. Moreover, it is unclear whether the results shown in Figure 4 are based on the isolated evaluation of components or the ablation of completed topology. If it is the former, it ignores the synergistic nature of the MAS topology, where components only show value when combined.\n\n2.\tThe proposed framework is presented as a heuristic and lacks theoretical grounding. The three-stage decomposition (local prompt, topology search, global prompt) is justified by empirical observation rather than a formal analysis of the optimization space. \n\n3.\tThe paper's presentation suffers from minor issues that harm readability. There are spelling errors (\"Monte-Carto\" in the appendix) and the \"Related Work\" section is placed between the Method and Experiment sections, which disrupts the logical flow of the paper.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Decision: Accept (Poster)