每天早上一封邮件,把昨天的 AI 梳理好订阅邮件

METAL LAB

FlowEvo: Self-Evolving Agents through the Co-Evolution of Workflows and Executable Skills

arXiv:2607.215962026-08-19

AI智能体把自己成功完成任务的流程编译成可复用技能不需要重新训练就能越用越强

大语言模型智能体每次解决任务时通常都要临时搭建一套操作流程,即便这次成功了,流程也常常用完就扔。FlowEvo的做法是把成功的流程编译成可执行的技能存进一个持久技能库,之后遇到相似任务时既可以直接调用这个技能执行,也可以只把它当作参考信息来帮助构建新流程。在不更新模型参数、仅用GPT-4o-mini的情况下,FlowEvo在ALFWorld上达到85.6%的成功率,比最强基线高26.4个百分点,同时token消耗只有约三分之一。

他们做了什么

  1. 智能体一旦成功完成任务,FlowEvo会自动把这次流程编译成可复用的技能(可调用代码加使用说明)并存入技能库
  2. 面对新任务时,匹配的技能既可以直接被执行,也可以仅作为结构化参考信息提供给新流程的生成过程
  3. 系统持续跟踪每个技能的实际效果,一旦发现某个技能反而拖累成功率(负迁移),就会自动停用它
  4. 仅用同一个GPT-4o-mini模型,FlowEvo在ALFWorld、HumanEval、MBPP、GSM8K、MATH-500这五个基准的完整标准测试集上,在8种对比方法中取得最高准确率
  5. 在参数规模从7B到671B的10个基础模型上,FlowEvo在50组模型与数据集的组合中有49组的表现超过了此前的ExpeL方法
Figure 1: Overview of FlowEvo. Successful workflows are compiled into executable skills and stored in a persistent bank. Retrieved skills can either be executed directly or supplied as structured context for subsequent workflow generation.
Figure 1: Overview of FlowEvo. Successful workflows are compiled into executable skills and stored in a persistent bank. Retrieved skills can either be executed directly or supplied as structured context for subsequent workflow generation.
Table 1: Routing modes in FlowEvo. The distinction between direct execution and skill-conditioned generation is central to the mechanism analysis.
RouteRole of retrieved skillExecutes codeIndirect effect
Dynamic generationNo retrieved skill is used.
Direct skill executionA retrieved skill is called as an executable subroutine before verification.
Skill-conditioned generationRetrieved skills are supplied only as structured context for planning and generation.
Figure 2: Skill accumulation dynamics on ALFWorld. (a) FlowEvo’s token cost drops sharply once the first compiled skill becomes available around episode 10 (dashed line) and remains substantially below ReAct for the rest of the run. (b) Cumulative direct-reuse count (green) grows nearly linearly to 101/134, and the reuse hit rate (orange) stabilizes around 75%.
Figure 2: Skill accumulation dynamics on ALFWorld. (a) FlowEvo’s token cost drops sharply once the first compiled skill becomes available around episode 10 (dashed line) and remains substantially below ReAct for the rest of the run. (b) Cumulative direct-reuse count (green) grows nearly linearly to 101/134, and the reuse hit rate (orange) stabilizes around 75%.
Table 2: Main results across three benchmarks (GPT-4o-mini). Bold = best accuracy or lowest tokens; underline = second best.
ALFWorldHumanEvalGSM8K
MethodSR (%)Tokenspass@1 (%)TokensSolve (%)Tokens
Reflexion52.231,90092.789096.8555
ExpeL46.332,95889.088392.1552
ADAS53.029,67182.43,77690.82,820
AFLOW59.230,13794.73,82693.52,494
FlowEvo82.812,26795.188097.1541
Figure 3: Per-task-type success rate on ALFWorld (GPT-4o-mini; n per type varies). FlowEvo improves over ReAct on all five displayed task types. The magnitude of improvement tracks how often the compiled skill completed the task through direct execution alone without fallback to skill-conditioned or dynamic generation. The pick_two task type is omitted because its compiled skill was suppressed by skill curation as a case of negative transfer (see Section 4.3).
Figure 3: Per-task-type success rate on ALFWorld (GPT-4o-mini; n per type varies). FlowEvo improves over ReAct on all five displayed task types. The magnitude of improvement tracks how often the compiled skill completed the task through direct execution alone without fallback to skill-conditioned or dynamic generation. The pick_two task type is omitted because its compiled skill was suppressed by skill curation as a case of negative transfer (see Section 4.3).
Table 3: Core decision thresholds used in FlowEvo. All values are defaults; no per-benchmark tuning was performed for the reported results.
ConstantValue
Retrieval
top_k3
retrieval_threshold5.0
Historical positive-transfer cap2.5
Negative-transfer risk cap3.0
Routing
_COMPATIBILITY_DIRECT_THRESHOLD0.55
Direct-execute compat gate≥1.5
_CODE_EXCERPT_THRESHOLD4.6
Max seed context skills2
Admission
banned_imports{os, subprocess, socket, requests, pathlib}
banned_calls{eval, exec, compile, __import__, open}
prune_audit_fail_threshold2
Curation (ALFWorld)
_CONTRASTIVE_MIN_GUIDED5
_CONTRASTIVE_MIN_UNGUIDED3
_CONTRASTIVE_HARM_THRESHOLD−0.1
_AUDIT_MIN_USES3
_AUDIT_UTILITY_THRESHOLD0.5
_AUDIT_INACTIVITY_LIMIT50 episodes
Adaptive escalation
Level 1 (greedy)temp=0.0, max=2048
Level 2 (mini-ensemble, 2 candidates)temp=0.5, max=2048
Level 3 (retry, hot)temp=0.7, max=2048
Level 4 (retry, cool)temp=0.2, max=2048
Reflexion reasoningtemp=0.0, max=300
Execution
ALFWorld max_steps50
Sandbox timeout (code/math)10 s
Table 4: Active skills after 134 ALFWorld episodes. Uses counts episodes in which the skill was retrieved above retrieval_threshold and thus participated in routing (whether the router eventually selected direct execution or skill-conditioned generation, or downgraded to dynamic). Success / Fail are the outcomes of those retrieval-matched episodes; Utility = Success / Uses. Entries are cumulative over the run. For five of the six task types, Uses equals Direct+Cond from Table 5; look_at_obj_in_light has 3 additional retrieval matches that were routing-downgraded to pure_dynamic (see Section 4.4: "the retrieved skill matched on 15 of 18 episodes").
Task typeStatusUsesSuccessFailUtility
pick_and_place_simpleactive232301.00
pick_clean_then_place_in_recepactive282801.00
pick_heat_then_place_in_recepactive212101.00
pick_cool_then_place_in_recepactive201820.90
look_at_obj_in_lightactive151320.87
pick_two_obj_and_placesuppressed10190.10
Table 5: Internal routing modes by task type on ALFWorld. “Direct” = pure direct_skill; “Cond.” = direct_then_* plus exemplar_guided; “Dyn.” = pure_dynamic. “Direct SR” is the success rate among pure direct-execute episodes. “Overall SR” is the pass rate on all episodes of the task type.
Task typenDirectCond.Dyn.Direct SROverall SR
look_at_obj_in_light18012614/18 (78%)
pick_and_place_simple24149114/1424/24 (100%)
pick_clean_then_place_in_recep31226322/2229/31 (94%)
pick_cool_then_place_in_recep21128112/1219/21 (90%)
pick_heat_then_place_in_recep23192219/1922/23 (96%)
pick_two_obj_and_place1701073/17 (18%)
Total13467472067/67111/134 (83%)

为什么重要

这说明智能体可以只靠推理阶段积累经验来同时提升准确率和效率,而无需重新训练底层模型。对于家庭机器人控制、自动代码与数学题求解等存在大量重复性任务的实际场景,这种能在降低推理成本的同时提高准确率的方法具有直接的实用价值。

本文术语

  • 流程(workflow) · 智能体为解决任务临时构建的推理、工具调用与代码执行步骤
  • 技能库 · 由以往成功流程编译而成的可执行程序的持久化存储库
  • 负迁移 · 复用某个已存储技能反而导致成功率下降的现象
  • 技能条件生成 · 不直接执行已存技能,而是将其作为参考上下文来辅助构建新流程
  • 无需训练(training-free) · 在不更新底层模型参数的前提下,仅靠推理阶段的机制提升表现

论文原文摘要(英文)

Large language model agents can adapt to complex tasks by constructing workflows at inference time, but procedures discovered in one episode are usually discarded after execution. Existing skill libraries provide reusable executable routines, but are typically assembled offline and do not grow from the agent's own workflows. We introduce FlowEvo, a training-free framework in which workflows and skills co-evolve at inference time. FlowEvo compiles successful workflows into callable skills, stores them in a persistent bank, and uses retrieved skills either through direct execution or as context for constructing new workflows. It also tracks each skill's downstream utility and suppresses skills that cause negative transfer. Using a shared GPT-4o-mini backbone, FlowEvo achieves the highest accuracy among 8 baselines on the full standard splits of ALFWorld, HumanEval, MBPP, GSM8K, and MATH-500. On ALFWorld, it reaches 85.6%, 26.4 points above the strongest baseline, while using roughly one third as many tokens. Across 10 base models spanning 7B to 671B parameters, FlowEvo outperforms ExpeL in 49 of 50 model-dataset comparisons. Code is available at https://github.com/DEFENSE-SEU/FlowEvo.

作者 · Zeyu Ren

在 arXiv 阅读

最新论文

全部论文 →

METAL LAB 最新报道

图片来源: Zeyu Ren et al., arXiv:2607.21596, arxiv-nonexclusive