Agent蒸馏怎么验收?从DeepSeek的Agent成绩到学生模型的任务级测试

本文聚焦Agent蒸馏效果的科学验收,强调不能依赖教师模型榜单成绩或学生训练损失下降作为交付依据,而应构建独立任务环境进行结果导向测试。提出四大核心原则:将‘完成’定义为可验证的状态(如操作记录、权限合规);设置学生蒸馏前后与教师三组对照;用多维验收表替代单一成功率指标;设计覆盖新场景、工具异常、权限变更等真实挑战的测试集。失败归因需驱动针对性迭代,确保蒸馏提升的是可靠任务交付能力而非表面指标。

教师模型在榜单上进步了,学生模型的训练损失也降了,这两件事加起来,仍然不能证明蒸馏后的 Agent 能交付任务。中间缺少的一步,是让学生进入独立的任务环境,检查它究竟改变了什么。

10月21日查阅Agent Arena官方榜单时,页面标注的数据日期为10月20日,DeepSeek-V4.1-Flash-20261017(Max)位列开放模型第一、总榜第12,该模型记录了17,929场会话。此前北京时间10月20日的Arena公告写的是总榜第11。动态榜单的名次会变,引用时需要保留快照日期;这些成绩提供了一个值得关注的教师候选,却不是学生模型的验收报告,也不能说明DeepSeek采用了哪一种训练方法。

如果蒸馏目标是“调用工具完成工作”,验收对象就必须从回答文本转向任务结果。下面以一个教学用的工单处理任务,说明怎样设计这一步;这里没有已运行的训练或评测成绩。

先把“完成”写成可检查的状态

假设任务是:找出指定项目中尚未处理的重复工单,给出合并建议,获得确认后再执行。输入包含项目范围、时间窗口和用户权限。合格结果不是一句“已合并”,而是正确识别重复关系、保留原记录、仅在确认范围内修改,并留下操作记录。

其中有些任务正确的终点就是没有执行。用户尚未确认时,模型应停在建议阶段;权限不足时,应请求有权限的人接手。把这两种情况都计为失败,会反过来鼓励学生越权执行。因此,测试集需要预先标注“应执行”“应澄清”“应停止”三类目标状态,并分别判断是否达标。

这与τ-bench的一个评测思路相通:它在有工具和领域规则的交互中,比较对话结束后的数据库状态与标注目标。论文采用的是特定模拟环境,不能照搬其历史分数预测今天的模型。还要注意,最终状态正确不代表全过程合规:未经确认先执行、随后恢复数据,也可能得到相同终点。因此应另外检查关键动作、确认记录和权限边界。

至少保留三个对照

第一组是本轮蒸馏前的学生模型,第二组是本轮蒸馏后的学生模型,第三组是教师模型。三组拿到相同任务、工具说明和权限,在统一的任务时限或成本上限下比较,并记录各自的推理配置。教师成绩用于理解可迁移空间,学生前后对照用于判断训练是否带来了变化。

不能给教师完整搜索工具,却让学生只读一段摘要,再把差距全部解释成模型能力;也不能让训练后的学生使用更好的工具封装,却将收益全部归功于蒸馏。提示词或工具确需变化时,应另设对照,把模型更新和系统更新分开观察。

测试环境每次必须重置。否则第一轮已经合并的工单,会让第二轮面对不同起点。涉及真实写入的任务应先在隔离环境运行,使用脱敏数据和受限凭据,不把生产权限当作评测资源。

一张验收表,比单个成功率有用

观察项检查对象容易误判的情况
任务达标最终状态、必要交付物文本说成功,实际没有写入
权限与规则是否超出允许范围事情办成,却改了不该改的数据
人工接管接管原因和发生步骤靠人工修正完成,却记作全自动
消耗与时间整个任务的调用、工具等待和重试只统计最后一次模型响应
重复稳定性同类任务多轮表现恰好一次成功,就认为可以部署

建议同时报告“无需人工接管且满足规则的任务比例”和“含人工协助的最终完成比例”。两者回答的是不同问题。拒绝越权任务可以是规则遵守的成功,但不应混入“自主执行完成”的数字制造错觉。

成本也要保留分母。本次查阅的榜单显示,任务成本中位数为0.19美元;它不能直接写成每个成功任务的成本。项目内部若要计算单位成功成本,可以用同一批次的总运行支出除以满足既定成功条件的任务数,并同时披露失败任务消耗;当成功任务数为零时,这个比值不适合当作正常均值展示。

训练费用、教师生成费用和人工审核费用应另列。运行便宜能否弥补这些前期投入,取决于预计调用规模。没有业务量和持续维护成本,就不能仅凭学生更小宣布“已经省钱”。

测试集要让学生遇到真正的新局面

把同一段轨迹换个工单编号后放进测试集,可能仍然泄露了解题模板。应尽量按业务实体、任务模板或时间段分组划分数据,保留未参与训练和调参的最终测试集。小数据条件下,更要说明覆盖范围,而不是把重复样本堆成看起来很大的测试规模。报告每类任务的样本数和失败数;条件允许时给出不确定区间,别让少数样本产生的几个百分点差异显得过于确定。

教学任务可以设计四种变化:重复关系不明确,需要追问;工具返回空结果,需要检查查询条件;工具暂时失败,需要有界重试;用户中途缩小授权范围,需要停止原计划。每种变化都有独立目标,而不是统一要求“尽量完成”。

本文讨论以教师文本和可见操作记录进行监督训练的路径,与使用教师概率分布的经典蒸馏需要区分。AgentTuning通过高质量交互轨迹和通用指令混合训练来提升Agent能力。这说明行动过程可以成为训练材料,但不能推出任何轨迹都有效。验收时既应看目标能力,也应保留少量通用任务,检查学生是否因专门训练而损伤原本需要的理解能力。

尤其要保留未见过的工具返回组合。学生在训练中只见过“查询成功—执行成功”,上线后遇到“查询成功—执行超时”,可能不知道是否已经写入。测试应检查它是否先核实状态,而不是盲目重复操作。对可能重复扣款或重复写入的动作,这比回复是否流畅更关键。

用失败归因决定下一轮训练

评测结束后,不要把所有失败都扔回数据生成器。格式解析错误可以检查训练目标和工具协议;证据缺失应先修数据或检索;权限设计错误应修系统边界;学生理解不了复杂约束时,才考虑补充相应教师示范或更换能力更合适的底座。

如果教师也在同类任务上失败,就不能把它的输出默认当正确标签。需要可验证的环境结果、人工复核或其他独立依据。让同一个教师生成答案、给答案打分,再宣布学生通过,容易把教师自己的偏差封闭在评测里。

可用的验收结论应写清:哪些任务得到改善、哪些仍需人工、在哪个权限和预算范围内成立。上线后还要保留可执行的回退路径,例如在证据冲突或写入状态不明时转交人工,而不是让模型为了完成率继续尝试。

蒸馏是否值得继续,最终取决于学生能否在这些独立条件下稳定交付。榜单让人知道可以去看谁,任务验收才告诉人学生到底学会了什么。

参考资料

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值