Skip to main content
QUICK REVIEW

[论文解读] AFlow: Automating Agentic Workflow Generation

Jiayi Zhang, Jianhai Xiang|arXiv (Cornell University)|Oct 14, 2024
Scientific Computing and Data Management被引用 6
一句话总结

AFLOW 使用蒙特卡罗树搜索在代码表示、 调用 LLM 的工作流上,自动发现具备代理性的工作流,超越六个基准的人工和自动基线,并使更小的模型实现更强的成本-性能。它在与现有基线相比平均提升5.7%,并带来显著的成本效益。

ABSTRACT

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.

研究动机与目标

  • 倡导可扩展的代理性工作流自动化,以减少人工设计工作量。
  • 将工作流优化表述为对代码表示的、调用 LLM 的图的搜索。
  • 开发 AFLOW,一个基于 MCTS 的框架,带有操作符以高效探索该空间。
  • 展示 AFLOW 在多个基准上的有效性及成本效率的影响。

提出的方法

  • 将工作流表示为节点(LLM 调用),通过基于代码的边连接。
  • 使用带有软混合概率节点选择和由 LLM 驱动的扩展的蒙特卡罗树搜索。
  • 引入操作符(例如 Generate、Review & Revise、Ensemble)以构建可复用的工作流模式。
  • 固定关键参数(模型、温度、格式),使搜索聚焦于边和提示。
  • 通过执行反馈评估生成的工作流,并回传经验以指导搜索。
  • 证明 AFLOW 平均比基线提升 5.7%,并使更小的模型在更低成本下超越更大模型。

实验结果

研究问题

  • RQ1AFLOW 是否能够在无需人工干预的情况下,在多样化领域自动发现高性能的代理性工作流?
  • RQ2在性能与效率方面,AFLOW 的基于 MCTS 的搜索与现有的自动工作流优化方法相比如何?
  • RQ3使用不同执行 LLM 时,会产生哪些成本-性能权衡?
  • RQ4发现的工作流在不同语言模型之间的可迁移性到何种程度?
  • RQ5操作符对搜索效率和最终工作流质量的影响是什么?

主要发现

  • AFLOW 在六个基准上对最新基线的平均提升为 5.7%。
  • AFLOW 比现有的自动化方法高出 19.5%。
  • 平均而言,AFLOW 的工作流在问答、代码和数学领域的性能达到了 80.3%。
  • AFLOW 发现的工作流使更小的 LLM 能以更低成本超过更大模型(帕累托前沿结果)。
  • AFLOW 展示了在不同执行器之间发现的工作流具有模型无关的可迁移性。
  • 消融实验表明操作符提升搜索效率,尽管在没有预定义操作符的情况下,AFLOW 也能表现良好。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。