arXiv:2604.26258cs.CLcs.LG2026-04

用双层优化自动构建大模型工作流,无需人工设计提示词。

FlowBot: Inducing LLM Workflows with Bilevel Optimization and Textual Gradients

  • 通过双层优化自动设计大模型调用流程结构
  • 在多个任务上性能媲美人工设计的工作流
  • 适合想自动化构建AI流水线的研究者和开发者

大模型工作流通过协调多个大模型或智能体的结构化调用,实现特定目标,是构建强大AI系统的重要路径。然而,现有方法多依赖人工编写流程和提示词,部署成本高。本文提出一种数据驱动的自动工作流诱导方法:将工作流构建建模为双层优化问题——外层优化整体流程结构(如调用顺序),内层逐个优化每个大模型调用。两层均采用“文本梯度”进行优化,内层通过逐层反向传播文本梯度实现模块化更新。实验表明,通过本文提出的FlowBot方法发现的工作流,在多个任务上表现可媲美依赖人工设计或生成的工作流的强基线模型。

原文摘要 · Abstract (English)

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.

大模型工作流双层优化文本梯度

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。