Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
38 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
41 tokens/sec
o3 Pro
7 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

AFlow: Automating Agentic Workflow Generation (2410.10762v3)

Published 14 Oct 2024 in cs.AI, cs.CL, cs.LG, and cs.SE
AFlow: Automating Agentic Workflow Generation

Abstract: 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/geekan/MetaGPT.

Automating Agentic Workflow Generation

In the context of evolving AI technologies and their applications, the automation of agentic workflow generation presents a significant research contribution. This paper addresses a crucial limitation in the effective deployment of LLMs: the necessity of human intervention in designing and optimizing workflows tailored to complex tasks. The authors propose a novel framework to automate this process, utilizing a Monte Carlo Tree Search (MCTS)-based approach to systematically explore workflow configurations.

Methodology

The proposed framework reframes workflow optimization as a search problem over code-represented workflows where LLM-invoking nodes are linked by edges. Each node corresponds to an LLM action with parameters including model type, prompt, temperature, and output format. The search space encompasses all potential nodes and edge configurations, conceptualized as a graph or network that captures intricate inter-node interactions.

To efficiently explore this vast search space, the authors introduce as a Monte Carlo Tree Search-based framework, complementing it with predefined operators as foundational blocks. The key innovation here is the integration of operators, allowing workflows to be assembled from known effective patterns, hence improving search effectiveness.

Empirical Evaluation

The framework's efficacy has been empirically validated across six benchmark datasets, including GSM8K, HumanEval, MBPP, MATH, HotPotQA, and DROP. results demonstrate a 5.7% improvement over manually designed workflows and surpass existing automated solutions by 19.5%. More notably, the discovered workflows enable smaller LLMs to achieve performance comparable to larger models such as GPT-4o, at a fraction of the inference cost.

Implications

The implications of this research are twofold:

  1. Practical Impact: The framework reduces human effort in workflow design, making LLMs more adaptable across various domains. The ability to leverage smaller, cost-effective models without sacrificing performance significantly increases the accessibility of advanced AI solutions.
  2. Theoretical Foundations: The paper sets a precedent by formalizing the workflow optimization problem in a general framework. This foundation can inspire further research into automated systems and extend to other domains where workflow efficiency and adaptability are critical.

Future Developments

Future research could focus on broadening the operator set and improving the efficiency of the MCTS approach. Additionally, exploring other optimization algorithms or hybrid approaches could further enhance the adaptability and performance of automated workflow systems. The ability for frameworks like to autonomously generate complex workflows hints at a move towards truly automated AI systems, necessitating continuous advancements in understanding the structural intricacies of agentic workflows.

In summary, this paper presents a substantial step forward in the automation of agentic workflows for LLMs, offering both practical benefits and a robust theoretical framework for future developments in AI efficiency and adaptability.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (14)
  1. Jiayi Zhang (159 papers)
  2. Jinyu Xiang (4 papers)
  3. Zhaoyang Yu (7 papers)
  4. Fengwei Teng (4 papers)
  5. Xionghui Chen (2 papers)
  6. Jiaqi Chen (89 papers)
  7. Mingchen Zhuge (20 papers)
  8. Xin Cheng (89 papers)
  9. Sirui Hong (9 papers)
  10. Jinlin Wang (14 papers)
  11. Bingnan Zheng (1 paper)
  12. Bang Liu (93 papers)
  13. Yuyu Luo (41 papers)
  14. Chenglin Wu (16 papers)
Citations (3)
Youtube Logo Streamline Icon: https://streamlinehq.com