这是我们第一篇博客文章《Agent 说它完成了,但数据库不这么认为》的后续。ThinkingBox-Training 现已在 GitHub 上提供。
我们构建 ThinkingBox 是为了通过比较最终数据库状态与预期结果来评估 Agent 的工作成果。随后,我们将同类的可执行信号作为奖励,应用于 ThinkingBox-Bench 之外的训练任务中。对于 Qwen3.8-27B,平均成功率从 51.70% 提升至 60.78%,而在 50 次 GRPO 步骤后,在全部二十次尝试中均正确完成的任务数从 38 个增加到 107 个。
图 1. ThinkingBox 将终端数据库状态的可执行检查转化为针对 ThinkingBox-Bench 之外任务的后训练 Agent 的奖励。
这是微软与 Hugging Face 联合发布的博客,特别感谢来自微软的 Mirco Milletari 和 Xiang Jiang、来自 Hugging Face 的 Sergio Paniego,以及我们前实习生(匹兹堡大学)李卓春在共同撰写/审阅方面所做的贡献。
我们构建 ThinkingBox 是为了捕捉那些声称已完成工作但实际上并未完成的 Agent。
ThinkingBox-Bench(我们的基准数据集)中的每个任务都会向 Agent 提供一个真实的后端和一组工具,让其进行操作,然后检查数据库中实际发生了哪些变化。在第一篇文章中,我们发现一个模型在承运商异常仍处于开启状态时,就将客户工单标记为已解决。九个看似专业的工具调用,导致了一行错误的数据库记录。
随后我们注意到了自己构建的东西的价值。对于大多数任务而言,可执行检查可以直接从最终数据库状态返回 1 或 0。这不仅仅是一个评分器,它还可以作为一个奖励函数。
因此,我们从基准测试之外的 ThinkingBox 格式任务中构建了一个训练池,并将它们的可执行结果用作奖励。其中的难点在于选择哪些任务适合 Agent 训练:大多数任务对于当前的模型来说要么已经解决,要么毫无希望,而这两种情况都无法教会模型任何东西。
难度是相对于策略而言的:一个任务对于当前模型来说之所以困难,仅仅是因为该模型尚未学会如何解决它。
我们将此称为离线策略相对难度(offline policy-relative difficulty)。我们在训练前使用基础策略对每个任务的成功概率进行了一次估算,并在整个运行过程中保持所选训练池固定不变。
训练后发生了什么
我们利用离线策略相对难度构建训练池,然后对 Qwen3.8-27B 进行了 50 步的 GRPO 微调。回顾一下,我们对基准测试中的 507 个任务各评估了 20 次。pass@1 衡量的是所有 10,140 次尝试的平均成功率;pass@20 衡量的是至少成功解决一次的任务比例;Observed 20/20 衡量的是在每次记录中均通过的任务比例。
表 1. Qwen3.8-27B 在离线选定训练池上经过 50 步 GRPO 前后的结果。
指标
基础模型
RL 微调后
变化
Observed 20/20
38 (7.50%)
→
107 (21.10%)
+69 个任务
pass@1(成功尝试次数)
5,242 (51.70%)
→
6,163 (60.78%)
+9.08 个百分点
pass@20(至少解决一次的任务数)
453 (89.35%)
→
446 (87.97%)
−7 个任务
训练显著提高了可重复的成功率,尽管“至少成功一次”的覆盖率略有下降。博客的其余部分将解释我们如何选择练习任务、构建奖励循环以及衡量这种权衡。
在一个具体任务上,这种提升表现如何?一位旅客请求降低房间等级,但公司政策要求先获得经理批准。在训练前,Agent 在 20 次尝试中的 15 次里未经批准就更改了预订并发出了退款。经过 RL 微调后,它在全部 20 次尝试中都保持了预订和支付状态不变。
图 2. 一个企业酒店预订任务,每个模型进行 20 次尝试。基础 Qwen3.8-27B 模型在 15 次尝试中未经所需的经理批准就更改了预订。RL 微调后的模型在所有 20 次尝试中都保持了预订和支付状态不变;其中 19 次的预期记录完全匹配。
目录
基准测试在六十秒内发现了什么
结果:可靠性列发生了变化
收益落在何处
可靠性的代价
训练循环
离线策略相对难度
什么能赢得奖励
运行训练栈
下一步去向
赶时间?标题中的结果在上面。实现细节见“运行训练栈”部分。
基准测试在六十秒内发现了什么
ThinkingBox-Bench 根据智能体留下的数据库记录对其进行评分。其 507 项任务中的每一项都会启动一个真实的后端,将一组 MCP 工具和一个具有私有上下文的模拟 LLM 用户交给智能体,最后在终端数据库状态上运行可执行检查。这些检查针对的是需要正确的后端记录,而非特定的工具调用。这激励模型去发现可能全新的解决路径,而不是“重新发现”那些虽然正确但次优的人类辅助解决方案。
在我们第一篇文章中,我们让十八个模型各运行该基准测试二十次,并报道了标题准确率所掩盖的差距。Kimi-K3 至少在一次尝试中解决了 93.89% 的任务,但在所有二十次记录尝试中仅完成了 507 项任务中的 68 项(13.41%)。Claude Opus 5 则反其道而行之:覆盖范围更窄,但一致性更高。
更大或更好的模型并未缩小这一差距。Claude Opus 5.5 在 pass@1 上比 Claude Opus 5 高出 0.66 个百分点,但在所有二十次尝试中恰好通过了相同数量的任务,即 241 项。标题准确率的提升并未带来任何额外的可靠性。
如果您正在为涉及生产数据库记录的工作选择模型,不应单独看待 pass@1。观察到的 20/20 成功率显示了哪些任务在每次尝试中都成功,这更接近于生产环境对可靠性的要求。
可执行的终端状态判决同时也是训练奖励。在展开训练循环之前,以下是封闭基准测试中发生的变化。
结果:可靠性列发生了移动
在训练 Qwen3.8-27B 后,我们在其从未训练过的 507 项任务基准上评估了选定的第 50 步检查点。这 507 项任务代表了一个分布外测试集:它们的领域、数据库以及大多数 MCP 工具在强化学习训练期间均未遇到过。
表 2. ThinkingBox-Bench 按领域划分的 pass@1 (%),来自我们第一篇博客文章表 2 的选定模型以及我们微调后的模型在不同领域和整体的表现。观察到的 20/20 数字涵盖整个基准测试中的 507 项任务。每个模型在全部 507 项任务上进行了 20 次重复试验评估。粗体标记列领先者;下划线标记第二名。
| 模型 | 零售 | 汽车保险 | 旅游 | 新银行 | 咨询 | 整体 | 观察到的 20/20 |
|---|---|---|---|---|---|---|---|
| Claude Opus 5.5 | 80.97 | 68.40 | 54.28 | 71.25 | 61.58 | 67.16 | 241 (47.53%) |
| Claude Opus 5 | 80.71 | 65.80 | 49.95 | 70.62 | 66.19 | 66.50 | 241 (47.53%) |
| GPT-5.4 | 76.33 | 62.65 | 68.12 | 65.34 | 54.60 | 65.36 | 128 (25.25%) |
| GPT-5.6 Sol | 67.65 | 65.30 | 60.34 | 59.09 | 57.52 | 61.91 | 82 (16.17%) |
| Qwen3.8-27B RLFT | 67.91 | 56.45 | 62.69 | 62.40 | 54.51 | 60.78 | 107 (21.10%) |
| Claude Sonnet 4.6 | 72.35 | 54.40 | 58.94 | 56.39 | 54.31 | 59.19 | 102 (20.12%) |
| GPT-6 Astra | 71.73 | 46.55 | 55.87 | 60.87 | 56.83 | 58.31 | 231 (45.56%) |
| Kimi-K3 | 82.24 | 50.80 | 61.83 | 41.35 | 51.63 | 57.37 | 68 (13.41%) |
| Qwen3.8-27B | 64.03 | 47.85 | 53.41 | 47.88 | 45.69 | 51.70 | 38 (7.50%) |
标题结果是表 1 中的观察到的 20/20 行。一个最初在每次尝试中完成 ThinkingBox-Bench 38 项(7.5%)任务的 27B 模型,现在在每次尝试中完成 107 项(21.1%)任务,几乎三倍于之前。作为比较,Kimi-K3 的观察到的 20/20 为 68,GPT-5.4 为 128,GPT-6 Astra 为 231,而 Claude Opus 5.5 以 241 领先。
平均成功率和可重复性产生不同的排序。在表 2 中,我们注意到 GPT-5.6 Sol 在 pass@1 上的得分略高于经过强化学习微调的 Qwen3.8-27B(61.91% 对比 60.78%),但在所有 20 次记录尝试中通过的任务更少:82 对比 107。Claude Sonnet 4.6 在 pass@1 上的得分较低,为 59.19%,但每次通过的任务数量几乎相同,为 102。单独来看,没有任何一个指标能捕捉到全貌。
观察到的模式与锐化现象一致:可重复的成功率上升,而至少一次覆盖范围略有下降。这与之前的工作一致。一种解释是概率分布向可重复工作的轨迹移动,而一些低概率路径消失了。
总体而言,该模型并未变得更广泛,而是变得更具可重复性。接下来的问题是,这些收益具体体现在哪些方面。
收益落点
图3. 领域级基础得分、RLFT得分及百分点变化。绿色单元格显示增益,红色单元格显示下降;蓝色阴影表示每个指标内的得分水平。
Pass@1和观察到的20/20在全部五个领域均有所上升。Pass@20的表现则喜忧参半:在新银行和咨询领域有所增加,但在零售、旅游和汽车保险领域出现下降。汽车保险经历了最大的广度损失(-7.0分),而零售则获得了最大的观察20/20增益(+24.5分)。
可靠性成本
第一篇帖子用简单的数学方法计算了价格:将完整20次运行活动的估计成本除以模型每次都通过的任务数量。
每次可靠任务的成本 = 507 × 20次活动的估计成本 ÷ 通过20/20的任务数
对微调检查点的实测令牌使用量应用相同的成本计算:
表3. 基础模型和RL微调Qwen3.8-27B的估计评估成本和可靠性。每次成功尝试的成本将总估计活动成本(507 x 20)除以通过尝试的数量。
| 指标 | 基础模型 | RL微调 | 变化 |
|---|---|---|---|
| 20次运行的活动成本 | $925.80 | → | $855.58 |
| 每次成功尝试的成本 | $0.177 | → | $0.139 |
| 通过20/20的任务数 | 38 | → | 107 |
| 每次可靠任务的成本 | $24.36 | → | $8.00 |
以每次可靠任务8.00美元计算,微调模型在配套比较中接近GPT-5.4(6.80美元)、GPT-6 Astra(7.45美元)和Claude Opus 5.5(7.80美元)。
单次尝试视角
图4将每次成功尝试的成本与pass@1进行对比。
图4. 金色箭头追踪Qwen3.8-27B基础帕累托成本位置至RLFT(菱形):pass@1从51.70%上升至60.78%,而每次成功尝试的估计成本从0.177美元降至0.139美元。带圈圆圈标记了帕累托成本前沿。
这一举措使微调检查点接近GPT-5.6 Sol,尽管GPT-5.6 Sol仍然更便宜,且pass@1略高。我们论文中定价的四个模型位于绘图范围之外。
这些美元数值是相对比较的服务指数,而非发票或云账单。提供微调检查点的服务成本将与基础模型相同。该计算包括模型推理成本,并排除用于整理训练数据集的训练运行和政策探测成本。
这些结果告诉我们哪些因素发生了变化。接下来的部分将解释训练循环以及为什么选择正确的任务最为重要。
训练循环
图5. 六个阶段,现已置于上下文中:候选任务输入,前三个阶段离线运行一次,后三个阶段在每次运行中针对每个组重复。训练后的检查点将根据ThinkingBox-Bench进行评估。
选择过程仅运行一次,离线针对基础策略模型(即本例中的Qwen3.8 27B);随后训练使用该已整理好的固定池。图5中的虚线琥珀色箭头标记了我们未采取的路径:在训练运行期间重新探测难度。
每次 rollout 都是一个完整的事件,而非文本补全。它获得一个新的后端、一个隔离的MCP会话以及作为模拟用户的GPT-5 Chat。大多数奖励来自确定性终端状态检查;少数狭窄的评分标准要求可以调用配置的裁判(GPT-5 Chat)。
训练和评估必须以相同的方式解释Qwen的输出。这包括推理提取、工具调用、参数类型化、渲染以及隔离的任务状态。否则,奖励将衡量一个与被评估代理不同的代理。共享的解释代码位于 trainer/core/tb_interpret.py 中。
对于参考运行,我们在187个任务上对全参数RL微调的Qwen3.8-27B进行了基于令牌平均GRPO的训练。每次更新在24块H100上生成了18组每组8次rollout,即144个事件。训练与参数和优化器卸载同步运行;AdamW使用1e-6的学习率和零权重衰减。我们进行了50步的训练。
零方差组在训练期间以 DAPO 风格进行了替换。系统错误被单独处理:后端超时并非代理结果错误,因此受影响的组被重新填充,而不是作为失败进行评分。
这解释了保留的任务是如何训练的。剩下的问题是哪些任务进入了训练池。
离线策略相对难度
在深入探讨训练任务的选择之前,先作如下声明:
ThinkingBox-Bench 中的任何任务都未包含在强化学习训练池中。该基准测试专用于评估。
相对于强化学习训练池,ThinkingBox-Bench 属于分布外数据:其领域、数据库、策略以及大多数工具在强化学习训练期间均未遇到过。这两组数据仍共享 ThinkingBox 框架、模拟用户机制、可执行终端状态评分、少数常用工具以及相似的任务风格。这些共享元素限制了迁移主张的范围。
选择之所以重要,归根结底是 GRPO 的一个算术事实。如果所有八次 rollout 都失败,奖励向量为 [0, 0, 0, 0, 0, 0, 0, 0] 。如果所有八次都成功,则为 [1, 1, 1, 1, 1, 1, 1, 1] 。在这两种情况下,组内中心化不会产生任务奖励优势,因为没有哪条轨迹优于其他轨迹。
混合组如 [0, 0, 0, 1, 1, 1, 1, 1] 提供了 GRPO 可以学习的对比。对于有状态代理而言,这种区分成本高昂:每次 rollout 都会配置一个隔离的后端,运行真实的工具会话,并调用单独的模型来扮演用户角色。
因此,塑造这项工作的核心问题不仅仅是哪个模型或优化器?而是:哪些候选任务应进入固定的训练池?
我们使用后验分布上的离线通过率过滤器来选择训练池。它估计在基础策略下哪些任务可能产生对比性的终端奖励。
因此我们进行探测。每个候选任务针对基础策略模型重复运行。通俗的规则很简单:模型始终失败的任务不太可能教会它;模型始终通过的任务已经被学会;模型有时能解决的任务才是结果能提供对比的地方。
从有限探测中估计难度
每个候选任务运行 n 次,产生 k 次成功。我们使用杰弗里斯后验概率对其潜在成功概率进行建模:
成功概率 | n 次探测中 k 次成功 ~ Beta(k + ½, n − k + ½)
图 6. 离线策略相对难度是从重复的基础策略探测中估计的,并用于保留可能产生对比性奖励的任务。
我们将单位区间划分为五个桶,边界分别为 0.08、0.40、0.60 和 0.90,这些是本次运行的超参数。每个任务被分配到具有最大后验质量的桶中:
极少解决 [0, 0.08):丢弃
困难 [0.08, 0.40):保留
中等 [0.40, 0.60):保留
频繁解决 [0.60, 0.90):用于全参数 RLFT 保留
几乎总是解决 [0.90, 1]:丢弃
更多细节见我们的 ThinkingBox 论文附录 C.4。
一个任务,端到端
图 7. 放大查看,一个任务经历所有六个阶段:GPT-5.4 筛选、基础模型探测、难度分类、rollout 组、终端状态评分和 GRPO 更新。
图 7 跟踪了一个可能进入训练池的候选任务。对于 Qwen3.8 27B 全参数池,GPT-5.4 首先作为可解性筛选器。基础策略随后在少数探测中成功,例如 8 次中的 3 次,产生 Beta(3.5, 5.5) 后验。其最大质量 54.0% 落在困难区间。
当采样用于训练时,该任务生成了混合奖励组 [0, 0, 0, 0, 1, 1, 1, 1] 。因此,成功轨迹获得了高于平均的任务优势,失败轨迹获得了低于平均的优势,从而为 GRPO 提供了可学习的对比。不同的策略模型可能会将同一任务置于不同的难度区间。
最终 Qwen3.8-27B 精心策划的训练池包含 187 个任务。
什么能获得奖励
关于轨迹,没有什么可说的。奖励是t
This is the follow up to our first blog post, The Agent Said It Was Done. The Database Disagreed. ThinkingBox-Training is now available on GitHub .
We built ThinkingBox to evaluate an agent's work by comparing the final database state with the expected outcome. We then used the same kind of executable signal as a reward on training tasks outside ThinkingBox-Bench. For Qwen3.8-27B, average success rose from 51.70% to 60.78%, while tasks completed correctly on all twenty attempts rose from 38 to 107 with 50 GRPO steps.
Figure 1. ThinkingBox turns executable checks of terminal database state into rewards for post-training agents on tasks outside ThinkingBox-Bench.
This is a joint blog by Microsoft and Hugging Face, special thanks to Mirco Milletari and Xiang Jiang from Microsoft, Sergio Paniego from Hugging Face and our former intern Zhuochun Li (University of Pittsburgh) for co-authoring/reviewing efforts.
We built ThinkingBox to catch agents that say they are done when they are not.
Each of its 507 tasks in ThinkingBox-Bench (our benchmark dataset) hands an agent a real backend and a set of tools, lets it work, then checks what really changed in the database. In the first post , we caught a model closing a customer's ticket as resolved while the carrier exception behind it was still open. Nine competent-looking tool calls, one wrong database row.
Then we noticed what we had built. For most tasks, an executable check can return 1 or 0 directly from the final database state. That is not just a grader. This can be a reward function. +
So we constructed a training pool from ThinkingBox-format tasks outside the benchmark and used their executable outcomes as rewards. The catch was choosing which tasks are suitable for agent training: most tasks are either already solved or hopeless for the model in front of you, and both teach it nothing.
Difficulty is policy-relative: a task is hard for the current model only until that model learns it.
We call this offline policy-relative difficulty . We estimated each task's success probability once using the base policy before training and kept the selected training pool fixed throughout the run.
What happened after training
We used offline policy-relative difficulty to build the training pool, then fine-tuned Qwen3.8-27B with GRPO for 50 steps. To recap, we evaluate each of the 507 benchmark tasks 20 times. pass@1 measures average success across all 10,140 attempts. pass@20 measures the share of tasks solved at least once. Observed 20/20 measures the share of tasks that pass every recorded attempt.
Table 1. Qwen3.8-27B results before and after 50 steps of GRPO on the offline-selected training pool.
Metric
Base
RL fine-tuned
Change
Observed 20/20
38 (7.50%)
→
107 (21.10%)
+69 tasks
pass@1 (successful attempts)
5,242 (51.70%)
→
6,163 (60.78%)
+9.08 pt
pass@20 (tasks solved at least once)
453 (89.35%)
→
446 (87.97%)
−7 tasks
Training sharply increased repeatable success, with a small decline in at-least-once coverage. The rest of the post explains how we selected practice tasks, built the reward loop, and measured that tradeoff.
What does that improvement look like on one task? A traveler requests a room downgrade, but company policy requires manager approval first. Before training, the agent changed the booking and issued refunds without approval in 15 of 20 attempts. After RL fine-tuning, it preserved the booking and payment state in all 20.
Figure 2. One corporate hotel-booking task, 20 attempts per model. The base Qwen3.8-27B model changed the booking without required manager approval in 15 attempts. The RL fine-tuned model preserved booking and payment state in all 20; all expected records matched in 19.
Contents
What the benchmark found, in sixty seconds
Results: the dependability column moved
Where the gains landed
What dependability costs
The training loop
Offline policy-relative difficulty
What earns a reward
Run the training stack
Where this goes next
In a hurry? The headline result is above. The implementation is in Run the training stack .
What the benchmark found, in sixty seconds
ThinkingBox-Bench grades agents on the database records they leave behind. Each of its 507 tasks starts a real backend, hands the agent a set of MCP tools and a simulated LLM user with private context, and at the end runs executable checks against the terminal database state. Checks are against the backend record that needs to be correct, not the specific tool calls. This incentivizes the model to discover possibly new solution paths rather than “rediscover” the human-backed solution, that might be suboptimal albeit correct.
In our first post we ran eighteen models through that benchmark twenty times each and reported a gap that headline accuracy hides. Kimi-K3 solved 93.89% of tasks at least once but completed only 68 of 507 tasks (13.41%) on all twenty recorded attempts . Claude Opus 5 inverted it: narrower coverage, far more consistency.
And bigger or better model did not close it. Claude Opus 5.5 scored 0.66 percentage points higher than Claude Opus 5 on pass@1, yet passed exactly the same number of tasks, 241 , on all twenty attempts. That gain in headline accuracy bought zero additional dependability.
If you are choosing a model for work that touches production database records, pass@1 should not be read alone. Observed 20/20 shows which tasks succeed on every attempt, which is closer to what production reliability requires.
The executable terminal-state verdict was also the training reward. Before unpacking the training loop, here is what changed on the sealed benchmark.
Results: the dependability column moved
After training Qwen3.8-27B, we evaluated the selected step-50 checkpoint on the 507-task benchmark it had never trained on. The 507 tasks represent an out-of-distribution test set: their domains, databases, and most MCP tools were not encountered during RL training.
Table 2. ThinkingBox-Bench pass@1 (%) by domain, for selected models from our first blog's Table 2 and our fine-tuned model for different domains and overall. Observed 20/20 numbers are over the entire benchmark with 507 tasks. Each model is evaluated on all 507 tasks for 20 repeated trials. Bold marks the column leader; underline marks the runner-up.
Model
Retail
Auto insurance
Travel
Neobank
Consulting
Overall
Observed 20/20
Claude Opus 5.5
80.97
68.40
54.28
71.25
61.58
67.16
241 (47.53%)
Claude Opus 5
80.71
65.80
49.95
70.62
66.19
66.50
241 (47.53%)
GPT-5.4
76.33
62.65
68.12
65.34
54.60
65.36
128 (25.25%)
GPT-5.6 Sol
67.65
65.30
60.34
59.09
57.52
61.91
82 (16.17%)
Qwen3.8-27B RLFT
67.91
56.45
62.69
62.40
54.51
60.78
107 (21.10%)
Claude Sonnet 4.6
72.35
54.40
58.94
56.39
54.31
59.19
102 (20.12%)
GPT-6 Astra
71.73
46.55
55.87
60.87
56.83
58.31
231 (45.56%)
Kimi-K3
82.24
50.80
61.83
41.35
51.63
57.37
68 (13.41%)
Qwen3.8-27B
64.03
47.85
53.41
47.88
45.69
51.70
38 (7.50%)
The headline result is the observed-20/20 row in Table 1. A 27B model that initially completed 38 (7.5%) of ThinkingBox-Bench on every attempt now completes 107 (21.1%) on every attempt, almost thrice. For comparison, observed 20/20 for Kimi-K3 is 68, GPT-5.4 with 128, GPT-6 Astra has 231, and Claude Opus 5.5 leads with 241.
Average success and repeatability produce different orderings. In Table 2, we notice that GPT-5.6 Sol scored slightly higher on pass@1 than the RL fine-tuned Qwen3.8-27B (61.91% versus 60.78%) but passed fewer tasks on all 20 recorded attempts: 82 versus 107. Claude Sonnet 4.6 scored lower on pass@1, at 59.19%, yet passed nearly the same number of tasks every time, at 102. Neither metric alone captures the full picture.
The observed pattern is consistent with sharpening: repeatable success rose while at-least-once coverage fell slightly. This is in-line with prior work . One explanation is that probability distribution moved toward trajectories that work repeatedly while some low-probability paths disappeared.
Overall, the model did not become broader. It became more repeatable. The next question is where those gains landed.
Where the gains landed
Figure 3. Domain-level base scores, RLFT scores, and percentage-point changes. Green change cells show gains and red cells show declines; blue shading indicates the score level within each metric.
Pass@1 and observed 20/20 rose in all five domains. Pass@20 was mixed: it increased in neobank and consulting, but declined in retail, travel, and auto insurance. Auto insurance had the largest breadth loss (−7.0 points), while retail had the largest observed-20/20 gain (+24.5 points).
What dependability costs
The first post priced consistency using simple math: divide the estimated cost of the full 20-run campaign by the number of tasks the model passed every single time.
Cost per dependable task = estimated cost of the 507 × 20 campaign ÷ tasks passing 20/20
Applying the same cost math to the fine-tuned checkpoint's measured token usage:
Table 3. Estimated evaluation cost and dependability for base and RL fine-tuned Qwen3.8-27B. Cost per successful attempt divides total estimated campaign cost (507 x 20) by the number of passing attempts.
Measure
Base
RL fine-tuned
Change
Campaign cost, 20 runs
$925.80
→
$855.58
−7.6%
Cost per successful attempt
$0.177
→
$0.139
−21.4%
Tasks passing 20/20
38
→
107
2.8× as many
Cost per dependable task
$24.36
→
$8.00
−67.2%
At $8.00 per dependable task, the fine-tuned model came close to GPT-5.4 ($6.80), GPT-6 Astra ($7.45), and Claude Opus 5.5 ($7.80) in the companion comparison.
The single-attempt view
Figure 4 prices cost per successful attempt against pass@1.
Figure 4. The golden arrow traces Qwen3.8-27B base pareto cost position to the RLFT (diamond): pass@1 rises from 51.70% to 60.78% while estimated cost per successful attempt falls from $0.177 to $0.139. Ringed circles mark the Pareto cost frontier.
The move places the fine-tuned checkpoint close to GPT-5.6 Sol, although GPT-5.6 Sol remains cheaper and slightly higher on pass@1. Four models priced in our paper fall outside the plotted range.
The dollar values are a comparative serving index, not invoice or cloud bills. Serving the fine-tuned checkpoint would be the same as the base model. The calculation includes model inference cost, and excludes training run and policy-probe cost for curating the training dataset.
These results tell us what moved. The next sections explain the training loop and why selecting the right tasks matters the most.
The training loop
Figure 5. The six stages, now in context: candidate tasks feed in, the first three run once offline, the last three repeat for every group in the training run. The trained checkpoint is evaluated against ThinkingBox-Bench.
Selection runs once, offline, against the base policy model, i.e in this case Qwen3.8 27B; training then uses that fixed pool that has been curated. The dashed amber arrow in Figure 5 marks the path we did not take: re-probing difficulty during the training run.
Every rollout is a complete episode, not a text completion. It gets a fresh backend, an isolated MCP session, and GPT-5 Chat as the simulated user. Most rewards come from deterministic terminal-state checks; a minority of narrow rubric requirements can invoke the configured judge (GPT-5 Chat).
Training and evaluation must interpret Qwen output identically. That includes reasoning extraction, tool calls, argument typing, rendering, and isolated task state. Otherwise the reward measures a different agent from the one evaluated. The shared interpretation code is in trainer/core/tb_interpret.py .
For the reference run, we ran full-parameter RL fine-tuned Qwen3.8-27B on 187 tasks using token-mean GRPO. Each update generated 18 groups of 8 rollouts, or 144 episodes, across 24 H100s. Training ran synchronously with parameter and optimizer offload; AdamW used a 1e-6 learning rate and zero weight decay. We ran the training for 50 steps.
Zero-variance groups were replaced DAPO-style during training. System errors were handled separately: a backend timeout is not an incorrect agent outcome, so affected groups were refilled rather than scored as failures.
That explains how retained tasks were trained. The remaining question is which tasks entered the training pool.
Offline policy-relative difficulty
Before diving deep into the selection of training tasks, a disclaimer:
No ThinkingBox-Bench task was included in the RL training pool. The benchmark was reserved for evaluation.
ThinkingBox-Bench is out-of-distribution relative to the RL training pool: its domains, databases, policies, and most tools were not encountered during RL training. The two sets still share the ThinkingBox framework, simulated-user machinery, executable terminal-state grading, a few common tools, and a similar task style. These shared elements limit the scope of the transfer claim.
Why selection matters comes down to one arithmetic fact about GRPO. If all eight rollouts fail, the reward vector is [0, 0, 0, 0, 0, 0, 0, 0] . If all eight succeed, it is [1, 1, 1, 1, 1, 1, 1, 1] . In either case, centering within the group produces no task-reward advantage because no trajectory did better than another. ++
A mixed group such as [0, 0, 0, 1, 1, 1, 1, 1] supplies the contrast GRPO can learn from. That distinction is expensive for a stateful agent: every rollout provisions an isolated backend, runs a real tool session, and calls a separate model to play the user.
The question that shaped this work was therefore not only which model or optimizer? It was: which candidate tasks should enter the fixed training pool?
We used an offline pass-rate filter on the posterior to select the training pool. It estimates which tasks are likely to produce contrasting terminal rewards under the base policy.
So we probe. Each candidate task is run repeatedly against the base policy model. The plain-language rule is simple: tasks the model always fails are unlikely to teach it yet; tasks it always passes are already learned; tasks it solves sometimes are where outcomes can provide contrast.
Estimating difficulty from limited probes
Each candidate task is run n times, producing k successes. We model its latent success probability with Jeffreys posterior probability:
success probability | k successes in n probes ~ Beta(k + ½, n − k + ½)
Figure 6. Offline policy-relative difficulty is estimated from repeated base-policy probes and used to retain tasks likely to produce contrasting rewards.
We partition the unit interval into five buckets with boundaries at 0.08, 0.40, 0.60, and 0.90, chosen as hyperparameters for these runs. Each task is assigned to the bucket containing the greatest posterior mass:
Rarely solved [0, 0.08): drop
Difficult [0.08, 0.40): keep
Intermediate [0.40, 0.60): keep
Frequently solved [0.60, 0.90): keep for full-parameter RLFT
Nearly always solved [0.90, 1]: drop
Further details are in Appendix C.4 of our ThinkingBox paper .
One task, end to end
Figure 7. Zooming in, one task through all six stages: GPT-5.4 screening, base-model probes, difficulty classification, a rollout group, terminal-state grading, and a GRPO update.
Figure 7 follows one candidate task that can potentially enter the training pool. For the Qwen3.8 27B full-parameter pool, GPT-5.4 first served as a solvability screen. The base policy then succeeded on few of the probes e.g 3 of 8, producing a Beta(3.5, 5.5) posterior. Its largest mass, 54.0%, fell in the Difficult band.
When sampled for training, the task produced the mixed reward group [0, 0, 0, 0, 1, 1, 1, 1] . Successful trajectories therefore received above-mean task advantage and failed trajectories below-mean advantage, giving GRPO contrast to learn from. A different policy model could place the same task in a different difficulty band.
The final Qwen3.8-27B curated training pool contained 187 tasks.
What earns a reward
Nothing about the trajectory. The reward is the t
首次收录 · 2026-10-23 · 10.99 分