METAL LAB

Training Agents to Evolve with Their Harness: TaoLive Digital Avatar Agent Technical Report

arXiv:2608.157632026-08-21

让直播间AI虚拟主播即使运营规则天天变,也能保持快速又不出错

直播电商的AI虚拟主播需要实时回答商品问题,同时跟上运营团队频繁调整的营销策略,这对速度和准确性都提出了矛盾要求。本文把可独立更新的Harness(技能、工具、提示词、钩子)与模型权重分离,并提出Harness-Aware Training(HAT)训练方法,让一个小而快的模型在Harness不断变化时依然稳健。该系统已部署在淘宝直播的数字人业务中,在满足严格延迟要求的同时线上A/B测试也取得了正向效果。

METAL LAB 解读图

将Harness与模型权重分离、分别演进的结构

证据状态已报告实测结果

  1. Harness Evolution在模型权重不变的前提下编辑技能、提示词、工具和钩子,几小时内即可调整业务行为
  2. HSA环境增强在训练数据中主动改写技能名称/内容、工具定义、提示词结构和钩子行为
  3. HAT三阶段训练先在多样化环境下做HSA-SFT监督微调,再用General OPD恢复通用能力,最后在模拟直播环境中做HSA-RL强化学习
  4. 生产运行环境训练好的小模型与持续演进的Harness在真实直播请求处理中相遇并协同工作
这是 METAL LAB 制作的解读图,并非论文作者提供的原图。

他们做了什么

  1. 大模型能零样本理解被改写的运行环境,但响应太慢;小模型速度够快,却容易只记住训练时固定的技能名、工具名和提示词模板,一旦环境改变就失效,这是本文要解决的矛盾。
  2. Harness是指技能、工具注册表、系统提示词流水线和钩子(校验/重试逻辑)组成的可独立更新配置,与模型权重分离,运营团队可以在几小时内通过编辑Harness来调整业务行为,这个过程称为Harness Evolution。
  3. Harness-State Augmentation(HSA)在训练数据中主动改写技能标识与内容、工具定义、提示词结构和钩子行为,目的是让模型学会理解当前实际给出的配置,而不是死记某一套固定名称或模板。
  4. 完整训练流程分三阶段:先用HSA构造多样化环境下的示范轨迹做监督微调(HSA-SFT),再用通用领域的在线策略蒸馏(General OPD)恢复领域微调中损失的通用能力,最后在贴近生产环境的模拟器中用强化学习(HSA-RL)让模型在变化的环境里学会应对。
  5. 在真实直播问答测试集上HAT得到94.8分(基础模型80.3分,测试中最强的通用大模型93.0分),在Harness变体问答测试集上得到94.6分(基础模型75.4分),在单张H20 GPU上实现P50延迟3.4秒、P95延迟8.1秒。
Figure 1: Application flow and the two independent update paths. Harness Evolution edits agent runtime modules while keeping model weights fixed; Harness-Aware Training (HAT) provides a well-performing, low-latency, and robust model. Both paths meet inside the same production runtime.
Figure 1: Application flow and the two independent update paths. Harness Evolution edits agent runtime modules while keeping model weights fixed; Harness-Aware Training (HAT) provides a well-performing, low-latency, and robust model. Both paths meet inside the same production runtime.
Table 1: Approximate intent mix in the available internal traffic summary.
ScenarioProportion
Product Q&A∼46%
Casual chat and engagement∼19%
Clarification follow-up∼16%
After-sales handling∼7%
Discount and promotion inquiry∼4%
Presentation-order adjustment∼2%
FAQ-based reply∼2%
Silent refusal of irrelevant content<1%
Figure 2: Harness Evolution with a fixed DeepSeek-V4-flash on dev-set (n=482). The process is non-monotonic: Evolution 2 is the selected development checkpoint, while later long-tail edits introduce regressions.
Figure 2: Harness Evolution with a fixed DeepSeek-V4-flash on dev-set (n=482). The process is non-monotonic: Evolution 2 is the selected development checkpoint, while later long-tail edits introduce regressions.
Table 2: Evaluation sets and sources. The sets cover real live-stream reply quality, in-family Harness variation, synthetic tool and prompt robustness, general instruction following, and actual deployment latency.
SetSizeSourceEvidentiary role
𝒯1978Real live-roomPrimary industrial quality (live-stream reply).
𝒯2978Real live-room, aug. HarnessIn-family robustness to new Harness contexts.
𝒯32023Synthetic avatar scenariosIn-domain transfer under broader tools/prompts.
𝒯4541Public IFEvalGeneral instruction following (official evaluator).
𝒞judge482Real live-room, human-labeledJudge calibration, not a policy test set. Also dev-set for harness evolving.
𝒟perf110Deployment replayEnd-to-end deployment latency.
Figure 3: Simplified Harness Agent runtime control flow. Prompt rules and dynamically loaded Skills assemble the model context; lifecycle Hooks validate inference, tool use, and stopping. A failed stop gate starts another round, while a passed gate produces the final response and structured trajectory. Per-call fallback and trajectory-level recovery protect different failure scopes.
Figure 3: Simplified Harness Agent runtime control flow. Prompt rules and dynamically loaded Skills assemble the model context; lifecycle Hooks validate inference, tool use, and stopping. A failed stop gate starts another round, while a passed gate produces the final response and structured trajectory. Per-call fallback and trajectory-level recovery protect different failure scopes.
Table 4: Training-pipeline ablation. Each row adds one stage to the previous checkpoint; ↑/↓ denotes a descriptive score change from the row above and does not include retraining variance.
Configuration𝒯1𝒯2ToolPromptIFE-PIFE-I
Non-augmented pathway (single-run trajectory)
Base80.375.469.572.881.587.7
+SFT89.5↑9.288.2↑12.882.0↑12.568.2↓4.673.8↓7.782.4↓5.3
+General OPD89.589.1↑0.984.3↑2.372.6↑4.482.3↑8.587.9↑5.5
+RL95.1↑5.694.4↑5.383.7↓0.666.7↓5.982.7↑0.487.8↓0.1
Augmented pathway (single-run trajectory)
+Aug-SFT90.0↑9.790.2↑14.885.2↑15.777.3↑4.581.7↑0.287.4↓0.3
+General OPD90.9↑0.990.9↑0.785.6↑0.477.1↓0.281.9↑0.288.0↑0.6
+RL94.1↑3.293.7↑2.884.3↓1.378.7↑1.683.0↑1.188.2↑0.2
+AUG Env (Ours)94.8↑0.794.6↑0.984.0↓0.377.6↓1.183.5↑0.588.7↑0.5
Figure 4: Overview of HAT. (a) HSA constructs diversified Harness states; HSA-SFT followed by General OPD produces the shared initialization. (b) Controlled comparison of Agentic RL and Agentic OPD under the original Harness and HSA environments. Every variant starts from the HSA-SFT + General OPD result, and each OPD variant receives its paired same-environment RL teacher. The selected Agentic RL policy under HSA is HSA-RL.
Figure 4: Overview of HAT. (a) HSA constructs diversified Harness states; HSA-SFT followed by General OPD produces the shared initialization. (b) Controlled comparison of Agentic RL and Agentic OPD under the original Harness and HSA environments. Every variant starts from the HSA-SFT + General OPD result, and each OPD variant receives its paired same-environment RL teacher. The selected Agentic RL policy under HSA is HSA-RL.
Table 5: Single-run comparison of Agentic optimization variants. All configurations share the same Aug-SFT + General OPD initialization; ⋆ marks the deployment choice rather than statistical superiority.
MethodEnvironment𝒯1IFE-PPR-AVG
Agentic RLOriginal94.183.078.7
Agentic RLAugmented94.8⋆83.5⋆77.6
Agentic OPDOriginal94.082.873.9
Agentic OPDAugmented93.981.775.5
Paired contrasts
Δ(RL−OPD)Original+0.1+0.2+4.8
Δ(RL−OPD)Augmented+0.9+1.8+2.1
Δ(Aug−Orig)RL+0.7+0.5−1.1
Δ(Aug−Orig)OPD−0.1−1.1+1.6
Figure 5: Checkpoint trajectories across four training configurations formed by crossing HSA at the SFT and RL stages, evaluated on Accuracy, Effectiveness, Skill Selection, and Tool Rationality. In these trajectories, HSA-SFT is associated with higher reply-quality rewards, while HSA-RL is associated with stronger agentic-behavior rewards, especially Skill Selection and Tool Rationality; combining HSA-SFT and HSA-RL gives the most balanced late-stage reward profile.
Figure 5: Checkpoint trajectories across four training configurations formed by crossing HSA at the SFT and RL stages, evaluated on Accuracy, Effectiveness, Skill Selection, and Tool Rationality. In these trajectories, HSA-SFT is associated with higher reply-quality rewards, while HSA-RL is associated with stronger agentic-behavior rewards, especially Skill Selection and Tool Rationality; combining HSA-SFT and HSA-RL gives the most balanced late-stage reward profile.
Table 6: Single-run isolation of data augmentation at SFT and RL stages. The reported differences are descriptive and do not include retraining variance.
SFT StageRL Stage𝒯1 AVGIFE-PΔIFE
StandardStandard RL95.171.3
StandardAugmented RL94.972.3+1.0
AugmentedStandard RL95.480.7+9.4
AugmentedAugmented RL93.381.3+10.0
Augmented SFT: +9.4 IFE-P; augmented RL: +1.0.
Figure 6: Single-run CoT-length diagnostics for the selected HSA-RL trajectory. Faint lines show recorded step values and bold lines show 25-step trailing means. Panel (a) separates tool-call and final-reply CoT lengths and marks the no-penalty (L≤100), linear (100<L<200), and saturated (L≥200) regions. Panel (b) shows the logged score q⁡(L)∈[0,1] and the equivalent raw reward contribution −0.1​q​(L). The figure is a training diagnostic, not a causal ablation of latency or quality.
Figure 6: Single-run CoT-length diagnostics for the selected HSA-RL trajectory. Faint lines show recorded step values and bold lines show 25-step trailing means. Panel (a) separates tool-call and final-reply CoT lengths and marks the no-penalty (L≤100), linear (100<L<200), and saturated (L≥200) regions. Panel (b) shows the logged score q⁡(L)∈[0,1] and the equivalent raw reward contribution −0.1​q​(L). The figure is a training diagnostic, not a causal ablation of latency or quality.
Table 7: Controlled low-concurrency deployment replay. Latencies are seconds; Decode is the arithmetic mean of client-observed completion tokens/s over model calls. It is length-sensitive and is not an intrinsic cross-checkpoint kernel-speed measure. TTFT is the first call’s client-observed P95 and includes network and queueing. Each row contains 100 measured Agent requests after 10 warm-up cases. API rows are operational references, not same-hardware model comparisons.
ConfigurationMTPCWall P50Wall P95TTFT P95Decode≤15sSuccess
Vendor API routes
DeepSeek-V4-flash111.21021.1912.067103.4471%99%
DeepSeek-V4-flash211.97626.2781.29197.0171%98%
DeepSeek-V4-pro114.31228.8821.31253.5361%99%
DeepSeek-V4-pro213.75223.3931.24855.0460%99%
Qwen3.6-35B-A3B · one H20
BaseOff14.10110.1720.508195.42100%100%
BaseOff24.56011.5040.623138.8197%100%
BaseOn13.6489.8050.502215.9599%100%
BaseOn24.80610.2510.698165.7497%100%
Task-trained checkpoint (Ours) · one H20
OursOff14.1768.980.499160.30100%100%
OursOff24.93610.0740.692129.22100%100%
OursOn13.4078.1140.553271.40100%100%
OursOn24.4799.0470.754196.15100%100%
Figure 7: Judge alignment to a human-labeled calibration cohort (n=482). Accuracy and Effectiveness agreement improve through evidence-tool, rubric, and voting revisions; the cohort evaluates the scoring instrument rather than the policy.
Figure 7: Judge alignment to a human-labeled calibration cohort (n=482). Accuracy and Effectiveness agreement improve through evidence-tool, rubric, and voting revisions; the cohort evaluates the scoring instrument rather than the policy.
Table 8: Harness-Aware Benchmark held-out test results before and after Harness edits. Counts are total detected errors; error reduction is computed relative to the before-edit count.
ModelBeforeAfterError reduction
Naive SFT14912218.1%
Ours23811551.7%
Figure 8: Single-run standalone MTP-loss trajectories for a task-trained policy with a transplanted and subsequently post-trained NextN head, and for the base model with its native factory-trained head. Faint lines show step-level loss; bold lines show a 25-step trailing mean. The runs have different lengths and provide adaptation diagnostics only: they do not compare convergence speed, training stability, sample efficiency, or compute efficiency.
Figure 8: Single-run standalone MTP-loss trajectories for a task-trained policy with a transplanted and subsequently post-trained NextN head, and for the base model with its native factory-trained head. Faint lines show step-level loss; bold lines show a 25-step trailing mean. The runs have different lengths and provide adaptation diagnostics only: they do not compare convergence speed, training stability, sample efficiency, or compute efficiency.
Table 9: Human blind-test preference distribution on 100 paired real live-streaming requests.
PreferenceCountShare
Harness better3535.0%
Tie6464.0%
ReAct better11.0%
Table 10: Attribution of the 35 Harness-preferred examples. Categories are assigned from annotator rationales after the blind decision.
Attribution categoryCountShare
More accurate input understanding1234.3%
More reliable output822.9%
More appropriate scenario behavior822.9%
Higher response quality514.3%
More appropriate tool use25.7%
Table 11: Preliminary seven-day online A/B point estimates in Taobao Live’s production digital-avatar business. Metrics are relative changes of the Harness system against the ReAct control.
MetricHarness vs. ReAct
Cumulative confirmed-receipt GMV per bucketed user+5.54%
Completed orders per bucketed user+0.80%
Table 12: Working inventory of built-in and MCP-discovered runtime interfaces.
ResponsibilityInterfacesRole
Product retrievalsearch_product_by_keyword, get_current_product_info, get_product_info_by_link_id, get_product_extra_info_by_link_id_and_keywords, search_preset_faqFind the active or referenced product and retrieve catalog, detail-page, knowledge-base, or FAQ evidence.
Pricing and promotionget_price_info_by_link_id, get_promotion_infoRetrieve SKU-level prices, entitlements, coupons, and room-level promotions.
Action and flow controlchange_explain_order, load_skill, get_current_time, refuse_to_replyChange presentation order, load behavioral instructions, resolve time-sensitive rules, or silently discard meaningless input.
MCP lookupquery_promotion, query_buyer_resource, query_fund_asset, query_coupon_detailRetrieve campaign conditions and buyer-side resources from the external marketing service.
MCP calculationcalculate_optimal_promotion, calculate_promotionCompute eligible promotional combinations and resulting prices.
Table 13: Working Skill inventory and routing responsibilities.
Reply SkillResponse responsibilityStrategy SkillTool-chain responsibility
item_qaProduct attributes, specifications, comparison, price, and recommendation.tool_strategy_benefitEntitlement, price, and promotion retrieval.
chillchatNon-product conversation and engagement.tool_strategy_compareMulti-product comparison and retrieval.
aftersaleReturns, exchanges, complaints, and other after-sales requests.tool_strategy_multiAggregation and orchestration for multiple comments.
clarificationFollow-up questions when available context is insufficient.tool_strategy_switchPresentation-order adjustment.
faq_replyResponses grounded in configured FAQ entries.general_discountRoom-level promotion retrieval and response composition.
refusalDeclines for inappropriate or unsupported requests.
change_orderConfirmation of presentation-order changes.
thanksResponses to gratitude and positive feedback.
greetWelcome messages for viewers entering the room.
Table 14: Fixed-policy Harness Evolution record. Values come from six direct evaluation summaries on the same 482-item dev-set. “Selected” is an engineering early-stop decision.
StageHarness changesAcc.Eff.Engineering diagnosis
ReActConventional reasoning–action loop without the modular Harness.80.3384.58System baseline.
Harness baseInitial manually maintained Skills and modular runtime.82.4087.16Establishes the editable Harness.
Evolution 1Add refusal tool and stop-loop Hook; rewrite refusal, chat, and after-sales Skills; add four global constraints.92.1384.16Accuracy rises sharply; internal diagnosis attributes Effectiveness loss to over-triggered refusal.
Evolution 2Add seven whitelist exclusions before refusal; map explanation triggers and require the relevant tool call.92.5592.75Selected; restores Effectiveness while retaining Accuracy.
Evolution 3Add attribution, factuality, parameter-completeness, tool-use, and system-message rules; expand refusal exclusions.91.5190.89Long-tail rules interact and regress both metrics.
Evolution 4Relax length, tool-trigger, parameter, transaction-intent, and attribution restrictions.91.5189.96Partial rollback does not recover Effectiveness.
Table 15: Independent paired-bootstrap stability check. Differences are reported in percentage points; intervals are 95% percentile bootstrap intervals over evaluation items.
Contrast / dimensionΔ [95% CI]Pboot​(Δ≤0)
IFEval prompt-level accuracy
Naive SFT − Base−6.47​[−10.72,−2.22]0.9992
Ours − Base+2.03​[−1.11,+5.18]0.1134
Ours − Naive SFT+8.50​[+4.44,+12.38]0.0000
Prompt Robustness
Ours − Naive SFT+8.46​[+5.27,+11.66]<0.0001
Naive SFT − Base−3.22​[−6.59,+0.21]0.9661
𝒯1 Live-Stream QA: Ours − Base
Accuracy+6.95​[+4.60,+9.41]<0.0001
Effectiveness+30.88​[+27.76,+33.90]<0.0001
AVG+18.92​[+17.00,+20.81]<0.0001
Table 16: Same-checkpoint 𝒯1 quality check with MTP Off and On (n=978). Both rows use the same Final Evaluation Judge. AVG is the arithmetic mean of Accuracy and Effectiveness.
Serving modeAccuracyEffectivenessAVG
MTP Off95.893.894.8
MTP On96.2294.2295.22
Table 17: MTP trade-off across concurrency. Arrows show Off → On. Decode TPS is client-observed mean per call; Wall and TTFT are P95 seconds. C=1, 2, and 8 are single runs. C=4 values are means of three run-level statistics, not pooled percentiles.
CheckpointCDecode TPSSpeedupWall P95 (s)TTFT P95 (s)≤15s
Qwen3.6 Base1195.42→215.951.11×10.172→9.8050.508→0.502100→99%
2138.81→165.741.19×11.504→10.2510.623→0.69897→97%
4105.04→113.251.08×13.408→16.2660.643→1.08897.3→92.3%
870.28→70.191.00×17.848→26.1360.953→1.51990→79%
Ours1160.30→271.401.69×8.98→8.1140.499→0.553100→100%
2129.22→196.151.52×10.074→9.0470.692→0.754100→100%
499.65→126.641.27×10.869→12.4600.692→1.34999.3→98.0%
859.01→70.221.19×18.342→20.2980.900→2.57491→75%
Table 18: C=1 workload shape. Values are means over successful complete-Agent requests or their constituent model calls.
Route / checkpointMTPCalls/reqInput/callOutput/call
DeepSeek-V4-flash API4.046,052146
DeepSeek-V4-pro API3.675,537119
Qwen3.6 BaseOff3.235,622115
Qwen3.6 BaseOn3.085,571109
OursOff3.045,679106
OursOn3.125,786105
Table 19: MTP serving configuration used for the reported quality check and deployment measurements.
SettingEngine argumentValue
Speculative algorithm--speculative-algoNEXTN
Speculative steps--speculative-num-steps3
EAGLE top-k--speculative-eagle-topk1
Draft tokens--speculative-num-draft-tokens4
Single-token acceptance threshold--speculative-accept-threshold-single0.5
Accumulated acceptance threshold--speculative-accept-threshold-acc0.7
Table 20: SGLang log-sample diagnostics for MTP-On serving. Triples are mean/P50/P95; Queue is P95/max.
CheckpointRunning reqQueueAccept lenAccept rate
Qwen3.6 Base2.03/1/80/02.94/2.92/3.58.735/.730/.890
Ours2.03/1/70/03.12/3.12/3.62.780/.780/.910

研究结果

  • 在真实直播问答测试集上,HAT模型平均得分94.8,高于未经调优的基础模型80.3分和测试中最强通用大模型的93.0分。
  • 在测试Harness变化鲁棒性的Harness-Variant QA上,HAT得分94.6,高于基础模型的75.4分。
  • 只用固定Harness做监督微调(Fixed-Harness SFT)会让通用指令遵循能力指标IFEval比基础模型下降7.7分,而HAT避免了这种退化,在IFEval上达到83.5分。
  • 在单张NVIDIA H20 GPU上开启优化后,系统实现P50延迟3.407秒、P95延迟8.114秒。
  • 在淘宝直播生产环境的数字人业务中部署后,为期七天的初步线上A/B测试显示GMV和商品详情页浏览量出现正向变化。

可应用场景

  • 运营规则、营销策略或合规要求经常调整、又来不及重新训练模型的直播电商或客服类智能体场景
  • 会动态加载技能或调用多种工具的智能体系统,需要在工具改名或提示词结构调整后仍保持稳定表现
  • 对延迟要求严格的实时应答服务,希望通过训练阶段引入环境多样性来提升小模型鲁棒性,而不依赖推理时自适应

局限与待验证事项

  • 论文报告的数值特定于淘宝直播的商品和直播场景、Qwen3.6-35B-A3B规模的模型以及单张H20 GPU的部署环境,尚未验证在其他领域或模型规模下是否同样适用。
  • 延迟结果是在低并发(C=1~2)条件下测得的,在更高并发(C=4~8)下MTP带来的加速效果下降且P95不再改善,因此更大规模生产流量下的表现尚未完全验证。
  • MTP草稿头移植实验被作者明确说明为单次运行的工程性诊断观察,不能作为多随机种子下收敛速度或训练稳定性的结论依据。
  • 线上A/B测试结果为七天的初步点估计,长期或更大规模下的生产稳定性仍需进一步确认。

为什么重要

对于既要求毫秒级响应又要求策略频繁变更的场景,通常只能在大模型的适应力和小模型的速度之间二选一,这项工作展示了通过把运行环境本身纳入训练分布来兼顾两者的一种具体做法,并且给出了真实生产环境的部署效果而非纸面数据。

本文术语

  • Harness · 与模型权重分离、可独立更新的运行配置,包含技能、工具、提示词和钩子
  • HSA(Harness-State Augmentation) · 在训练数据中主动改写技能名称/内容、工具定义、提示词结构和钩子行为的数据增强方法
  • HAT(Harness-Aware Training) · 由HSA-SFT、General OPD、HSA-RL三阶段组成的训练流程,目的是让小模型对变化的Harness保持稳健
  • GRPO/GDPO · 通过对一组采样出的响应轨迹进行分组比较来计算强化学习优势值的优化方法
  • MTP草稿头 · 一次预测多个未来token以加速推理的辅助模块

论文原文摘要(英文)

AI-powered digital avatar streamers must answer product questions, engage viewers, and execute marketing strategies in real time, demanding low latency, frequent strategy updates, and accurate yet effective responses. Evolvable Harnesses, whose Skills, Hooks, prompts, and tools can be updated independently of model weights, enable rapid iteration but expose a trade-off: large models adapt zero-shot yet are too slow, whereas compact models meet latency targets but overfit to fixed Harness configurations. We propose Harness-Aware Training (HAT), which trains compact models to adapt to changing Harnesses. Its key component, Harness-State Augmentation (HSA), applies task-preserving transformations to Skill identifiers and content, tool schemas, prompt structures, and Hook functions. Training proceeds in three stages: HSA-SFT learns reasoning and tool use from strong-model trajectories across diverse environments; General On-Policy Distillation restores generalization lost during SFT; and HSA-RL improves robustness to changing Harnesses through reinforcement learning in augmented environments. Across four evaluation sets, HAT achieves 94.8 on Live-Stream QA (base: 80.3; strongest general LLM: 93.0) and 94.6 on Harness-Variant QA (base: 75.4). Unlike Fixed-Harness SFT, which lowers IFEval by 7.7 points from the base model, HAT avoids this regression and reaches 83.5. On one NVIDIA H20 GPU, the optimized system delivers P50 and P95 latencies of 3.4 s and 8.1 s. Deployed in Taobao Live's digital-avatar service, it also yields positive online A/B test results for GMV and item-page views.

作者 · TaoLive AIGC LLM Team

在 arXiv 阅读

最新论文

全部论文 →

METAL LAB 最新报道

图片来源: TaoLive AIGC LLM Team et al., arXiv:2608.15763, CC BY 4.0