1 Jul 2024 | Zelong Li, Shuyuan Xu, Kai Mei, Wenyue Hua, Balaji Rama, Om Raheja, Hao Wang, He Zhu, Yongfeng Zhang
AutoFlow is a framework for automatically generating workflows for large language model (LLM) agents to solve complex tasks. The framework uses natural language programs to represent workflows and employs a workflow optimization process to iteratively improve the quality of the generated workflows. It offers two workflow generation methods: fine-tuning-based and in-context-based, making it applicable to both open-source and closed-source LLMs. The framework uses reinforcement learning to update the generator LLM based on the performance of the generated workflows. Experimental results show that AutoFlow can produce robust and reliable agent workflows, outperforming manually designed ones while maintaining readability. The automatic generation and interpretation of workflows in natural language represent a promising paradigm for solving complex tasks, especially with the rapid development of LLMs. The source code is available at https://github.com/agiresearch/AutoFlow. AutoFlow introduces a framework that can automatically generate workflows in natural language, reducing human efforts. It proposes two methods, the fine-tuning method and the in-context learning method, to incorporate reinforcement learning in the workflow generation process for both open-source and closed-source LLMs. It conducts experiments through benchmark tasks to validate the AutoFlow framework, contributing to higher valid plan rates and overall performance while keeping the generated natural language workflow readable by humans. The framework is designed to automatically generate workflows for LLM agents to solve complex tasks, using natural language programs as the format of agent workflows. It employs a workflow optimization procedure to iteratively optimize the workflow quality. The framework introduces two innovative workflow generation methods: a fine-tuning-based method and an in-context-based method. The fine-tuning-based approach customizes the workflow generation process for specific tasks and domains by adjusting the parameters of the LLMs. The in-context-based method utilizes contextual information to guide the generation process without the need for extensive fine-tuning, making it suitable for both open-source and closed-source LLMs. The framework uses reinforcement learning to update the generator LLM with the reward from the performance of the generated workflows. The experimental results validate the effectiveness of the AutoFlow framework, showing that the generated workflows by AutoFlow outperform manually designed ones while keeping readability. The automatic generation and interpretation of workflows in natural language not only streamline the development process but also represent a promising paradigm for addressing complex problems, especially in the context of the rapid evolution of LLM technologies. The framework is evaluated on the OpenAGI benchmark dataset, showing significant improvements over baselines. The results demonstrate that AutoFlow is effective and can generate a workflow with better performance than manually designed ones. The framework is applicable to both open-source and closed-source LLMs, and the results show that the combination of different systems (Mixtral and GPT-4) for the LLM interpreter and workflow generator might lead to a synergistic effect where the strengths of one system complement the weaknesses of the other, which helps to better solve complex multi-step tasks. The framework is designed to automatically generate workflowsAutoFlow is a framework for automatically generating workflows for large language model (LLM) agents to solve complex tasks. The framework uses natural language programs to represent workflows and employs a workflow optimization process to iteratively improve the quality of the generated workflows. It offers two workflow generation methods: fine-tuning-based and in-context-based, making it applicable to both open-source and closed-source LLMs. The framework uses reinforcement learning to update the generator LLM based on the performance of the generated workflows. Experimental results show that AutoFlow can produce robust and reliable agent workflows, outperforming manually designed ones while maintaining readability. The automatic generation and interpretation of workflows in natural language represent a promising paradigm for solving complex tasks, especially with the rapid development of LLMs. The source code is available at https://github.com/agiresearch/AutoFlow. AutoFlow introduces a framework that can automatically generate workflows in natural language, reducing human efforts. It proposes two methods, the fine-tuning method and the in-context learning method, to incorporate reinforcement learning in the workflow generation process for both open-source and closed-source LLMs. It conducts experiments through benchmark tasks to validate the AutoFlow framework, contributing to higher valid plan rates and overall performance while keeping the generated natural language workflow readable by humans. The framework is designed to automatically generate workflows for LLM agents to solve complex tasks, using natural language programs as the format of agent workflows. It employs a workflow optimization procedure to iteratively optimize the workflow quality. The framework introduces two innovative workflow generation methods: a fine-tuning-based method and an in-context-based method. The fine-tuning-based approach customizes the workflow generation process for specific tasks and domains by adjusting the parameters of the LLMs. The in-context-based method utilizes contextual information to guide the generation process without the need for extensive fine-tuning, making it suitable for both open-source and closed-source LLMs. The framework uses reinforcement learning to update the generator LLM with the reward from the performance of the generated workflows. The experimental results validate the effectiveness of the AutoFlow framework, showing that the generated workflows by AutoFlow outperform manually designed ones while keeping readability. The automatic generation and interpretation of workflows in natural language not only streamline the development process but also represent a promising paradigm for addressing complex problems, especially in the context of the rapid evolution of LLM technologies. The framework is evaluated on the OpenAGI benchmark dataset, showing significant improvements over baselines. The results demonstrate that AutoFlow is effective and can generate a workflow with better performance than manually designed ones. The framework is applicable to both open-source and closed-source LLMs, and the results show that the combination of different systems (Mixtral and GPT-4) for the LLM interpreter and workflow generator might lead to a synergistic effect where the strengths of one system complement the weaknesses of the other, which helps to better solve complex multi-step tasks. The framework is designed to automatically generate workflows