FlowBot:通过双层优化和文本梯度诱导LLM工作流
FlowBot: Inducing LLM Workflows with Bilevel Optimization and Textual Gradients
AI总结:
本文提出FlowBot,一种基于双层优化和文本梯度的数据驱动方法,自动诱导LLM代理和工作流,与人类设计的基线相比表现相当。
摘要:
LLM工作流通过协调对单个LLM/代理的结构调用来实现特定目标,为构建强大AI系统提供了有前景的路径。然而,现有方法通常依赖于人工设计的流水线和提示,这在现实部署中是一个重大瓶颈。如何在数据驱动的方式下自动诱导LLM代理和工作流?本文描述了一种简单的数据驱动方法,将工作流诱导建模为双层优化问题:外层循环优化工作流的高层次草图(特别是LLM调用的结构),内层循环依次优化每个单独的LLM调用。两者均通过“文本梯度”进行优化,其中内层循环通过“反向传播”文本梯度逐层模块化地优化每个组件。我们发现通过我们的FlowBot(通过双层优化和文本梯度诱导工作流)方法发现的LLM工作流在与使用人工设计或生成工作流的强基线相比时表现相当。
英文摘要:
LLM workflows, which coordinate structured calls to individual LLMs/agents to achieve a particular goal, offer a promising path towards building powerful AI systems that can tackle diverse tasks. However, existing approaches for building such workflows generally rely on human-crafted pipelines and prompts, which presents a substantial bottleneck in real world deployment. How can we automatically induce LLM-based agents and workflows in a data-driven way? This paper describes a simple data-driven approach for automatically inducing agents and LLM workflows. We formulate workflow induction as a bilevel optimization problem: an outer loop which optimizes a high-level sketch of the workflow (in particular how the LLM calls should be structured), and an inner loop which optimizes each individual LLM call one-by one. Both loops are optimized with ``textual gradients'' where for the inner loop we optimize each component in a modular way through ``backpropagating'' textual gradients layer-by-layer. We find that LLM workflows discovered through our \textsc{FlowBot} (work\textbf{flow} induction through \textbf{b}ilevel \textbf{o}ptimization and \textbf{t}extual gradients) approach performs competitively against strong baselines that make use of human-crafted or generated workflows.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。