CodeAgents:一种面向LLM中多智能体编码化推理的令牌高效框架
CodeAgents: A Token-Efficient Framework for Codified Multi-Agent Reasoning in LLMs
AI总结:
CodeAgents框架将多智能体推理编码为模块化伪代码,在GAIA、HotpotQA和VirtualHome上以55-87%的令牌节省实现3-36个百分点的规划性能提升,并在VirtualHome达到56%的新SOTA成功率。
摘要:
有效的提示设计对于提升大语言模型(LLM)驱动智能体的规划能力至关重要。然而,现有的结构化提示策略通常局限于单智能体、仅规划场景,并且往往仅基于任务准确率来评估性能,忽视了多智能体环境中的令牌效率、模块化和可扩展性等关键因素。为解决这些局限性,我们提出了CodeAgents,这是一个提示框架,它将多智能体推理编码化,并在多智能体系统中实现结构化、令牌高效的规划。在CodeAgents中,智能体交互的所有组成部分——任务、计划、反馈、系统角色和外部工具调用——都被编码为模块化的伪代码,并辅以控制结构(如循环、条件语句)、布尔逻辑和类型化变量。这种设计将松散连接的智能体计划转化为连贯、可解释且可验证的多智能体推理程序。我们使用一系列代表性LLM,在三个不同的基准——GAIA、HotpotQA和VirtualHome——上评估了所提出的框架。结果表明,规划性能得到了一致的提升,相比自然语言提示基线,绝对增益为3-36个百分点。在VirtualHome上,我们的方法取得了56%的最新最优成功率。此外,我们的方法将输入和输出令牌使用量分别减少了55-87%和41-70%,这凸显了令牌感知评估指标在开发可扩展多智能体LLM系统中的重要性。代码和资源可在以下地址获取:https://anonymous.4open.science/r/CodifyingAgent-5A86
英文摘要:
Effective prompt design is essential for improving the planning capabilities of large language model (LLM)-driven agents. However, existing structured prompting strategies are typically limited to single-agent, plan-only settings, and often evaluate performance solely based on task accuracy - overlooking critical factors such as token efficiency, modularity, and scalability in multi-agent environments. To address these limitations, we introduce CodeAgents, a prompting framework that codifies multi-agent reasoning and enables structured, token-efficient planning in multi-agent systems. In CodeAgents, all components of agent interaction - Task, Plan, Feedback, system roles, and external tool invocations - are codified into modular pseudocode enriched with control structures (e.g., loops, conditionals), boolean logic, and typed variables. This design transforms loosely connected agent plans into cohesive, interpretable, and verifiable multi-agent reasoning programs. We evaluate the proposed framework across three diverse benchmarks - GAIA, HotpotQA, and VirtualHome - using a range of representative LLMs. Results show consistent improvements in planning performance, with absolute gains of 3-36 percentage points over natural language prompting baselines. On VirtualHome, our method achieves a new state-of-the-art success rate of 56%. In addition, our approach reduces input and output token usage by 55-87% and 41-70%, respectively, underscoring the importance of token-aware evaluation metrics in the development of scalable multi-agent LLM systems. The code and resources are available at: https://anonymous.4open.science/r/CodifyingAgent-5A86
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。