arXiv:2604.23853cs.AI2026-04中稿 · Agent Skills '26 W…被引 3

为大模型技能蒸馏引入成本感知追踪,精准识别哪些步骤该保留、修剪或修复。

ClawTrace: Cost-Aware Tracing for LLM Agent Skill Distillation

论文配图:ClawTrace: Cost-Aware Tracing for LLM Agent Skill Distillation
图 1 · 摘自论文原文
  • 通过成本归因追踪记录每一步消耗,区分高成本无效操作与关键修复步骤。
  • 在84个任务中,修剪类补丁使质量提升,而保留类补丁导致3倍质量退化。
  • 适用于需要精细化优化大模型推理路径的研究者与工程团队。

技能蒸馏流程从大模型代理轨迹中学习可复用规则,但缺乏每步成本信号。无此信号时,无法区分修复错误的必要步骤与不影响结果的高成本冗余步骤。ClawTrace记录带成本标注的代理轨迹,并将每个会话整理为TraceCard;CostCraft读取TraceCard,生成三类技能补丁:保留、修剪、修复。在跨两个种子的30个预留的SpreadsheetBench任务上,移除修剪补丁使质量退化次数约增至三倍,且中位数成本未下降。在全部84个SkillsBench迁移任务中,整体成本未节省。所有质量退化均源自保留类补丁,而所有质量提升均来自修剪类补丁:修剪补丁充当质量护栏,保留补丁则引发退化。我们主张应以规则类型为单位评估可复用代理技能,而非作为整体指令包。为此,我们发布了ClawTrace、TraceCard Schema及全部类型化技能集。

原文摘要 · Abstract (English)

Skill-distillation pipelines learn reusable rules from LLM agent trajectories, but they lack a key signal: how much each step costs. Without per-step cost, a pipeline cannot distinguish adding a missing step to fix a bug from removing an expensive step that never affected the outcome. We use the cost-attribution gap to ask whether the rule types inside a distilled skill transfer the same way to new tasks. ClawTrace records cost-attributed agent traces and compiles each session into a TraceCard; CostCraft reads TraceCards and writes three kinds of skill patches: preserve, prune, and repair. We find a pattern aggregate metrics hide. On 30 held-out SpreadsheetBench tasks across two seeds, removing prune patches roughly tripled the quality-regression count without lowering median cost. Across the full 84-task SkillsBench transfer, CostCraft saves no aggregate cost. All three quality regressions trace to the preserve lane, and both quality wins trace to the prune lane: prune patches act as quality guardrails while preserve patches drive regressions. We argue that reusable agent skills should be evaluated at the rule-type level, not as monolithic instruction packages. To support this, we release ClawTrace, the TraceCard schema, and the full set of typed skills.

大模型技能蒸馏成本优化轨迹分析

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