先说结论
AgentSquare先统一智能体模块的输入输出,再搜索怎样组合和改写这些模块。它试图减少从零写整个智能体的成本;性能预测只用于部分候选,不能代替所有真实运行,模块消融也并非每项任务都降低分数。 (原文:PDF p.3, Figure 2; Section 2.1;PDF p.5, Figure 3; Section 3.2;PDF p.7, Performance predictor; Section 4.1;PDF p.7, Table 1;PDF p.9, Table 2;PDF p.7, Performance predictor)
指标:已有智能体常各自定义接口,成功的记忆模块很难直接移植到另一个规划器。本文把设计空间拆为规划、推理、工具使用和记忆,规定可组合接口。它不是宣称穷尽所有智能体架构,初始文献整理还排除了多智能体及需额外训练的方法。
条件:本地全文 arXiv:2410.06153v3,Figure 2; Section 2.1;条件及比较对象见陈述
PDF p.3, Figure 2; Section 2.1 · PDF p.3
Preprint Task Description feedback Agentic Planning Environment Workflow output Subtask 1 Subtask 2 … Subtask n feedback Memory Retrieve Memory Abstract Reasoning Database Add Tool Use act class Planning(): class Reasoning(): Input : task type, task description, Input : task description, feedback tool_instruction, feedback Output : plan Output : reasoning result select return : Module class Memory(): Input : current situation : Task Description Tool Pool class Tooluse(): if current situation ! = ‘ ‘ : Input : task description, : Resources tooluse_instruction,feedback add(current situation) Output : tool response else: Output : retrieve() Modular Agent Design Space Standard IO Interface Figure 2: Illustration of the modular agent design space and agentic workflow (left) and the stan- dardized IO interface of four types of modules (right). • We propose a novel modular design space for LLM agents, enabling researchers to easily build on previous successful designs and accumulate new discoveries as a community. • We design the AgentSquare framework that efficiently searches for novel and good- performing LLM agents via the novel mechanism of module evolution, module recom- bination, and performance predictor. • Experiments across six diverse tasks show that our method discovers novel LLM agents that outperform all known human designs. Besides, AgentSqaure can generate human interpretable design insights for these novel agents. 2 A M ODULAR D ESIGN S PACE OF LLM AGENTS 2.1 BACKGROUND Using LLMs for automatic optimization has been a widely explored topic, such as applications in code generation (Lehman et al., 2023; Romera-Paredes et al., 2024) and neural architecture search (Nasir et al., 2024; Chen et al., 2024a). There are several recent studies that explore the problem of prompting LLMs to design LLM agentic systems. OPRO (Yang et al., 2024) and Prompt- breeder (Fernando et al., 2024) can be viewed as leveraging the reasoning power of LLMs to improve the prompt of LLM agents. More importantly, ADAS introduces the idea of searching the entire agentic system defined in code space, and propose a Meta Agent Search algorithm that discovers LLM agents outperforming state-of-the-art human designs (Hu et al., 2024). Our main difference and contribution lie in introducing a modular design space for LLM agents, which can provide a standard framework to support the convenient reuse of existing successful agent components and fruitful innovative agent module discovery. A modular design space for LLM agents facilitates the reuse of prior successful designs and sup- ports the exploration of new architectures. At the core of such modularization is the standardization of input-output interfaces, which ensures both extensibility and seamless integration with existing designs. Many experts in the field have proposed building LLM agentic systems with key modular components from engineering (Weng, 2023) and cognitive perspectives (Sumers et al., 2023). How- ever, these proposals remain largely conceptual, lacking implementable solutions to unify existing LLM agents. Besides, current LLM workflow program frameworks (e.g., LangChain and Auto- GPT) only provide operation-level components, which cannot support module-level search that best exploits the potential of prior successful designs. To address these problems, we perform a comprehensive literature review of publications from NeurIPS, ICML, and ICLR over the past three years. The review focuses on papers with the key- words “LLM”, “Agent”, or “Large Language Model” in their titles while excluding works related to multi-agent systems or agents that require additional training. Note that our aim is not to propose the most comprehensive, one-for-all LLM agent design space, but to offer a standardized framework 3
解释边界:只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。
指标:搜索包含两种动作:模块进化让模型改写某个模块代码,模块重组把已有模块换一种搭配。成功组合及得分存入经验池。这样搜索既能利用已有实现,也能发现新实现,而不是只改角色提示或随机拼装现成积木。
条件:本地全文 arXiv:2410.06153v3,Figure 3; Section 3.2;条件及比较对象见陈述
PDF p.5, Figure 3; Section 3.2 · PDF p.5
Preprint Task Evaluation Webshop Alfworld Travelplanner Sciworld Evaluation M3Tool … Evaluation 𝑃′ 𝑃′ 𝑅0 𝑇0 𝑀0 𝑃1 𝑅′ 𝑇0 𝑀0 𝑅′ 𝑃0 𝑅 ′ 𝑇0 𝑀0 𝑃0 𝑅′ 𝑇0 𝑀0 𝑃0 𝑅′ 𝑇2 𝑀0 𝑃0 𝑅3 𝑇0 𝑀0 𝑃0 𝑅0 𝑇0 𝑀0 𝑇′ 𝑃0 𝑅0 𝑇′ 𝑀0 𝑃0 𝑅′ 𝑇2 𝑀0 Next Initial LLM LLM Episode Agent 𝑀′ 𝑃0 𝑅0 𝑇0 𝑀′ 𝑃0 𝑅′ 𝑇0 𝑀4 New New Agents New Agents Module Evolution Recombination : 𝑃1 𝑅1 𝑇1 𝑀1 Planning 𝑃1 𝑅1 𝑇1 𝑀1 Reasoning : 𝑃2 𝑅2 𝑇2 𝑀2 𝑃2 𝑅2 𝑇2 𝑀2 Tooluse 𝑃3 𝑅3 𝑇3 𝑀3 : 𝑃3 𝑅3 𝑇3 𝑀3 Memory Agent Search 𝑃4 𝑅4 𝑇4 𝑀4 : 𝑃4 𝑅4 𝑇4 𝑀4 Feedback … … Module Pool Experience Pool Figure 3: Overview of AgentSquare search framework. AgentSquare optimizes LLM agents through the mechanisms of module evolution and recombination. We further introduce a performance pre- dictor that implements an in- context surrogate model for efficient evaluation of novel agents. problem of MoLAS is defined as follows: arg max Evald (P, R, T, M ). (1) P ∈P,R∈R,T ∈T,M ∈M 3.2 AGENT S QUARE SEARCH ALGORITHM Solving the optimization problem of MoLAS features three key challenges: (1) The search space, defined as the Cartesian product of four orthogonal modules, is vast and hard to explore; (2) the module sets encompass any code with standard IO interfaces, making the module selection an open- ended problem; (3) the high costs of agent evaluation during the search process constrain the overall search scale. To tackle these issues, we introduce AgentSquare, an automatic search framework to optimize LLM agents within the modular design space. Facing the vast search space of MoLAS, we propose module recombination operation utilizing LLMs to strategically reason to identify more promising module combinations. Such operation broadens the coverage of child samples, overcom- ing the limitations of prompt rewrite methods that explore only a restricted space. However, only searching in the existing module combinations also narrows the search space, thus we propose mod- ule evolution operation which employs an evolutionary meta-prompt to search new modules through code-level optimization. This operation, combined with module recombination, enables the search of any module combination in the open-ended solution space. Finally, to mitigate the high costs of frequent evaluations of searched agents, we design a performance predictor as an in-context surro- gate model for evaluating searched agents, significantly accelerating the search process and reducing real-valued costs. The overall framework of AgentSquare is illustrated in Figure 3 and the algorithm is presented in Algorithm 1. Next, we detail the key components of the AgentSquare search process. 3.3 I NITIALIZATION Insights from existing AutoML studies indicate that a well-chosen initialization enhances warm-up and improves search efficiency by avoiding unpromising populations (So et al., 2019; Yuan et al., 2024). AgentSquare starts by initializing a global experience pool E = {(P, R, T, M, v)|P0 ∈ P, R0 ∈ R, T0 ∈ T, M0 ∈ M} to seed agents that are well-designed (as mentioned in Section 2) along with their real-valued performance v. The module pools {P, R, T, M} are set to the standard- ized modules extracted from these seed agents. 5
解释边界:只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。
指标:新进化出的模块仍进真实环境测试;已有模块重组的候选则可用上下文性能预测器估分,节约调用。实验覆盖购物、具身交互、工具与规划,比较人工设计、模块搜索、提示优化和整机搜索,同一底座下保持示例数量一致。预测分与真实任务分必须区分。
条件:本地全文 arXiv:2410.06153v3,Performance predictor; Section 4.1;条件及比较对象见陈述
PDF p.7, Performance predictor; Section 4.1 · PDF p.7
Preprint Web Embodied Tool Game Baseline Type Method Webshop ALFWorld SciWorld M3Tool Travel PDDL CoT 0.485 0.405 0.697 0.448 0.487 0.542 Cot-SC 0.512 0.426 0.656 0.461 0.413 0.495 Self-refine 0.461 0.567 0.654 0.442 0.000 0.514 ToT 0.501 0.437 0.741 0.453 0.380 0.476 Step Back 0.468 0.279 0.220 0.434 0.000 0.486 TP 0.398 0.404 0.576 0.387 0.430 0.518 Hand-crafted Agents HuggingGPT 0.519 0.481 0.680 0.354 0.510 0.584 Voyager 0.366 0.425 0.776 0.247 0.523 0.412 Generative Agents 0.499 0.477 0.663 0.402 0.480 0.553 DEPS 0.481 0.459 0.740 0.278 0.540 0.591 OPENAGI 0.506 0.510 0.718 0.322 0.533 0.616 Dilu 0.451 0.433 0.682 0.475 0.360 0.463 Random 0.533 0.620 0.704 0.438 0.563 0.660 Module Search Bayesian 0.549 0.634 0.749 0.502 0.537 0.650 Prompt Search OPRO 0.505 0.380 0.569 0.309 0.523 0.589 Agent Search ADAS 0.521 0.543 0.754 0.475 0.373 0.568 AgentSquare 0.607 0.695 0.781 0.524 0.583 0.669 Table 1: Performance comparison of searched agents from AgentSquare and (1) existing human- designed agents (2) module search baselines (3) prompt search baselines (4) agent search baselines based on GPT-4o on six tasks across different domains. leveraged to evaluate the performance of generated network architectures (Jawahar et al., 2023; Chen et al., 2024a). During the search process, newly created agents from module evolution are still tested in the real task environment because these new modules never appear in the experience pool, and it is unsuitable to use the performance predictor to provide predictions. During the module recombination operation, the newly proposed agents are evaluated by the performance predictor, which leverages in-context reasoning based on past agent combination performance to provide efficient performance prediction. Here, given a newly searched agent A′ , the performance predictor πp thoroughly considers task descriptions d, module profiles and in-context performance examples of previously tested agents E to score novel agents: v ′ = πp (A′ , d, P, R, T, M, E), (4) where v ′ is the predicted performance of the evaluated agent. Empirical results demonstrate that the predicted performance of agents closely matches their actual performance, verifying the effective- ness of the proposed performance predictor, which is detailed in Section 4.3. 4 E XPERIMENTS 4.1 E XPERIMENTAL S ETUP Task setup. We conduct experiments on six representative tasks covering four domains: embodied, game, web and tool applications, which are widely adopted by existing LLM agent benchmarks (Ma et al., 2024; Xi et al., 2024), more details are presented in Appendix A.1. Baselines. We compare AgentSquare with four types of baselines including hand-crafted agents, module-level search, prompt-level search and agent-search methods. More details are presented in Appendix A.1. AgentSquare setup. We implement AgentSquare and conduct experiments using both GPT-3.5- turbo-0125 and GPT-4o (Achiam et al., 2023). To ensure a fair comparison, we use the same number of few-shot examples across all methods. The initial agent is set as a random module combination, and the search process terminates after 5 consecutive iterations without performance improvement. 7
解释边界:只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。
指标:GPT-4o设置中,Webshop的AgentSquare为0.607,ADAS为0.521,贝叶斯模块搜索为0.549;ALFWorld对应0.695、0.543、0.634。它在表内任务上的优势来自组合搜索框架,分数口径由各任务决定,不能直接把不同列都叫同一种准确率。
条件:本地全文 arXiv:2410.06153v3,Table 1;条件及比较对象见陈述
PDF p.7, Table 1 · PDF p.7
Preprint Web Embodied Tool Game Baseline Type Method Webshop ALFWorld SciWorld M3Tool Travel PDDL CoT 0.485 0.405 0.697 0.448 0.487 0.542 Cot-SC 0.512 0.426 0.656 0.461 0.413 0.495 Self-refine 0.461 0.567 0.654 0.442 0.000 0.514 ToT 0.501 0.437 0.741 0.453 0.380 0.476 Step Back 0.468 0.279 0.220 0.434 0.000 0.486 TP 0.398 0.404 0.576 0.387 0.430 0.518 Hand-crafted Agents HuggingGPT 0.519 0.481 0.680 0.354 0.510 0.584 Voyager 0.366 0.425 0.776 0.247 0.523 0.412 Generative Agents 0.499 0.477 0.663 0.402 0.480 0.553 DEPS 0.481 0.459 0.740 0.278 0.540 0.591 OPENAGI 0.506 0.510 0.718 0.322 0.533 0.616 Dilu 0.451 0.433 0.682 0.475 0.360 0.463 Random 0.533 0.620 0.704 0.438 0.563 0.660 Module Search Bayesian 0.549 0.634 0.749 0.502 0.537 0.650 Prompt Search OPRO 0.505 0.380 0.569 0.309 0.523 0.589 Agent Search ADAS 0.521 0.543 0.754 0.475 0.373 0.568 AgentSquare 0.607 0.695 0.781 0.524 0.583 0.669 Table 1: Performance comparison of searched agents from AgentSquare and (1) existing human- designed agents (2) module search baselines (3) prompt search baselines (4) agent search baselines based on GPT-4o on six tasks across different domains. leveraged to evaluate the performance of generated network architectures (Jawahar et al., 2023; Chen et al., 2024a). During the search process, newly created agents from module evolution are still tested in the real task environment because these new modules never appear in the experience pool, and it is unsuitable to use the performance predictor to provide predictions. During the module recombination operation, the newly proposed agents are evaluated by the performance predictor, which leverages in-context reasoning based on past agent combination performance to provide efficient performance prediction. Here, given a newly searched agent A′ , the performance predictor πp thoroughly considers task descriptions d, module profiles and in-context performance examples of previously tested agents E to score novel agents: v ′ = πp (A′ , d, P, R, T, M, E), (4) where v ′ is the predicted performance of the evaluated agent. Empirical results demonstrate that the predicted performance of agents closely matches their actual performance, verifying the effective- ness of the proposed performance predictor, which is detailed in Section 4.3. 4 E XPERIMENTS 4.1 E XPERIMENTAL S ETUP Task setup. We conduct experiments on six representative tasks covering four domains: embodied, game, web and tool applications, which are widely adopted by existing LLM agent benchmarks (Ma et al., 2024; Xi et al., 2024), more details are presented in Appendix A.1. Baselines. We compare AgentSquare with four types of baselines including hand-crafted agents, module-level search, prompt-level search and agent-search methods. More details are presented in Appendix A.1. AgentSquare setup. We implement AgentSquare and conduct experiments using both GPT-3.5- turbo-0125 and GPT-4o (Achiam et al., 2023). To ensure a fair comparison, we use the same number of few-shot examples across all methods. The initial agent is set as a random module combination, and the search process terminates after 5 consecutive iterations without performance improvement. 7
解释边界:只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。
指标:去掉模块重组,TravelPlanner由完整模型0.583到0.280,但PDDL仍为0.669,与完整模型相同;去掉模块进化,PDDL为0.614。不同任务依赖的组件不同,不能把“两个设计都有贡献”写成任何场景下每一项都不可缺少。
条件:本地全文 arXiv:2410.06153v3,Table 2;条件及比较对象见陈述
PDF p.9, Table 2 · PDF p.9
Preprint Method Webshop ALFWorld SciWorld M3Tool TravelPlanner PDDL AgentSquare (full) 0.607 0.695 0.781 0.524 0.583 0.669 w/o module evolution 0.564 0.649 0.736 0.502 0.577 0.614 w/o module recombination 0.560 0.616 0.710 0.481 0.280 0.669 Table 2: Ablation study of AgentSquare on GPT-4o on six tasks across different domains. Webshop based on gpt-3.5 Sciworld based on gpt-3.5 M3tool based on gpt-3.5 Actual tested performance Actual tested performance Actual tested performance 0.7 Webshop based on gpt-4o 0.7 Sciworld based on gpt-4o 0.7 M3tool based on gpt-4o Alfworld based on gpt-3.5 Travelplanner based on gpt-3.5 Pddl based on gpt-3.5 Alfworld based on gpt-4o Travelplanner based on gpt-4o 0.6 Pddl based on gpt-4o 0.6 0.6 0.5 0.5 0.5 0.4 0.4 0.4 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.2 0.3 0.4 0.5 0.6 0.7 0.2 0.3 0.4 0.5 0.6 0.7 Predicted performance Predicted performance Predicted performance Figure 5: Validation of the effectiveness of the performance predictor (correlation between the actual and predicted performance) on each task. bination which strategically recombines existing ones. To verify the effectiveness of each design, we tested three variants: the full model, a version without module evolution, and a version without module recombination. The results based on GPT-4o and GPT-3.5 are presented in Table 2 and Ta- ble A.5, respectively. It can be seen that dropping each design results in a noticeable performance decline and the module recombination has a larger impact. Module recombination significantly ex- pands the search space, reducing the risk of falling into a local optima. Meanwhile, module evolution facilitates the discovery of more advanced modules tailored to specific tasks. These two operations collaborate well ensuring the effectiveness of the search process in AgentSquare. Effectiveness of performance predictor. In this part, we verify the effectiveness of this design empirically. Figure 5 illustrates the predicted performance of given agents versus their actual tested performance based on both GPT-3.5 and GPT-4o on all six tasks. The tested agents were generated through random sampling by randomly combining existing modules. It can be found that the pre- dicted performance closely aligns with the actual performance, demonstrating the effectiveness of the performance predictor. For instance, the evaluation cost of the predictor is only about 0.025% of the cost of a full evaluation based on GPT-4o in ALFWorld, demonstrating its remarkable cost- efficiency. We provide more experiment results of predicting the performance of the dynamically searched agents in Figure A.15 of the Appendix. 4.4 D ISCOVERED B EST AGENTS FROM AGENT S QUARE In this section, we provide some illustrations of the searched best agents, especially some discovered promising modules. Table A.4 summarizes the searched best agent from AgentSquare and the best hand-crafted agents on all tasks. We can observe that AgentSquare can adaptively identify promising agents with both previously existing and newly programmed modules tailored to the given task. For instance, the discovered best agent for ALFWorld combines an existing well-designed memory module from Generative Agents with newly created planning (named TD) and reasoning modules (named SF-ToT). By comparison, the best hand-crafted agent Self-refine focuses only on reasoning module design while overlooking other functional modules, leading to suboptimal performance. Moreover, we illustrate two new modules and the human interpretable design insights discovered on ALFWorld in Figure 6. More illustrations are listed in the Figure A.16 to Figure A.21. 5 R ELATED W ORK 5.1 LLM- BASED AUTONOMOUS AGENTS LLM-based autonomous agents are an advanced AI system using a core LLM to manage external functional modules and interact with the world (Ding et al., 2024b). Recent studies have equipped 9
解释边界:只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。
指标:预测器根据已测组合的描述和成绩作上下文推断。作者对全新模块仍坚持真实评价,正说明这不是免实验的性能证明。可组合性也取决于预定义接口;把该空间中的搜索胜出外推到所有可能智能体,会超出论文证据。
条件:本地全文 arXiv:2410.06153v3,Performance predictor;条件及比较对象见陈述
PDF p.7, Performance predictor · PDF p.7
Preprint Web Embodied Tool Game Baseline Type Method Webshop ALFWorld SciWorld M3Tool Travel PDDL CoT 0.485 0.405 0.697 0.448 0.487 0.542 Cot-SC 0.512 0.426 0.656 0.461 0.413 0.495 Self-refine 0.461 0.567 0.654 0.442 0.000 0.514 ToT 0.501 0.437 0.741 0.453 0.380 0.476 Step Back 0.468 0.279 0.220 0.434 0.000 0.486 TP 0.398 0.404 0.576 0.387 0.430 0.518 Hand-crafted Agents HuggingGPT 0.519 0.481 0.680 0.354 0.510 0.584 Voyager 0.366 0.425 0.776 0.247 0.523 0.412 Generative Agents 0.499 0.477 0.663 0.402 0.480 0.553 DEPS 0.481 0.459 0.740 0.278 0.540 0.591 OPENAGI 0.506 0.510 0.718 0.322 0.533 0.616 Dilu 0.451 0.433 0.682 0.475 0.360 0.463 Random 0.533 0.620 0.704 0.438 0.563 0.660 Module Search Bayesian 0.549 0.634 0.749 0.502 0.537 0.650 Prompt Search OPRO 0.505 0.380 0.569 0.309 0.523 0.589 Agent Search ADAS 0.521 0.543 0.754 0.475 0.373 0.568 AgentSquare 0.607 0.695 0.781 0.524 0.583 0.669 Table 1: Performance comparison of searched agents from AgentSquare and (1) existing human- designed agents (2) module search baselines (3) prompt search baselines (4) agent search baselines based on GPT-4o on six tasks across different domains. leveraged to evaluate the performance of generated network architectures (Jawahar et al., 2023; Chen et al., 2024a). During the search process, newly created agents from module evolution are still tested in the real task environment because these new modules never appear in the experience pool, and it is unsuitable to use the performance predictor to provide predictions. During the module recombination operation, the newly proposed agents are evaluated by the performance predictor, which leverages in-context reasoning based on past agent combination performance to provide efficient performance prediction. Here, given a newly searched agent A′ , the performance predictor πp thoroughly considers task descriptions d, module profiles and in-context performance examples of previously tested agents E to score novel agents: v ′ = πp (A′ , d, P, R, T, M, E), (4) where v ′ is the predicted performance of the evaluated agent. Empirical results demonstrate that the predicted performance of agents closely matches their actual performance, verifying the effective- ness of the proposed performance predictor, which is detailed in Section 4.3. 4 E XPERIMENTS 4.1 E XPERIMENTAL S ETUP Task setup. We conduct experiments on six representative tasks covering four domains: embodied, game, web and tool applications, which are widely adopted by existing LLM agent benchmarks (Ma et al., 2024; Xi et al., 2024), more details are presented in Appendix A.1. Baselines. We compare AgentSquare with four types of baselines including hand-crafted agents, module-level search, prompt-level search and agent-search methods. More details are presented in Appendix A.1. AgentSquare setup. We implement AgentSquare and conduct experiments using both GPT-3.5- turbo-0125 and GPT-4o (Achiam et al., 2023). To ensure a fair comparison, we use the same number of few-shot examples across all methods. The initial agent is set as a random module combination, and the search process terminates after 5 consecutive iterations without performance improvement. 7
解释边界:只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。
论文为什么要做这件事
已有智能体常各自定义接口,成功的记忆模块很难直接移植到另一个规划器。本文把设计空间拆为规划、推理、工具使用和记忆,规定可组合接口。它不是宣称穷尽所有智能体架构,初始文献整理还排除了多智能体及需额外训练的方法。 (原文:PDF p.3, Figure 2; Section 2.1)
指标:已有智能体常各自定义接口,成功的记忆模块很难直接移植到另一个规划器。本文把设计空间拆为规划、推理、工具使用和记忆,规定可组合接口。它不是宣称穷尽所有智能体架构,初始文献整理还排除了多智能体及需额外训练的方法。
条件:本地全文 arXiv:2410.06153v3,Figure 2; Section 2.1;条件及比较对象见陈述
PDF p.3, Figure 2; Section 2.1 · PDF p.3
Preprint Task Description feedback Agentic Planning Environment Workflow output Subtask 1 Subtask 2 … Subtask n feedback Memory Retrieve Memory Abstract Reasoning Database Add Tool Use act class Planning(): class Reasoning(): Input : task type, task description, Input : task description, feedback tool_instruction, feedback Output : plan Output : reasoning result select return : Module class Memory(): Input : current situation : Task Description Tool Pool class Tooluse(): if current situation ! = ‘ ‘ : Input : task description, : Resources tooluse_instruction,feedback add(current situation) Output : tool response else: Output : retrieve() Modular Agent Design Space Standard IO Interface Figure 2: Illustration of the modular agent design space and agentic workflow (left) and the stan- dardized IO interface of four types of modules (right). • We propose a novel modular design space for LLM agents, enabling researchers to easily build on previous successful designs and accumulate new discoveries as a community. • We design the AgentSquare framework that efficiently searches for novel and good- performing LLM agents via the novel mechanism of module evolution, module recom- bination, and performance predictor. • Experiments across six diverse tasks show that our method discovers novel LLM agents that outperform all known human designs. Besides, AgentSqaure can generate human interpretable design insights for these novel agents. 2 A M ODULAR D ESIGN S PACE OF LLM AGENTS 2.1 BACKGROUND Using LLMs for automatic optimization has been a widely explored topic, such as applications in code generation (Lehman et al., 2023; Romera-Paredes et al., 2024) and neural architecture search (Nasir et al., 2024; Chen et al., 2024a). There are several recent studies that explore the problem of prompting LLMs to design LLM agentic systems. OPRO (Yang et al., 2024) and Prompt- breeder (Fernando et al., 2024) can be viewed as leveraging the reasoning power of LLMs to improve the prompt of LLM agents. More importantly, ADAS introduces the idea of searching the entire agentic system defined in code space, and propose a Meta Agent Search algorithm that discovers LLM agents outperforming state-of-the-art human designs (Hu et al., 2024). Our main difference and contribution lie in introducing a modular design space for LLM agents, which can provide a standard framework to support the convenient reuse of existing successful agent components and fruitful innovative agent module discovery. A modular design space for LLM agents facilitates the reuse of prior successful designs and sup- ports the exploration of new architectures. At the core of such modularization is the standardization of input-output interfaces, which ensures both extensibility and seamless integration with existing designs. Many experts in the field have proposed building LLM agentic systems with key modular components from engineering (Weng, 2023) and cognitive perspectives (Sumers et al., 2023). How- ever, these proposals remain largely conceptual, lacking implementable solutions to unify existing LLM agents. Besides, current LLM workflow program frameworks (e.g., LangChain and Auto- GPT) only provide operation-level components, which cannot support module-level search that best exploits the potential of prior successful designs. To address these problems, we perform a comprehensive literature review of publications from NeurIPS, ICML, and ICLR over the past three years. The review focuses on papers with the key- words “LLM”, “Agent”, or “Large Language Model” in their titles while excluding works related to multi-agent systems or agents that require additional training. Note that our aim is not to propose the most comprehensive, one-for-all LLM agent design space, but to offer a standardized framework 3
解释边界:只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。
核心方法到底怎么运转
搜索包含两种动作:模块进化让模型改写某个模块代码,模块重组把已有模块换一种搭配。成功组合及得分存入经验池。这样搜索既能利用已有实现,也能发现新实现,而不是只改角色提示或随机拼装现成积木。 (原文:PDF p.5, Figure 3; Section 3.2)
指标:搜索包含两种动作:模块进化让模型改写某个模块代码,模块重组把已有模块换一种搭配。成功组合及得分存入经验池。这样搜索既能利用已有实现,也能发现新实现,而不是只改角色提示或随机拼装现成积木。
条件:本地全文 arXiv:2410.06153v3,Figure 3; Section 3.2;条件及比较对象见陈述
PDF p.5, Figure 3; Section 3.2 · PDF p.5
Preprint Task Evaluation Webshop Alfworld Travelplanner Sciworld Evaluation M3Tool … Evaluation 𝑃′ 𝑃′ 𝑅0 𝑇0 𝑀0 𝑃1 𝑅′ 𝑇0 𝑀0 𝑅′ 𝑃0 𝑅 ′ 𝑇0 𝑀0 𝑃0 𝑅′ 𝑇0 𝑀0 𝑃0 𝑅′ 𝑇2 𝑀0 𝑃0 𝑅3 𝑇0 𝑀0 𝑃0 𝑅0 𝑇0 𝑀0 𝑇′ 𝑃0 𝑅0 𝑇′ 𝑀0 𝑃0 𝑅′ 𝑇2 𝑀0 Next Initial LLM LLM Episode Agent 𝑀′ 𝑃0 𝑅0 𝑇0 𝑀′ 𝑃0 𝑅′ 𝑇0 𝑀4 New New Agents New Agents Module Evolution Recombination : 𝑃1 𝑅1 𝑇1 𝑀1 Planning 𝑃1 𝑅1 𝑇1 𝑀1 Reasoning : 𝑃2 𝑅2 𝑇2 𝑀2 𝑃2 𝑅2 𝑇2 𝑀2 Tooluse 𝑃3 𝑅3 𝑇3 𝑀3 : 𝑃3 𝑅3 𝑇3 𝑀3 Memory Agent Search 𝑃4 𝑅4 𝑇4 𝑀4 : 𝑃4 𝑅4 𝑇4 𝑀4 Feedback … … Module Pool Experience Pool Figure 3: Overview of AgentSquare search framework. AgentSquare optimizes LLM agents through the mechanisms of module evolution and recombination. We further introduce a performance pre- dictor that implements an in- context surrogate model for efficient evaluation of novel agents. problem of MoLAS is defined as follows: arg max Evald (P, R, T, M ). (1) P ∈P,R∈R,T ∈T,M ∈M 3.2 AGENT S QUARE SEARCH ALGORITHM Solving the optimization problem of MoLAS features three key challenges: (1) The search space, defined as the Cartesian product of four orthogonal modules, is vast and hard to explore; (2) the module sets encompass any code with standard IO interfaces, making the module selection an open- ended problem; (3) the high costs of agent evaluation during the search process constrain the overall search scale. To tackle these issues, we introduce AgentSquare, an automatic search framework to optimize LLM agents within the modular design space. Facing the vast search space of MoLAS, we propose module recombination operation utilizing LLMs to strategically reason to identify more promising module combinations. Such operation broadens the coverage of child samples, overcom- ing the limitations of prompt rewrite methods that explore only a restricted space. However, only searching in the existing module combinations also narrows the search space, thus we propose mod- ule evolution operation which employs an evolutionary meta-prompt to search new modules through code-level optimization. This operation, combined with module recombination, enables the search of any module combination in the open-ended solution space. Finally, to mitigate the high costs of frequent evaluations of searched agents, we design a performance predictor as an in-context surro- gate model for evaluating searched agents, significantly accelerating the search process and reducing real-valued costs. The overall framework of AgentSquare is illustrated in Figure 3 and the algorithm is presented in Algorithm 1. Next, we detail the key components of the AgentSquare search process. 3.3 I NITIALIZATION Insights from existing AutoML studies indicate that a well-chosen initialization enhances warm-up and improves search efficiency by avoiding unpromising populations (So et al., 2019; Yuan et al., 2024). AgentSquare starts by initializing a global experience pool E = {(P, R, T, M, v)|P0 ∈ P, R0 ∈ R, T0 ∈ T, M0 ∈ M} to seed agents that are well-designed (as mentioned in Section 2) along with their real-valued performance v. The module pools {P, R, T, M} are set to the standard- ized modules extracted from these seed agents. 5
解释边界:只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。
解释性例子:购物智能体保留原来的工具模块,把一次性规划替换为能按失败反馈重规划的模块,再换记忆读取方式;只有接口兼容,这些组合才能真正运行。
解释性推断,不能当作论文直接支持的主张。
实验怎样检验这个方法
新进化出的模块仍进真实环境测试;已有模块重组的候选则可用上下文性能预测器估分,节约调用。实验覆盖购物、具身交互、工具与规划,比较人工设计、模块搜索、提示优化和整机搜索,同一底座下保持示例数量一致。预测分与真实任务分必须区分。 (原文:PDF p.7, Performance predictor; Section 4.1)
指标:新进化出的模块仍进真实环境测试;已有模块重组的候选则可用上下文性能预测器估分,节约调用。实验覆盖购物、具身交互、工具与规划,比较人工设计、模块搜索、提示优化和整机搜索,同一底座下保持示例数量一致。预测分与真实任务分必须区分。
条件:本地全文 arXiv:2410.06153v3,Performance predictor; Section 4.1;条件及比较对象见陈述
PDF p.7, Performance predictor; Section 4.1 · PDF p.7
Preprint Web Embodied Tool Game Baseline Type Method Webshop ALFWorld SciWorld M3Tool Travel PDDL CoT 0.485 0.405 0.697 0.448 0.487 0.542 Cot-SC 0.512 0.426 0.656 0.461 0.413 0.495 Self-refine 0.461 0.567 0.654 0.442 0.000 0.514 ToT 0.501 0.437 0.741 0.453 0.380 0.476 Step Back 0.468 0.279 0.220 0.434 0.000 0.486 TP 0.398 0.404 0.576 0.387 0.430 0.518 Hand-crafted Agents HuggingGPT 0.519 0.481 0.680 0.354 0.510 0.584 Voyager 0.366 0.425 0.776 0.247 0.523 0.412 Generative Agents 0.499 0.477 0.663 0.402 0.480 0.553 DEPS 0.481 0.459 0.740 0.278 0.540 0.591 OPENAGI 0.506 0.510 0.718 0.322 0.533 0.616 Dilu 0.451 0.433 0.682 0.475 0.360 0.463 Random 0.533 0.620 0.704 0.438 0.563 0.660 Module Search Bayesian 0.549 0.634 0.749 0.502 0.537 0.650 Prompt Search OPRO 0.505 0.380 0.569 0.309 0.523 0.589 Agent Search ADAS 0.521 0.543 0.754 0.475 0.373 0.568 AgentSquare 0.607 0.695 0.781 0.524 0.583 0.669 Table 1: Performance comparison of searched agents from AgentSquare and (1) existing human- designed agents (2) module search baselines (3) prompt search baselines (4) agent search baselines based on GPT-4o on six tasks across different domains. leveraged to evaluate the performance of generated network architectures (Jawahar et al., 2023; Chen et al., 2024a). During the search process, newly created agents from module evolution are still tested in the real task environment because these new modules never appear in the experience pool, and it is unsuitable to use the performance predictor to provide predictions. During the module recombination operation, the newly proposed agents are evaluated by the performance predictor, which leverages in-context reasoning based on past agent combination performance to provide efficient performance prediction. Here, given a newly searched agent A′ , the performance predictor πp thoroughly considers task descriptions d, module profiles and in-context performance examples of previously tested agents E to score novel agents: v ′ = πp (A′ , d, P, R, T, M, E), (4) where v ′ is the predicted performance of the evaluated agent. Empirical results demonstrate that the predicted performance of agents closely matches their actual performance, verifying the effective- ness of the proposed performance predictor, which is detailed in Section 4.3. 4 E XPERIMENTS 4.1 E XPERIMENTAL S ETUP Task setup. We conduct experiments on six representative tasks covering four domains: embodied, game, web and tool applications, which are widely adopted by existing LLM agent benchmarks (Ma et al., 2024; Xi et al., 2024), more details are presented in Appendix A.1. Baselines. We compare AgentSquare with four types of baselines including hand-crafted agents, module-level search, prompt-level search and agent-search methods. More details are presented in Appendix A.1. AgentSquare setup. We implement AgentSquare and conduct experiments using both GPT-3.5- turbo-0125 and GPT-4o (Achiam et al., 2023). To ensure a fair comparison, we use the same number of few-shot examples across all methods. The initial agent is set as a random module combination, and the search process terminates after 5 consecutive iterations without performance improvement. 7
解释边界:只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。
结果说明了什么
GPT-4o设置中,Webshop的AgentSquare为0.607,ADAS为0.521,贝叶斯模块搜索为0.549;ALFWorld对应0.695、0.543、0.634。它在表内任务上的优势来自组合搜索框架,分数口径由各任务决定,不能直接把不同列都叫同一种准确率。 (原文:PDF p.7, Table 1)
指标:GPT-4o设置中,Webshop的AgentSquare为0.607,ADAS为0.521,贝叶斯模块搜索为0.549;ALFWorld对应0.695、0.543、0.634。它在表内任务上的优势来自组合搜索框架,分数口径由各任务决定,不能直接把不同列都叫同一种准确率。
条件:本地全文 arXiv:2410.06153v3,Table 1;条件及比较对象见陈述
PDF p.7, Table 1 · PDF p.7
Preprint Web Embodied Tool Game Baseline Type Method Webshop ALFWorld SciWorld M3Tool Travel PDDL CoT 0.485 0.405 0.697 0.448 0.487 0.542 Cot-SC 0.512 0.426 0.656 0.461 0.413 0.495 Self-refine 0.461 0.567 0.654 0.442 0.000 0.514 ToT 0.501 0.437 0.741 0.453 0.380 0.476 Step Back 0.468 0.279 0.220 0.434 0.000 0.486 TP 0.398 0.404 0.576 0.387 0.430 0.518 Hand-crafted Agents HuggingGPT 0.519 0.481 0.680 0.354 0.510 0.584 Voyager 0.366 0.425 0.776 0.247 0.523 0.412 Generative Agents 0.499 0.477 0.663 0.402 0.480 0.553 DEPS 0.481 0.459 0.740 0.278 0.540 0.591 OPENAGI 0.506 0.510 0.718 0.322 0.533 0.616 Dilu 0.451 0.433 0.682 0.475 0.360 0.463 Random 0.533 0.620 0.704 0.438 0.563 0.660 Module Search Bayesian 0.549 0.634 0.749 0.502 0.537 0.650 Prompt Search OPRO 0.505 0.380 0.569 0.309 0.523 0.589 Agent Search ADAS 0.521 0.543 0.754 0.475 0.373 0.568 AgentSquare 0.607 0.695 0.781 0.524 0.583 0.669 Table 1: Performance comparison of searched agents from AgentSquare and (1) existing human- designed agents (2) module search baselines (3) prompt search baselines (4) agent search baselines based on GPT-4o on six tasks across different domains. leveraged to evaluate the performance of generated network architectures (Jawahar et al., 2023; Chen et al., 2024a). During the search process, newly created agents from module evolution are still tested in the real task environment because these new modules never appear in the experience pool, and it is unsuitable to use the performance predictor to provide predictions. During the module recombination operation, the newly proposed agents are evaluated by the performance predictor, which leverages in-context reasoning based on past agent combination performance to provide efficient performance prediction. Here, given a newly searched agent A′ , the performance predictor πp thoroughly considers task descriptions d, module profiles and in-context performance examples of previously tested agents E to score novel agents: v ′ = πp (A′ , d, P, R, T, M, E), (4) where v ′ is the predicted performance of the evaluated agent. Empirical results demonstrate that the predicted performance of agents closely matches their actual performance, verifying the effective- ness of the proposed performance predictor, which is detailed in Section 4.3. 4 E XPERIMENTS 4.1 E XPERIMENTAL S ETUP Task setup. We conduct experiments on six representative tasks covering four domains: embodied, game, web and tool applications, which are widely adopted by existing LLM agent benchmarks (Ma et al., 2024; Xi et al., 2024), more details are presented in Appendix A.1. Baselines. We compare AgentSquare with four types of baselines including hand-crafted agents, module-level search, prompt-level search and agent-search methods. More details are presented in Appendix A.1. AgentSquare setup. We implement AgentSquare and conduct experiments using both GPT-3.5- turbo-0125 and GPT-4o (Achiam et al., 2023). To ensure a fair comparison, we use the same number of few-shot examples across all methods. The initial agent is set as a random module combination, and the search process terminates after 5 consecutive iterations without performance improvement. 7
解释边界:只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。
去掉模块重组,TravelPlanner由完整模型0.583到0.280,但PDDL仍为0.669,与完整模型相同;去掉模块进化,PDDL为0.614。不同任务依赖的组件不同,不能把“两个设计都有贡献”写成任何场景下每一项都不可缺少。 (原文:PDF p.9, Table 2)
指标:去掉模块重组,TravelPlanner由完整模型0.583到0.280,但PDDL仍为0.669,与完整模型相同;去掉模块进化,PDDL为0.614。不同任务依赖的组件不同,不能把“两个设计都有贡献”写成任何场景下每一项都不可缺少。
条件:本地全文 arXiv:2410.06153v3,Table 2;条件及比较对象见陈述
PDF p.9, Table 2 · PDF p.9
Preprint Method Webshop ALFWorld SciWorld M3Tool TravelPlanner PDDL AgentSquare (full) 0.607 0.695 0.781 0.524 0.583 0.669 w/o module evolution 0.564 0.649 0.736 0.502 0.577 0.614 w/o module recombination 0.560 0.616 0.710 0.481 0.280 0.669 Table 2: Ablation study of AgentSquare on GPT-4o on six tasks across different domains. Webshop based on gpt-3.5 Sciworld based on gpt-3.5 M3tool based on gpt-3.5 Actual tested performance Actual tested performance Actual tested performance 0.7 Webshop based on gpt-4o 0.7 Sciworld based on gpt-4o 0.7 M3tool based on gpt-4o Alfworld based on gpt-3.5 Travelplanner based on gpt-3.5 Pddl based on gpt-3.5 Alfworld based on gpt-4o Travelplanner based on gpt-4o 0.6 Pddl based on gpt-4o 0.6 0.6 0.5 0.5 0.5 0.4 0.4 0.4 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.2 0.3 0.4 0.5 0.6 0.7 0.2 0.3 0.4 0.5 0.6 0.7 Predicted performance Predicted performance Predicted performance Figure 5: Validation of the effectiveness of the performance predictor (correlation between the actual and predicted performance) on each task. bination which strategically recombines existing ones. To verify the effectiveness of each design, we tested three variants: the full model, a version without module evolution, and a version without module recombination. The results based on GPT-4o and GPT-3.5 are presented in Table 2 and Ta- ble A.5, respectively. It can be seen that dropping each design results in a noticeable performance decline and the module recombination has a larger impact. Module recombination significantly ex- pands the search space, reducing the risk of falling into a local optima. Meanwhile, module evolution facilitates the discovery of more advanced modules tailored to specific tasks. These two operations collaborate well ensuring the effectiveness of the search process in AgentSquare. Effectiveness of performance predictor. In this part, we verify the effectiveness of this design empirically. Figure 5 illustrates the predicted performance of given agents versus their actual tested performance based on both GPT-3.5 and GPT-4o on all six tasks. The tested agents were generated through random sampling by randomly combining existing modules. It can be found that the pre- dicted performance closely aligns with the actual performance, demonstrating the effectiveness of the performance predictor. For instance, the evaluation cost of the predictor is only about 0.025% of the cost of a full evaluation based on GPT-4o in ALFWorld, demonstrating its remarkable cost- efficiency. We provide more experiment results of predicting the performance of the dynamically searched agents in Figure A.15 of the Appendix. 4.4 D ISCOVERED B EST AGENTS FROM AGENT S QUARE In this section, we provide some illustrations of the searched best agents, especially some discovered promising modules. Table A.4 summarizes the searched best agent from AgentSquare and the best hand-crafted agents on all tasks. We can observe that AgentSquare can adaptively identify promising agents with both previously existing and newly programmed modules tailored to the given task. For instance, the discovered best agent for ALFWorld combines an existing well-designed memory module from Generative Agents with newly created planning (named TD) and reasoning modules (named SF-ToT). By comparison, the best hand-crafted agent Self-refine focuses only on reasoning module design while overlooking other functional modules, leading to suboptimal performance. Moreover, we illustrate two new modules and the human interpretable design insights discovered on ALFWorld in Figure 6. More illustrations are listed in the Figure A.16 to Figure A.21. 5 R ELATED W ORK 5.1 LLM- BASED AUTONOMOUS AGENTS LLM-based autonomous agents are an advanced AI system using a core LLM to manage external functional modules and interact with the world (Ding et al., 2024b). Recent studies have equipped 9
解释边界:只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。
这篇论文哪里最强,哪里最危险
预测器根据已测组合的描述和成绩作上下文推断。作者对全新模块仍坚持真实评价,正说明这不是免实验的性能证明。可组合性也取决于预定义接口;把该空间中的搜索胜出外推到所有可能智能体,会超出论文证据。 (原文:PDF p.7, Performance predictor)
指标:预测器根据已测组合的描述和成绩作上下文推断。作者对全新模块仍坚持真实评价,正说明这不是免实验的性能证明。可组合性也取决于预定义接口;把该空间中的搜索胜出外推到所有可能智能体,会超出论文证据。
条件:本地全文 arXiv:2410.06153v3,Performance predictor;条件及比较对象见陈述
PDF p.7, Performance predictor · PDF p.7
Preprint Web Embodied Tool Game Baseline Type Method Webshop ALFWorld SciWorld M3Tool Travel PDDL CoT 0.485 0.405 0.697 0.448 0.487 0.542 Cot-SC 0.512 0.426 0.656 0.461 0.413 0.495 Self-refine 0.461 0.567 0.654 0.442 0.000 0.514 ToT 0.501 0.437 0.741 0.453 0.380 0.476 Step Back 0.468 0.279 0.220 0.434 0.000 0.486 TP 0.398 0.404 0.576 0.387 0.430 0.518 Hand-crafted Agents HuggingGPT 0.519 0.481 0.680 0.354 0.510 0.584 Voyager 0.366 0.425 0.776 0.247 0.523 0.412 Generative Agents 0.499 0.477 0.663 0.402 0.480 0.553 DEPS 0.481 0.459 0.740 0.278 0.540 0.591 OPENAGI 0.506 0.510 0.718 0.322 0.533 0.616 Dilu 0.451 0.433 0.682 0.475 0.360 0.463 Random 0.533 0.620 0.704 0.438 0.563 0.660 Module Search Bayesian 0.549 0.634 0.749 0.502 0.537 0.650 Prompt Search OPRO 0.505 0.380 0.569 0.309 0.523 0.589 Agent Search ADAS 0.521 0.543 0.754 0.475 0.373 0.568 AgentSquare 0.607 0.695 0.781 0.524 0.583 0.669 Table 1: Performance comparison of searched agents from AgentSquare and (1) existing human- designed agents (2) module search baselines (3) prompt search baselines (4) agent search baselines based on GPT-4o on six tasks across different domains. leveraged to evaluate the performance of generated network architectures (Jawahar et al., 2023; Chen et al., 2024a). During the search process, newly created agents from module evolution are still tested in the real task environment because these new modules never appear in the experience pool, and it is unsuitable to use the performance predictor to provide predictions. During the module recombination operation, the newly proposed agents are evaluated by the performance predictor, which leverages in-context reasoning based on past agent combination performance to provide efficient performance prediction. Here, given a newly searched agent A′ , the performance predictor πp thoroughly considers task descriptions d, module profiles and in-context performance examples of previously tested agents E to score novel agents: v ′ = πp (A′ , d, P, R, T, M, E), (4) where v ′ is the predicted performance of the evaluated agent. Empirical results demonstrate that the predicted performance of agents closely matches their actual performance, verifying the effective- ness of the proposed performance predictor, which is detailed in Section 4.3. 4 E XPERIMENTS 4.1 E XPERIMENTAL S ETUP Task setup. We conduct experiments on six representative tasks covering four domains: embodied, game, web and tool applications, which are widely adopted by existing LLM agent benchmarks (Ma et al., 2024; Xi et al., 2024), more details are presented in Appendix A.1. Baselines. We compare AgentSquare with four types of baselines including hand-crafted agents, module-level search, prompt-level search and agent-search methods. More details are presented in Appendix A.1. AgentSquare setup. We implement AgentSquare and conduct experiments using both GPT-3.5- turbo-0125 and GPT-4o (Achiam et al., 2023). To ensure a fair comparison, we use the same number of few-shot examples across all methods. The initial agent is set as a random module combination, and the search process terminates after 5 consecutive iterations without performance improvement. 7
解释边界:只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。
代码从哪里读
已核验作者代码仓库可以访问。先从项目说明核对版本、运行环境与输入格式,再决定是否复现。本次未安装、运行作者代码,也没有验证复现成功。
读完后记住这三件事
先把代理拆成可替换模块;交替创造模块与重组模块;预测器省成本不等于每个候选都经过真实环境验证。 (原文:PDF p.3, Figure 2; Section 2.1;PDF p.5, Figure 3; Section 3.2;PDF p.7, Performance predictor; Section 4.1;PDF p.7, Table 1;PDF p.9, Table 2;PDF p.7, Performance predictor)
指标:已有智能体常各自定义接口,成功的记忆模块很难直接移植到另一个规划器。本文把设计空间拆为规划、推理、工具使用和记忆,规定可组合接口。它不是宣称穷尽所有智能体架构,初始文献整理还排除了多智能体及需额外训练的方法。
条件:本地全文 arXiv:2410.06153v3,Figure 2; Section 2.1;条件及比较对象见陈述
PDF p.3, Figure 2; Section 2.1 · PDF p.3
Preprint Task Description feedback Agentic Planning Environment Workflow output Subtask 1 Subtask 2 … Subtask n feedback Memory Retrieve Memory Abstract Reasoning Database Add Tool Use act class Planning(): class Reasoning(): Input : task type, task description, Input : task description, feedback tool_instruction, feedback Output : plan Output : reasoning result select return : Module class Memory(): Input : current situation : Task Description Tool Pool class Tooluse(): if current situation ! = ‘ ‘ : Input : task description, : Resources tooluse_instruction,feedback add(current situation) Output : tool response else: Output : retrieve() Modular Agent Design Space Standard IO Interface Figure 2: Illustration of the modular agent design space and agentic workflow (left) and the stan- dardized IO interface of four types of modules (right). • We propose a novel modular design space for LLM agents, enabling researchers to easily build on previous successful designs and accumulate new discoveries as a community. • We design the AgentSquare framework that efficiently searches for novel and good- performing LLM agents via the novel mechanism of module evolution, module recom- bination, and performance predictor. • Experiments across six diverse tasks show that our method discovers novel LLM agents that outperform all known human designs. Besides, AgentSqaure can generate human interpretable design insights for these novel agents. 2 A M ODULAR D ESIGN S PACE OF LLM AGENTS 2.1 BACKGROUND Using LLMs for automatic optimization has been a widely explored topic, such as applications in code generation (Lehman et al., 2023; Romera-Paredes et al., 2024) and neural architecture search (Nasir et al., 2024; Chen et al., 2024a). There are several recent studies that explore the problem of prompting LLMs to design LLM agentic systems. OPRO (Yang et al., 2024) and Prompt- breeder (Fernando et al., 2024) can be viewed as leveraging the reasoning power of LLMs to improve the prompt of LLM agents. More importantly, ADAS introduces the idea of searching the entire agentic system defined in code space, and propose a Meta Agent Search algorithm that discovers LLM agents outperforming state-of-the-art human designs (Hu et al., 2024). Our main difference and contribution lie in introducing a modular design space for LLM agents, which can provide a standard framework to support the convenient reuse of existing successful agent components and fruitful innovative agent module discovery. A modular design space for LLM agents facilitates the reuse of prior successful designs and sup- ports the exploration of new architectures. At the core of such modularization is the standardization of input-output interfaces, which ensures both extensibility and seamless integration with existing designs. Many experts in the field have proposed building LLM agentic systems with key modular components from engineering (Weng, 2023) and cognitive perspectives (Sumers et al., 2023). How- ever, these proposals remain largely conceptual, lacking implementable solutions to unify existing LLM agents. Besides, current LLM workflow program frameworks (e.g., LangChain and Auto- GPT) only provide operation-level components, which cannot support module-level search that best exploits the potential of prior successful designs. To address these problems, we perform a comprehensive literature review of publications from NeurIPS, ICML, and ICLR over the past three years. The review focuses on papers with the key- words “LLM”, “Agent”, or “Large Language Model” in their titles while excluding works related to multi-agent systems or agents that require additional training. Note that our aim is not to propose the most comprehensive, one-for-all LLM agent design space, but to offer a standardized framework 3
解释边界:只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。
指标:搜索包含两种动作:模块进化让模型改写某个模块代码,模块重组把已有模块换一种搭配。成功组合及得分存入经验池。这样搜索既能利用已有实现,也能发现新实现,而不是只改角色提示或随机拼装现成积木。
条件:本地全文 arXiv:2410.06153v3,Figure 3; Section 3.2;条件及比较对象见陈述
PDF p.5, Figure 3; Section 3.2 · PDF p.5
Preprint Task Evaluation Webshop Alfworld Travelplanner Sciworld Evaluation M3Tool … Evaluation 𝑃′ 𝑃′ 𝑅0 𝑇0 𝑀0 𝑃1 𝑅′ 𝑇0 𝑀0 𝑅′ 𝑃0 𝑅 ′ 𝑇0 𝑀0 𝑃0 𝑅′ 𝑇0 𝑀0 𝑃0 𝑅′ 𝑇2 𝑀0 𝑃0 𝑅3 𝑇0 𝑀0 𝑃0 𝑅0 𝑇0 𝑀0 𝑇′ 𝑃0 𝑅0 𝑇′ 𝑀0 𝑃0 𝑅′ 𝑇2 𝑀0 Next Initial LLM LLM Episode Agent 𝑀′ 𝑃0 𝑅0 𝑇0 𝑀′ 𝑃0 𝑅′ 𝑇0 𝑀4 New New Agents New Agents Module Evolution Recombination : 𝑃1 𝑅1 𝑇1 𝑀1 Planning 𝑃1 𝑅1 𝑇1 𝑀1 Reasoning : 𝑃2 𝑅2 𝑇2 𝑀2 𝑃2 𝑅2 𝑇2 𝑀2 Tooluse 𝑃3 𝑅3 𝑇3 𝑀3 : 𝑃3 𝑅3 𝑇3 𝑀3 Memory Agent Search 𝑃4 𝑅4 𝑇4 𝑀4 : 𝑃4 𝑅4 𝑇4 𝑀4 Feedback … … Module Pool Experience Pool Figure 3: Overview of AgentSquare search framework. AgentSquare optimizes LLM agents through the mechanisms of module evolution and recombination. We further introduce a performance pre- dictor that implements an in- context surrogate model for efficient evaluation of novel agents. problem of MoLAS is defined as follows: arg max Evald (P, R, T, M ). (1) P ∈P,R∈R,T ∈T,M ∈M 3.2 AGENT S QUARE SEARCH ALGORITHM Solving the optimization problem of MoLAS features three key challenges: (1) The search space, defined as the Cartesian product of four orthogonal modules, is vast and hard to explore; (2) the module sets encompass any code with standard IO interfaces, making the module selection an open- ended problem; (3) the high costs of agent evaluation during the search process constrain the overall search scale. To tackle these issues, we introduce AgentSquare, an automatic search framework to optimize LLM agents within the modular design space. Facing the vast search space of MoLAS, we propose module recombination operation utilizing LLMs to strategically reason to identify more promising module combinations. Such operation broadens the coverage of child samples, overcom- ing the limitations of prompt rewrite methods that explore only a restricted space. However, only searching in the existing module combinations also narrows the search space, thus we propose mod- ule evolution operation which employs an evolutionary meta-prompt to search new modules through code-level optimization. This operation, combined with module recombination, enables the search of any module combination in the open-ended solution space. Finally, to mitigate the high costs of frequent evaluations of searched agents, we design a performance predictor as an in-context surro- gate model for evaluating searched agents, significantly accelerating the search process and reducing real-valued costs. The overall framework of AgentSquare is illustrated in Figure 3 and the algorithm is presented in Algorithm 1. Next, we detail the key components of the AgentSquare search process. 3.3 I NITIALIZATION Insights from existing AutoML studies indicate that a well-chosen initialization enhances warm-up and improves search efficiency by avoiding unpromising populations (So et al., 2019; Yuan et al., 2024). AgentSquare starts by initializing a global experience pool E = {(P, R, T, M, v)|P0 ∈ P, R0 ∈ R, T0 ∈ T, M0 ∈ M} to seed agents that are well-designed (as mentioned in Section 2) along with their real-valued performance v. The module pools {P, R, T, M} are set to the standard- ized modules extracted from these seed agents. 5
解释边界:只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。
指标:新进化出的模块仍进真实环境测试;已有模块重组的候选则可用上下文性能预测器估分,节约调用。实验覆盖购物、具身交互、工具与规划,比较人工设计、模块搜索、提示优化和整机搜索,同一底座下保持示例数量一致。预测分与真实任务分必须区分。
条件:本地全文 arXiv:2410.06153v3,Performance predictor; Section 4.1;条件及比较对象见陈述
PDF p.7, Performance predictor; Section 4.1 · PDF p.7
Preprint Web Embodied Tool Game Baseline Type Method Webshop ALFWorld SciWorld M3Tool Travel PDDL CoT 0.485 0.405 0.697 0.448 0.487 0.542 Cot-SC 0.512 0.426 0.656 0.461 0.413 0.495 Self-refine 0.461 0.567 0.654 0.442 0.000 0.514 ToT 0.501 0.437 0.741 0.453 0.380 0.476 Step Back 0.468 0.279 0.220 0.434 0.000 0.486 TP 0.398 0.404 0.576 0.387 0.430 0.518 Hand-crafted Agents HuggingGPT 0.519 0.481 0.680 0.354 0.510 0.584 Voyager 0.366 0.425 0.776 0.247 0.523 0.412 Generative Agents 0.499 0.477 0.663 0.402 0.480 0.553 DEPS 0.481 0.459 0.740 0.278 0.540 0.591 OPENAGI 0.506 0.510 0.718 0.322 0.533 0.616 Dilu 0.451 0.433 0.682 0.475 0.360 0.463 Random 0.533 0.620 0.704 0.438 0.563 0.660 Module Search Bayesian 0.549 0.634 0.749 0.502 0.537 0.650 Prompt Search OPRO 0.505 0.380 0.569 0.309 0.523 0.589 Agent Search ADAS 0.521 0.543 0.754 0.475 0.373 0.568 AgentSquare 0.607 0.695 0.781 0.524 0.583 0.669 Table 1: Performance comparison of searched agents from AgentSquare and (1) existing human- designed agents (2) module search baselines (3) prompt search baselines (4) agent search baselines based on GPT-4o on six tasks across different domains. leveraged to evaluate the performance of generated network architectures (Jawahar et al., 2023; Chen et al., 2024a). During the search process, newly created agents from module evolution are still tested in the real task environment because these new modules never appear in the experience pool, and it is unsuitable to use the performance predictor to provide predictions. During the module recombination operation, the newly proposed agents are evaluated by the performance predictor, which leverages in-context reasoning based on past agent combination performance to provide efficient performance prediction. Here, given a newly searched agent A′ , the performance predictor πp thoroughly considers task descriptions d, module profiles and in-context performance examples of previously tested agents E to score novel agents: v ′ = πp (A′ , d, P, R, T, M, E), (4) where v ′ is the predicted performance of the evaluated agent. Empirical results demonstrate that the predicted performance of agents closely matches their actual performance, verifying the effective- ness of the proposed performance predictor, which is detailed in Section 4.3. 4 E XPERIMENTS 4.1 E XPERIMENTAL S ETUP Task setup. We conduct experiments on six representative tasks covering four domains: embodied, game, web and tool applications, which are widely adopted by existing LLM agent benchmarks (Ma et al., 2024; Xi et al., 2024), more details are presented in Appendix A.1. Baselines. We compare AgentSquare with four types of baselines including hand-crafted agents, module-level search, prompt-level search and agent-search methods. More details are presented in Appendix A.1. AgentSquare setup. We implement AgentSquare and conduct experiments using both GPT-3.5- turbo-0125 and GPT-4o (Achiam et al., 2023). To ensure a fair comparison, we use the same number of few-shot examples across all methods. The initial agent is set as a random module combination, and the search process terminates after 5 consecutive iterations without performance improvement. 7
解释边界:只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。
指标:GPT-4o设置中,Webshop的AgentSquare为0.607,ADAS为0.521,贝叶斯模块搜索为0.549;ALFWorld对应0.695、0.543、0.634。它在表内任务上的优势来自组合搜索框架,分数口径由各任务决定,不能直接把不同列都叫同一种准确率。
条件:本地全文 arXiv:2410.06153v3,Table 1;条件及比较对象见陈述
PDF p.7, Table 1 · PDF p.7
Preprint Web Embodied Tool Game Baseline Type Method Webshop ALFWorld SciWorld M3Tool Travel PDDL CoT 0.485 0.405 0.697 0.448 0.487 0.542 Cot-SC 0.512 0.426 0.656 0.461 0.413 0.495 Self-refine 0.461 0.567 0.654 0.442 0.000 0.514 ToT 0.501 0.437 0.741 0.453 0.380 0.476 Step Back 0.468 0.279 0.220 0.434 0.000 0.486 TP 0.398 0.404 0.576 0.387 0.430 0.518 Hand-crafted Agents HuggingGPT 0.519 0.481 0.680 0.354 0.510 0.584 Voyager 0.366 0.425 0.776 0.247 0.523 0.412 Generative Agents 0.499 0.477 0.663 0.402 0.480 0.553 DEPS 0.481 0.459 0.740 0.278 0.540 0.591 OPENAGI 0.506 0.510 0.718 0.322 0.533 0.616 Dilu 0.451 0.433 0.682 0.475 0.360 0.463 Random 0.533 0.620 0.704 0.438 0.563 0.660 Module Search Bayesian 0.549 0.634 0.749 0.502 0.537 0.650 Prompt Search OPRO 0.505 0.380 0.569 0.309 0.523 0.589 Agent Search ADAS 0.521 0.543 0.754 0.475 0.373 0.568 AgentSquare 0.607 0.695 0.781 0.524 0.583 0.669 Table 1: Performance comparison of searched agents from AgentSquare and (1) existing human- designed agents (2) module search baselines (3) prompt search baselines (4) agent search baselines based on GPT-4o on six tasks across different domains. leveraged to evaluate the performance of generated network architectures (Jawahar et al., 2023; Chen et al., 2024a). During the search process, newly created agents from module evolution are still tested in the real task environment because these new modules never appear in the experience pool, and it is unsuitable to use the performance predictor to provide predictions. During the module recombination operation, the newly proposed agents are evaluated by the performance predictor, which leverages in-context reasoning based on past agent combination performance to provide efficient performance prediction. Here, given a newly searched agent A′ , the performance predictor πp thoroughly considers task descriptions d, module profiles and in-context performance examples of previously tested agents E to score novel agents: v ′ = πp (A′ , d, P, R, T, M, E), (4) where v ′ is the predicted performance of the evaluated agent. Empirical results demonstrate that the predicted performance of agents closely matches their actual performance, verifying the effective- ness of the proposed performance predictor, which is detailed in Section 4.3. 4 E XPERIMENTS 4.1 E XPERIMENTAL S ETUP Task setup. We conduct experiments on six representative tasks covering four domains: embodied, game, web and tool applications, which are widely adopted by existing LLM agent benchmarks (Ma et al., 2024; Xi et al., 2024), more details are presented in Appendix A.1. Baselines. We compare AgentSquare with four types of baselines including hand-crafted agents, module-level search, prompt-level search and agent-search methods. More details are presented in Appendix A.1. AgentSquare setup. We implement AgentSquare and conduct experiments using both GPT-3.5- turbo-0125 and GPT-4o (Achiam et al., 2023). To ensure a fair comparison, we use the same number of few-shot examples across all methods. The initial agent is set as a random module combination, and the search process terminates after 5 consecutive iterations without performance improvement. 7
解释边界:只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。
指标:去掉模块重组,TravelPlanner由完整模型0.583到0.280,但PDDL仍为0.669,与完整模型相同;去掉模块进化,PDDL为0.614。不同任务依赖的组件不同,不能把“两个设计都有贡献”写成任何场景下每一项都不可缺少。
条件:本地全文 arXiv:2410.06153v3,Table 2;条件及比较对象见陈述
PDF p.9, Table 2 · PDF p.9
Preprint Method Webshop ALFWorld SciWorld M3Tool TravelPlanner PDDL AgentSquare (full) 0.607 0.695 0.781 0.524 0.583 0.669 w/o module evolution 0.564 0.649 0.736 0.502 0.577 0.614 w/o module recombination 0.560 0.616 0.710 0.481 0.280 0.669 Table 2: Ablation study of AgentSquare on GPT-4o on six tasks across different domains. Webshop based on gpt-3.5 Sciworld based on gpt-3.5 M3tool based on gpt-3.5 Actual tested performance Actual tested performance Actual tested performance 0.7 Webshop based on gpt-4o 0.7 Sciworld based on gpt-4o 0.7 M3tool based on gpt-4o Alfworld based on gpt-3.5 Travelplanner based on gpt-3.5 Pddl based on gpt-3.5 Alfworld based on gpt-4o Travelplanner based on gpt-4o 0.6 Pddl based on gpt-4o 0.6 0.6 0.5 0.5 0.5 0.4 0.4 0.4 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.2 0.3 0.4 0.5 0.6 0.7 0.2 0.3 0.4 0.5 0.6 0.7 Predicted performance Predicted performance Predicted performance Figure 5: Validation of the effectiveness of the performance predictor (correlation between the actual and predicted performance) on each task. bination which strategically recombines existing ones. To verify the effectiveness of each design, we tested three variants: the full model, a version without module evolution, and a version without module recombination. The results based on GPT-4o and GPT-3.5 are presented in Table 2 and Ta- ble A.5, respectively. It can be seen that dropping each design results in a noticeable performance decline and the module recombination has a larger impact. Module recombination significantly ex- pands the search space, reducing the risk of falling into a local optima. Meanwhile, module evolution facilitates the discovery of more advanced modules tailored to specific tasks. These two operations collaborate well ensuring the effectiveness of the search process in AgentSquare. Effectiveness of performance predictor. In this part, we verify the effectiveness of this design empirically. Figure 5 illustrates the predicted performance of given agents versus their actual tested performance based on both GPT-3.5 and GPT-4o on all six tasks. The tested agents were generated through random sampling by randomly combining existing modules. It can be found that the pre- dicted performance closely aligns with the actual performance, demonstrating the effectiveness of the performance predictor. For instance, the evaluation cost of the predictor is only about 0.025% of the cost of a full evaluation based on GPT-4o in ALFWorld, demonstrating its remarkable cost- efficiency. We provide more experiment results of predicting the performance of the dynamically searched agents in Figure A.15 of the Appendix. 4.4 D ISCOVERED B EST AGENTS FROM AGENT S QUARE In this section, we provide some illustrations of the searched best agents, especially some discovered promising modules. Table A.4 summarizes the searched best agent from AgentSquare and the best hand-crafted agents on all tasks. We can observe that AgentSquare can adaptively identify promising agents with both previously existing and newly programmed modules tailored to the given task. For instance, the discovered best agent for ALFWorld combines an existing well-designed memory module from Generative Agents with newly created planning (named TD) and reasoning modules (named SF-ToT). By comparison, the best hand-crafted agent Self-refine focuses only on reasoning module design while overlooking other functional modules, leading to suboptimal performance. Moreover, we illustrate two new modules and the human interpretable design insights discovered on ALFWorld in Figure 6. More illustrations are listed in the Figure A.16 to Figure A.21. 5 R ELATED W ORK 5.1 LLM- BASED AUTONOMOUS AGENTS LLM-based autonomous agents are an advanced AI system using a core LLM to manage external functional modules and interact with the world (Ding et al., 2024b). Recent studies have equipped 9
解释边界:只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。
指标:预测器根据已测组合的描述和成绩作上下文推断。作者对全新模块仍坚持真实评价,正说明这不是免实验的性能证明。可组合性也取决于预定义接口;把该空间中的搜索胜出外推到所有可能智能体,会超出论文证据。
条件:本地全文 arXiv:2410.06153v3,Performance predictor;条件及比较对象见陈述
PDF p.7, Performance predictor · PDF p.7
Preprint Web Embodied Tool Game Baseline Type Method Webshop ALFWorld SciWorld M3Tool Travel PDDL CoT 0.485 0.405 0.697 0.448 0.487 0.542 Cot-SC 0.512 0.426 0.656 0.461 0.413 0.495 Self-refine 0.461 0.567 0.654 0.442 0.000 0.514 ToT 0.501 0.437 0.741 0.453 0.380 0.476 Step Back 0.468 0.279 0.220 0.434 0.000 0.486 TP 0.398 0.404 0.576 0.387 0.430 0.518 Hand-crafted Agents HuggingGPT 0.519 0.481 0.680 0.354 0.510 0.584 Voyager 0.366 0.425 0.776 0.247 0.523 0.412 Generative Agents 0.499 0.477 0.663 0.402 0.480 0.553 DEPS 0.481 0.459 0.740 0.278 0.540 0.591 OPENAGI 0.506 0.510 0.718 0.322 0.533 0.616 Dilu 0.451 0.433 0.682 0.475 0.360 0.463 Random 0.533 0.620 0.704 0.438 0.563 0.660 Module Search Bayesian 0.549 0.634 0.749 0.502 0.537 0.650 Prompt Search OPRO 0.505 0.380 0.569 0.309 0.523 0.589 Agent Search ADAS 0.521 0.543 0.754 0.475 0.373 0.568 AgentSquare 0.607 0.695 0.781 0.524 0.583 0.669 Table 1: Performance comparison of searched agents from AgentSquare and (1) existing human- designed agents (2) module search baselines (3) prompt search baselines (4) agent search baselines based on GPT-4o on six tasks across different domains. leveraged to evaluate the performance of generated network architectures (Jawahar et al., 2023; Chen et al., 2024a). During the search process, newly created agents from module evolution are still tested in the real task environment because these new modules never appear in the experience pool, and it is unsuitable to use the performance predictor to provide predictions. During the module recombination operation, the newly proposed agents are evaluated by the performance predictor, which leverages in-context reasoning based on past agent combination performance to provide efficient performance prediction. Here, given a newly searched agent A′ , the performance predictor πp thoroughly considers task descriptions d, module profiles and in-context performance examples of previously tested agents E to score novel agents: v ′ = πp (A′ , d, P, R, T, M, E), (4) where v ′ is the predicted performance of the evaluated agent. Empirical results demonstrate that the predicted performance of agents closely matches their actual performance, verifying the effective- ness of the proposed performance predictor, which is detailed in Section 4.3. 4 E XPERIMENTS 4.1 E XPERIMENTAL S ETUP Task setup. We conduct experiments on six representative tasks covering four domains: embodied, game, web and tool applications, which are widely adopted by existing LLM agent benchmarks (Ma et al., 2024; Xi et al., 2024), more details are presented in Appendix A.1. Baselines. We compare AgentSquare with four types of baselines including hand-crafted agents, module-level search, prompt-level search and agent-search methods. More details are presented in Appendix A.1. AgentSquare setup. We implement AgentSquare and conduct experiments using both GPT-3.5- turbo-0125 and GPT-4o (Achiam et al., 2023). To ensure a fair comparison, we use the same number of few-shot examples across all methods. The initial agent is set as a random module combination, and the search process terminates after 5 consecutive iterations without performance improvement. 7
解释边界:只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。