Turning Database Grading into RL Rewards: Post-Training Agents with ThinkingBox
Microsoft and Hugging Face introduced ThinkingBox, a system that uses executable database checks as rewards for post-training AI agents, significantly improving their reliability.
Intelligence analysis by Gemini 2.5 Flash

The ThinkingBox system addresses a critical flaw where AI agents claim task completion but leave incorrect database states. By converting terminal database state checks into direct reward signals for reinforcement learning, the system enables fine-tuning of models like Qwen3.8-27B, leading to a substantial increase in consistent, correct task execution.
Imagine you ask a smart robot to tidy your room, and it tells you it's done. But when you check, some toys are still out! ThinkingBox is like a super-smart checklist that actually looks at your room to see if every single toy is put away correctly. If it is, the robot gets a 'good job!' reward. By getting these rewards, the robot learns to be much more careful and make sure everything is perfect every time, so it doesn't just say it's done, but actually *is* done.
Analysis
The collaboration between Microsoft and Hugging Face on ThinkingBox represents a significant step forward in enhancing the dependability of AI agents. Traditional evaluation metrics often focus on 'pass@1' — whether an agent solves a task at least once — which can mask underlying inconsistencies. ThinkingBox, however, emphasizes 'Observed 20/20,' measuring the percentage of tasks an agent completes correctly on every single attempt. This shift in focus is vital for production environments where even occasional errors can have serious consequences.
ThinkingBox-Bench
ThinkingBox-Bench is a benchmark dataset comprising 507 tasks, each designed to test an agent's ability to interact with a real backend and a set of tools. Unlike benchmarks that might check specific tool calls, ThinkingBox-Bench evaluates the final database state against an expected outcome. This approach incentivizes agents to discover optimal solution paths rather than merely replicating human-backed solutions, which might be suboptimal. The initial findings from this benchmark highlighted a significant gap: models with high 'pass@1' scores often exhibited low 'Observed 20/20' rates, indicating a lack of consistent reliability. For instance, Kimi-K3 solved 93.89% of tasks at least once but only 13.41% consistently across all 20 attempts.
Qwen3.8-27B
The research team applied their novel training methodology to the Qwen3.8-27B model, using the executable database checks from ThinkingBox-format tasks as direct reinforcement learning rewards. This post-training approach, utilizing GRPO for 50 steps, yielded impressive results. The average success rate ('pass@1') for Qwen3.8-27B rose from 51.70% to 60.78%, a notable improvement. More critically, the number of tasks completed correctly on all twenty attempts ('Observed 20/20') surged from 38 to 107. This demonstrates a substantial increase in the model's dependability, making it far more suitable for tasks requiring high precision and consistency, such as managing customer tickets or corporate booking systems.
Observed 20/20
The 'Observed 20/20' metric is central to the ThinkingBox philosophy, representing the share of tasks that an agent passes on every single recorded attempt. This metric directly addresses the need for production-grade reliability, where an agent's occasional success is insufficient. The significant increase in this metric for Qwen3.8-27B, from 7.50% to 21.10% of tasks, underscores the effectiveness of using database-state-derived rewards. While there was a small decline in 'pass@20' (tasks solved at least once), indicating a slight trade-off in broad coverage for deep consistency, the overall gain in repeatable success is paramount for real-world deployment. This focus on consistent, error-free execution is a paradigm shift for evaluating and training AI agents.
Key points
- ThinkingBox uses executable database checks to evaluate AI agent performance, focusing on the final database state rather than specific tool calls.
- The system converts these database state checks into direct reinforcement learning rewards for post-training AI agents.
- Fine-tuning Qwen3.8-27B with this method increased its average success rate (pass@1) from 51.70% to 60.78%.
- Crucially, the number of tasks solved correctly on all 20 attempts ('Observed 20/20') for Qwen3.8-27B jumped from 38 to 107.
- This approach significantly enhances the dependability and consistency of AI agents, addressing a key challenge for real-world deployment.
This method promises to make AI agents far more reliable and trustworthy for critical tasks, enabling their broader adoption in enterprise settings where data integrity and consistent performance are paramount. It could lead to a new generation of AI tools that users can depend on without constant human oversight.
While improving consistency, the article notes a small decline in 'at-least-once coverage,' suggesting a potential trade-off where agents might become highly proficient at a narrower set of tasks but less capable of solving a wider variety of problems even once. This could limit their versatility in dynamic environments.



