ThinkingBox: Converting DB State Verification to RL Rewards Enhances Agent Reliability by 3 Times
Developed by Microsoft and Hugging Face, ThinkingBox verifies the final state of a database to make it executable and utilizes it as an RL reward function. Applying GRPO 50 steps to the Qwen3.8-27B model resulted in an average success rate increase from 51.70% to 60.78%, and the number of tasks successfully completed in all 20 attempts increased from 38 to 107, nearly tripling. By fixing the training pool based on offline policy-relative difficulty, generalization performance was demonstrated even on out-of-distribution benchmarks. It suggests that the 'observed 20/20' metric, which is not captured by headline accuracy (pass@1), should be the standard for production deployment.
ThinkingBox: Transforming Database State Verification into a Reward Function<br><br>The research team from Microsoft and Hugging Face has unveiled the ThinkingBox framework, which verifies whether the actual database state matches the expected outcome when an agent declares 'task completed.' While existing benchmarks focused on evaluating tool call sequences or text responses, ThinkingBox compares the terminal state of the actual backend database against executable checks. This approach is designed to capture cases where an agent may perform seemingly plausible tool calls but misses a critical single line of database records. The researchers cited an example in their first blog post where a model closed a customer ticket as 'resolved,' but the underlying carrier exception record remained open. Just one line of database error after nine seemingly appropriate tool calls determined the success or failure of the entire task.<br><br>This executable verification signal can be utilized directly as a reward function for reinforcement learning beyond merely serving as a grader. The researchers constructed a training pool with tasks in the ThinkingBox format outside the ThinkingBox-Bench benchmark, using the execution results of each task (success=1, failure=0) as rewards for the GRPO (Group Relative Policy Optimization) algorithm. The code and data have been made publicly available on GitHub under the name ThinkingBox-Training.<br><br>## Offline Policy-Relative Difficulty: A New Criterion for Task Selection in Training<br><br>Not all tasks are useful for training. Tasks that the model can already solve provide no learning signal, and tasks that the current model cannot solve at all do not provide gradient information. The researchers defined this issue as the concept of offline policy-relative difficulty. The difficulty of a task is not a fixed property but is relative to the current policy (model), and it changes as the model learns. Therefore, the success probability of each task was estimated only once before training using the base policy, and the training pool was fixed based on that estimate without changing it throughout the training. This method avoids the computational cost of online difficulty reassessment while selecting only 'tasks with learning potential' appropriate for the model level, thus enhancing training efficiency.<br><br>## Observed Changes After GRPO 50 Steps: Surge in Repeatable Success<br><br>The researchers conducted GRPO 50 steps on the training pool selected based on offline policy-relative difficulty for the Qwen3.8-27B model and evaluated the entire ThinkingBox-Bench, consisting of 507 tasks that the model had not previously learned, as an out-of-distribution test set. Each task was executed 20 times, and results were reported across three metrics.<br><br>| Metric | Definition | Base Model | RL Fine-Tuning Model | Change |<br>|---|---|---|---|---|<br>| pass@1 (Average Success Rate) | Overall success rate across 10,140 attempts (507×20) | 51.70% | 60.78% | +9.08%p |<br>| pass@20 (At least 1 success) | Proportion of tasks with at least one success out of 20 attempts | 94.67% | 92.70% | -1.97%p |<br>| observed 20/20 (All successes) | Number of tasks with all 20 successes (proportion) | 38 (7.5%) | 107 (21.1%) | +69 (+13.6%p) |<br><br>The headline results are in the observed 20/20 row. Initially, the 27B model succeeded in only 38 out of 507 tasks every time, but after training, this increased to 107, nearly tripling. For reference, in the same benchmark, Kimi-K3 achieved 68, GPT-5.4 achieved 128, GPT-6 Astra achieved 231, and Claude Opus 5.5 led with 241.<br><br>Interestingly, the average success rate (pass@1) and repeat success rate (observed 20/20) create different rankings for models. GPT-5.6 Sol had a pass@1 of 61.91%, slightly higher than the fine-tuned Qwen3.8-27B (60.78%), but its observed 20/20 was 82, falling short of 107. In contrast, Claude Sonnet 4.6 had a lower pass@1 of 59.19% but an observed 20/20 of 102, nearly on par. This demonstrates that a single metric cannot fully capture a model's real-world reliability.<br><br>## Domain-Specific Performance Analysis: Decoupling Average Accuracy and Reliability<br><br>ThinkingBox-Bench consists of multiple domains, and Table 2 reports the pass@1 by domain. Overall, the RL fine-tuning model showed increased pass@1 across most domains, but the improvement in observed 20/20 varied by domain. The researchers interpret this pattern as 'sharpening.' As the probability distribution moves along a trajectory that operates repeatedly, some low-probability success paths disappear, resulting in a slight decrease in minimum one-success coverage (pass@20) (-1.97%p), but the reliability of all-success significantly increased. This aligns with previous research findings. The model did not become 'broader' but became 'more repeatable.'<br><br>[CHART: observed_20_20|Qwen3.8-27B_Base:38|Qwen3.8-27B_RLFT:107|Kimi-K3:68|GPT-5.4:128|GPT-6_Astra:231|Claude_Opus_5.5:241]<br><br>## Real Case: Behavioral Changes in Hotel Reservation Downgrade Tasks<br><br>Let's examine a specific task for changes. In the corporate hotel reservation system, a traveler requested a room downgrade, but company policy requires manager approval beforehand. The base Qwen3.8-27B changed the reservation and processed refunds without manager approval in 15 out of 20 attempts. After RL fine-tuning, the model preserved the reservation and payment status in all 20 attempts, with all expected records matching precisely in 19 cases. This case demonstrates that the agent has internalized the final database state that complies with business rules, going beyond merely mimicking 'tool call sequences.'<br><br>## Implications: Redefining Reliability Metrics for Production Deployment<br><br>The core insight of ThinkingBox is that 'executable terminal state verification' can serve as both an evaluation metric and a training reward. By combining the MCP (Model Context Protocol) tool with simulated LLM users (holding private contexts), it drives the actual backend and uses final database records as the standard rather than specific tool call paths. This encourages the model to explore potentially better new solution paths rather than 'rediscovering' paths designed by humans.<br><br>If models are deployed in tasks that touch production databases, one should not only read pass@1. The observed 20/20, as the 'proportion of tasks succeeding in all attempts,' is a metric that is closer to actual operational reliability. ThinkingBox has internalized this metric in both benchmarks and training loops, providing a practical path to bridge the gap between headline accuracy and real-world reliability.
ThinkingBox has shifted the paradigm of agent evaluation from 'tool call accuracy' to 'database state integrity.' The idea of using executable verification as a reward function is simple yet powerful, providing an immediately applicable methodology in enterprise environments where production-grade reliability is required. The decoupling phenomenon between pass@1 and observed 20/20 highlights the risks of relying on a single metric when selecting models.
Open questions
Does the fixed estimate of offline policy-relative difficulty during training maintain out-of-distribution generalization with larger models or more steps?
Is there a risk of reward hacking when automating the generation of ThinkingBox format tasks to scale the training pool?
As the MCP tool ecosystem expands, how will we continuously update the domain coverage of the ThinkingBox benchmark?