Skip to main content
QUICK REVIEW

[论文解读] AutoFlow: Automated Workflow Generation for Large Language Model Agents

Zelong Li, Shuyuan Xu|arXiv (Cornell University)|Jul 1, 2024
Business Process Modeling and Analysis被引用 4
一句话总结

AutoFlow 是一种框架,通过强化学习自动为基于大语言模型的智能体生成自然语言工作流,实现高效可靠的任务执行。当使用开源大语言模型时,其性能相比 CoRE 等基线模型提升超过 40%,在复杂任务求解中展现出更优的效率与可读性。

ABSTRACT

Recent advancements in Large Language Models (LLMs) have shown significant progress in understanding complex natural language. One important application of LLM is LLM-based AI Agent, which leverages the ability of LLM as well as external tools for complex-task solving. To make sure LLM Agents follow an effective and reliable procedure to solve the given task, manually designed workflows are usually used to guide the working mechanism of agents. However, manually designing the workflows requires considerable efforts and domain knowledge, making it difficult to develop and deploy agents on massive scales. To address these issues, we propose AutoFlow, a framework designed to automatically generate workflows for agents to solve complex tasks. AutoFlow takes natural language program as the format of agent workflow and employs a workflow optimization procedure to iteratively optimize the workflow quality. Besides, this work offers two workflow generation methods: fine-tuning-based and in-context-based methods, making the AutoFlow framework applicable to both open-source and closed-source LLMs. Experimental results show that our framework can produce robust and reliable agent workflows. We believe that the automatic generation and interpretation of workflows in natural language represent a promising paradigm for solving complex tasks, particularly with the rapid development of LLMs. The source code of this work is available at https://github.com/agiresearch/AutoFlow.

研究动机与目标

  • 解决手动设计基于大语言模型智能体的可靠工作流所需的人力投入高和领域专业知识要求高的问题。
  • 通过自动化工作流创建,无需人工工程,实现大语言模型智能体的可扩展部署。
  • 通过两种生成方法(微调与上下文学习)支持开源和闭源大语言模型。
  • 通过基于性能奖励的迭代式强化学习优化,提升工作流质量。
  • 在提升任务求解性能的同时,保持生成工作流的人类可读性,优于人工设计的版本。

提出的方法

  • 将智能体工作流表示为自然语言程序,以增强可解释性与人类理解的便捷性。
  • 采用双模型架构:一个生成器大语言模型用于生成工作流,一个冻结的解释器大语言模型用于执行并评估工作流。
  • 使用强化学习(REINFORCE)方法,以性能指标(如 CLIP、BERT、ViT 分数)作为奖励,对生成器大语言模型进行 30 次迭代的微调。
  • 对开源大语言模型(如 Mixtral)采用低秩适应(LoRA),秩为 8,实现高效微调。
  • 对闭源大语言模型(如 GPT-4)支持上下文学习,无需参数更新,实现广泛的兼容性。
  • 通过解释器执行与评估的反馈,迭代优化生成器,持续改进工作流。

实验结果

研究问题

  • RQ1大语言模型能否自动生成自然语言工作流,以替代基于大语言模型智能体中的人工设计工作流?
  • RQ2强化学习在优化大语言模型生成的工作流以执行复杂任务方面有多有效?
  • RQ3AutoFlow 框架能否在性能上超越人工设计或现有基线工作流?
  • RQ4将不同大语言模型分别用作生成器和解释器(如 Mixtral + GPT-4)是否能带来协同增益?
  • RQ5在提升任务性能的同时,生成的工作流在多大程度上仍保持对人类的可读性和可理解性?

主要发现

  • 当使用 Mixtral 作为解释器大语言模型时,AutoFlow 在平均性能上相比最佳基线 CoRE 提升超过 40%。
  • 当使用 GPT-4 作为解释器时,AutoFlow 相比 CoRE 实现了 5% 的性能提升,展现出持续的优越性。
  • 在 OpenAGI 基准测试中,使用 GPT-4 作为生成器、Mixtral 作为解释器的 AutoFlow 达到了最高平均得分。
  • 在两张表格中,AutoFlow 生成的工作流在所有任务类型上均取得最高分,表明其在多样化任务上的鲁棒性。
  • 该框架在显著降低人工设计工作流的投入的同时,保持了生成工作流的高可读性。
  • 不同大语言模型的协同组合(如用 Mixtral 作为生成器、GPT-4 作为解释器)带来了性能提升,表明其具有互补优势。

更好的研究,从现在开始

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

无需绑定信用卡

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