arXiv:2410.10762cs.AIcs.CL2024-10ICLR被引 352

用搜索方法自动生成和优化智能体工作流,提升效率降低成本。

AFlow: Automating Agentic Workflow Generation

  • 将工作流优化转化为代码空间的搜索问题,结合蒙特卡洛树搜索。
  • 在6个数据集上比顶尖方法平均提升5.7%,小模型成本仅为GPT-4o的4.55%。
  • 适合需要自动化任务编排且资源受限的研究者或开发者使用。

大型语言模型(LLMs)在多个领域解决复杂任务方面展现出巨大潜力,通常依赖于遵循详细指令和操作序列的智能体工作流。然而,构建这些工作流需大量人工投入,限制了可扩展性和通用性。近期研究尝试自动化生成与优化工作流,但现有方法仍依赖初始人工设定,未能实现完全自动化和高效工作流生成。为此,我们将工作流优化重新建模为代码表示的工作流空间中的搜索问题,其中调用LLM的节点通过边连接。我们提出AFlow,一种自动化框架,利用蒙特卡洛树搜索高效探索该空间,通过代码修改、树状经验积累和执行反馈迭代优化工作流。在六个基准数据集上的实证评估表明,AFlow相比当前最先进基线平均提升5.7%。此外,AFlow使小型模型在特定任务上表现超越GPT-4o,推理成本仅为后者的4.55%。代码已公开于https://github.com/FoundationAgents/AFlow。

原文摘要 · Abstract (English)

Large language models (LLMs) have demonstrated remarkable potential in solving complex tasks across diverse domains, typically by employing agentic workflows that follow detailed instructions and operational sequences. However, constructing these workflows requires significant human effort, limiting scalability and generalizability. Recent research has sought to automate the generation and optimization of these workflows, but existing methods still rely on initial manual setup and fall short of achieving fully automated and effective workflow generation. To address this challenge, we reformulate workflow optimization as a search problem over code-represented workflows, where LLM-invoking nodes are connected by edges. We introduce AFlow, an automated framework that efficiently explores this space using Monte Carlo Tree Search, iteratively refining workflows through code modification, tree-structured experience, and execution feedback. Empirical evaluations across six benchmark datasets demonstrate AFlow's efficacy, yielding a 5.7% average improvement over state-of-the-art baselines. Furthermore, AFlow enables smaller models to outperform GPT-4o on specific tasks at 4.55% of its inference cost in dollars. The code is available at https://github.com/FoundationAgents/AFlow.

智能体自动化工作流优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。