ReTrace:将工具调用 Agent 蒸馏为无需 LLM 规划的代码工作流
ReTrace: Distilling Tool-Using Agents into Planner-Free Workflows
做流程自动化的团队可以看看这篇。思路挺聪明:不每次跑都让 LLM 决策,而是从 Agent 日志里挖出分支条件,编译成纯代码工作流。速度从 170 秒掉到 1.3 秒,成本降 24%,准确率只掉两三个点。跑固定 SOP 的场景很划算。
arXiv 论文提出 ReTrace,把自然语言 SOP 和少量已记录的 Agent 运行日志编译成可复用工作流,由代码而非 LLM 来选择下一步骤。核心方法是提取 Agent 每次工具调用附带的推理说明中的条件,跨多次运行合并成紧凑规则文档,再从规则文档生成可执行工作流;只有最后一步依赖平台,因此同一份规则文档可编译到不同编排平台。
在作者生产平台的 79 个流程上,ReTrace 工作流达到 93.8% 完成率,Agent 为 96.8%,但每任务成本低 24%。在 τ²-Bench 上任务成功率为 75.8%(Agent 为 80.6%),运行时间从 170 秒降到 1.3 秒;对训练失败样本做三轮修复后,k=2 工作流从 66.7% 提升到 81.2%。在 SOP-Bench 的 8 个流程上,修复后 ReTrace 达到 87.8%,每任务仅 0.40 秒,Agent 为 85.5%、46.6 秒。
对需要反复执行相同 SOP 的企业自动化场景,这条蒸馏路线用小幅准确率换取数量级的延迟和成本下降,且规则文档与平台解耦,便于跨编排框架迁移。
ReTrace: Distilling Tool-Using Agents into Planner-Free Workflows
Business process automation runs the same Standard Operating Procedure (SOP) again and again on new inputs. Large Language Model (LLM) agents can follow an SOP written in natural language, but they call an LLM to choose every step of every run, which adds latency and cost at scale. We present ReTrace, which turns an SOP and a few logged agent runs into a reusable workflow in which code, not an LLM, selects the next step. The agent's reasoning, the explanation it writes with each tool call, often states why it took an action; the tool calls alone do not. ReTrace extracts the condition behind each step, merges these conditions across runs into a compact rule document, and generates an executable workflow from it. Only this last stage depends on the platform, so rule documents can be compiled for different orchestration platforms. On $79$ procedures from our production platform, ReTrace workflows reach $93.8\%$ completion, against $96.8\%$ for the agent, at $24\%$ lower cost per task. On $τ^2$-Bench, they reach $75.8\%$ task success (agent: $80.6\%$) and run in $1.3$s instead of $170$s; three rounds of repair on training failures lift $k{=}2$ workflows from $66.7\%$ to $81.2\%$. On eight SOP-Bench procedures, ReTrace without repair trails few-shot generation ($80.6\%$ vs. $83.6\%$), but repair from labeled training failures lifts it to $87.8\%$ at $0.40$s per task, compared to $85.5\%$ in $46.6$s for the agent.
本条情报归属 AITOP「论文」核心栏目,重点聚焦北美前沿实验室与硅谷科技巨头。在跨区域产业观察坐标中,该动态直接关联「AI 开发者工具链、Coding Agent 与工程化实践」研究主线,反映出当前技术演进与商业落地的最新风向。涉及核心实体与技术议题包括:ReTrace、智能体、τ²-Bench、SOP-Bench,读者可通过下方标签进入对应专题页查阅历史脉络与关联对比。
信源核验说明:本文原始线索采编自「arXiv cs.AI」(@Kaiyuan Hou, Yang Ping Kuo, Indranil Bhattacharya, Rohith Nama, Arushi Gupta, Carlos D. Castillo, Prathap Ramachandra, Xiaofan Jiang, Francesco Carbone),经 AITOP 多维评分管线结构化提炼。