FlowEvo: Self-Evolving Agents through the Co-Evolution of Workflows and Executable Skills
AI智能体把自己成功完成任务的流程编译成可复用技能不需要重新训练就能越用越强
大语言模型智能体每次解决任务时通常都要临时搭建一套操作流程,即便这次成功了,流程也常常用完就扔。FlowEvo的做法是把成功的流程编译成可执行的技能存进一个持久技能库,之后遇到相似任务时既可以直接调用这个技能执行,也可以只把它当作参考信息来帮助构建新流程。在不更新模型参数、仅用GPT-4o-mini的情况下,FlowEvo在ALFWorld上达到85.6%的成功率,比最强基线高26.4个百分点,同时token消耗只有约三分之一。
他们做了什么
- 智能体一旦成功完成任务,FlowEvo会自动把这次流程编译成可复用的技能(可调用代码加使用说明)并存入技能库
- 面对新任务时,匹配的技能既可以直接被执行,也可以仅作为结构化参考信息提供给新流程的生成过程
- 系统持续跟踪每个技能的实际效果,一旦发现某个技能反而拖累成功率(负迁移),就会自动停用它
- 仅用同一个GPT-4o-mini模型,FlowEvo在ALFWorld、HumanEval、MBPP、GSM8K、MATH-500这五个基准的完整标准测试集上,在8种对比方法中取得最高准确率
- 在参数规模从7B到671B的10个基础模型上,FlowEvo在50组模型与数据集的组合中有49组的表现超过了此前的ExpeL方法

| Route | Role of retrieved skill | Executes code | Indirect effect |
|---|---|---|---|
| Dynamic generation | No retrieved skill is used. | ✗ | ✗ |
| Direct skill execution | A retrieved skill is called as an executable subroutine before verification. | ✓ | ✗ |
| Skill-conditioned generation | Retrieved skills are supplied only as structured context for planning and generation. | ✗ | ✓ |
| ALFWorld | HumanEval | GSM8K | ||||
|---|---|---|---|---|---|---|
| Method | SR (%) | Tokens | pass@1 (%) | Tokens | Solve (%) | Tokens |
| Reflexion | 52.2 | 31,900 | 92.7 | 890 | 96.8 | 555 |
| ExpeL | 46.3 | 32,958 | 89.0 | 883 | 92.1 | 552 |
| ADAS | 53.0 | 29,671 | 82.4 | 3,776 | 90.8 | 2,820 |
| AFLOW | 59.2 | 30,137 | 94.7 | 3,826 | 93.5 | 2,494 |
| FlowEvo | 82.8 | 12,267 | 95.1 | 880 | 97.1 | 541 |
| Constant | Value |
|---|---|
| Retrieval | |
| top_k | 3 |
| retrieval_threshold | 5.0 |
| Historical positive-transfer cap | 2.5 |
| Negative-transfer risk cap | 3.0 |
| Routing | |
| _COMPATIBILITY_DIRECT_THRESHOLD | 0.55 |
| Direct-execute compat gate | ≥1.5 |
| _CODE_EXCERPT_THRESHOLD | 4.6 |
| Max seed context skills | 2 |
| Admission | |
| banned_imports | {os, subprocess, socket, requests, pathlib} |
| banned_calls | {eval, exec, compile, __import__, open} |
| prune_audit_fail_threshold | 2 |
| Curation (ALFWorld) | |
| _CONTRASTIVE_MIN_GUIDED | 5 |
| _CONTRASTIVE_MIN_UNGUIDED | 3 |
| _CONTRASTIVE_HARM_THRESHOLD | −0.1 |
| _AUDIT_MIN_USES | 3 |
| _AUDIT_UTILITY_THRESHOLD | 0.5 |
| _AUDIT_INACTIVITY_LIMIT | 50 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 reasoning | temp=0.0, max=300 |
| Execution | |
| ALFWorld max_steps | 50 |
| Sandbox timeout (code/math) | 10 s |
| Task type | Status | Uses | Success | Fail | Utility |
|---|---|---|---|---|---|
| pick_and_place_simple | active | 23 | 23 | 0 | 1.00 |
| pick_clean_then_place_in_recep | active | 28 | 28 | 0 | 1.00 |
| pick_heat_then_place_in_recep | active | 21 | 21 | 0 | 1.00 |
| pick_cool_then_place_in_recep | active | 20 | 18 | 2 | 0.90 |
| look_at_obj_in_light | active | 15 | 13 | 2 | 0.87 |
| pick_two_obj_and_place | suppressed | 10 | 1 | 9 | 0.10 |
| Task type | n | Direct | Cond. | Dyn. | Direct SR | Overall SR |
|---|---|---|---|---|---|---|
| look_at_obj_in_light | 18 | 0 | 12 | 6 | — | 14/18 (78%) |
| pick_and_place_simple | 24 | 14 | 9 | 1 | 14/14 | 24/24 (100%) |
| pick_clean_then_place_in_recep | 31 | 22 | 6 | 3 | 22/22 | 29/31 (94%) |
| pick_cool_then_place_in_recep | 21 | 12 | 8 | 1 | 12/12 | 19/21 (90%) |
| pick_heat_then_place_in_recep | 23 | 19 | 2 | 2 | 19/19 | 22/23 (96%) |
| pick_two_obj_and_place | 17 | 0 | 10 | 7 | — | 3/17 (18%) |
| Total | 134 | 67 | 47 | 20 | 67/67 | 111/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.
在 arXiv 阅读最新论文
- Frequency-Aware Continual Learning for Smart Contract Vulnerability Detection with Large Language Models智能合约漏洞检测AI能不断学新漏洞、不忘旧知识,还能合并成一个模型上线
- Asymmetric Attention Heads: Structured Head-Wise Context Allocation for Transformer Attention一项测试:Transformer里的每个注意力头真的需要看一样长的上下文吗
- Remember, Verify, or Ask? Cross-Family Evaluation of Memory Commitment in LLM AgentsAI助手在该向你提问的时候,却更愿意自己去核实事实
- Are LLMs becoming similarly creative? Evidence from three years of models三年数据显示,不同AI聊天机器人给出的答案正变得越来越相似
- Robust Incomplete Multimodal Sentiment Analysis via Iterative Proxy Correction文本信息缺失或损坏时,这个AI不靠一次性猜测,而是反复修正猜测结果,从而更准确地判断情绪
- A knowledge-guided agentic framework for mitigating patient-context ambiguity in health queries让AI在回答模糊的健康问题前先反问关键信息
- Specification-delta-driven data governance: an empirical study of the {\guillemotleft}spec-delta{\guillemotright} as the unit of change in lakehouse data platforms把数据平台的变更当作可审阅的'规格增量'来管理,而不是靠代码差异——一篇实验设计论文
- FlashPrefill V2: Block-Sparse Prefill Attention for Long-Context LLM Serving把稀疏注意力从论文原型变成能真正上线服务的加速方案
METAL LAB 最新报道
图片来源: Zeyu Ren et al., arXiv:2607.21596, arxiv-nonexclusive