优化工作流需要工作流
研究论文 · 2026/10/02
复杂现实任务可能超出单个大语言模型的能力,因此需要多智能体工作流来协调专用智能体协同工作。近期方法训练LLM根据执行结果构建更好的工作流,但仅优化工作流生成器,而构建或执行每个工作流的其他智能体保持固定,尽管每个结果都依赖于所有智能体。然而,将训练扩展到生成器之外具有挑战性:智能体相互耦合,且工作流的结果是一个单一稀疏分数,无法指出哪个智能体导致失败。我们提出FloWright,利用工作流作为优化工作流的框架。通过引入分层、结构感知的奖励范式,FloWright使一个角色能够自我进化,两个或更多角色能够共同进化,无需额外模型、标签或执行。考虑到工作流通常在单个智能体已能处理的数据上训练和评估的局限性,我们进一步提出DataWright,一种自适应数据硬化方法,将现有数据集转换为难度增加的工作流级任务。在文档、幻灯片、图表、代码、数学和金融任务中,使用FloWright训练的小型开放模型性能提升高达+7.41%,共同进化(+5.03%)比单独优化其中一个角色(+2.83%)获得更多收益。项目页面:https://xhguo7.github.io/FloWright/。
该研究解决了多智能体工作流优化中仅训练生成器而其他智能体固定的局限,提出了无需额外资源的共同进化方法,并在多个领域验证了有效性,对提升复杂任务处理能力有重要意义。
Tackling complex real-world tasks can exceed the capabilities of a single large language model (LLM), motivating the use of multi-agent workflows that coordinate specialized agents to work together on these tasks. Recent methods train LLMs to construct better workflows from execution outcomes, but they optimize only the workflow generator, while the other agents that build or execute each workflow remain fixed even though every outcome depends on all of them. However, extending training beyond the generator is challenging: the agents are coupled, and a workflow's outcome is a single sparse score that cannot tell which agent causes a failure. We propose FloWright, which leverages the workflow as a harness to optimize workflows. By introducing a hierarchical, structure-aware reward paradigm, FloWright enables one role to self-evolve and two or more roles to co-evolve, with no additional models, labels, or executions. Considering the limitation that workflows are commonly trained and evaluated on data that a single agent can already handle, we further propose DataWright, an adaptive data hardening approach that converts existing datasets into workflow-level tasks with increased difficulty. Across document, slide, chart, code, math, and finance tasks, small open models trained with FloWright achieve improved performance by up to +7.41%, with co-evolving (+5.03%) more roles gaining more than optimizing one of them alone (+2.83%). Our project page: https://xhguo7.github.io/FloWright/.