AFlow: Automating Agentic Workflow Generation

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zhang, Jiayi, Xiang, Jinyu, Yu, Zhaoyang, Teng, Fengwei, Chen, Xionghui, Chen, Jiaqi, Zhuge, Mingchen, Cheng, Xin, Hong, Sirui, Wang, Jinlin, Zheng, Bingnan, Liu, Bang, Luo, Yuyu, Wu, Chenglin
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917985499742208
author Zhang, Jiayi
Xiang, Jinyu
Yu, Zhaoyang
Teng, Fengwei
Chen, Xionghui
Chen, Jiaqi
Zhuge, Mingchen
Cheng, Xin
Hong, Sirui
Wang, Jinlin
Zheng, Bingnan
Liu, Bang
Luo, Yuyu
Wu, Chenglin
author_facet Zhang, Jiayi
Xiang, Jinyu
Yu, Zhaoyang
Teng, Fengwei
Chen, Xionghui
Chen, Jiaqi
Zhuge, Mingchen
Cheng, Xin
Hong, Sirui
Wang, Jinlin
Zheng, Bingnan
Liu, Bang
Luo, Yuyu
Wu, Chenglin
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2410_10762
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle AFlow: Automating Agentic Workflow Generation
Zhang, Jiayi
Xiang, Jinyu
Yu, Zhaoyang
Teng, Fengwei
Chen, Xionghui
Chen, Jiaqi
Zhuge, Mingchen
Cheng, Xin
Hong, Sirui
Wang, Jinlin
Zheng, Bingnan
Liu, Bang
Luo, Yuyu
Wu, Chenglin
Artificial Intelligence
Computation and Language
Machine Learning
Software Engineering
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.
title AFlow: Automating Agentic Workflow Generation
topic Artificial Intelligence
Computation and Language
Machine Learning
Software Engineering
url https://arxiv.org/abs/2410.10762