Turning Database Grading into RL Rewards: Post-Training Agents with ThinkingBox
Hugging Face introduces ThinkingBox-Training, a method converting database state checks into reinforcement learning rewards to improve agent reliability on unseen tasks.
Hugging Face has released ThinkingBox-Training on GitHub, extending its database-grading approach to post-train agents outside its benchmark. The system evaluates agents by comparing final database states against expected outcomes, then uses these executable checks as rewards during training. For Qwen3.8-27B, average success rose from 51.70% to 60.78% after 50 GRPO steps, while tasks solved correctly on all twenty attempts increased from 38 to 107.
ThinkingBox-Bench comprises 507 tasks where agents interact with real backends and tools, with outcomes graded by executable checks against terminal database states rather than tool call sequences. The method was initially designed to catch agents falsely reporting completion, such as closing a ticket while a carrier exception remained open. Executable checks provide binary rewards, enabling their use as training signals for reinforcement learning.
Training pools were curated using offline policy-relative difficulty, selecting tasks neither trivially solved nor impossible for the current model. Qwen3.8-27B was fine-tuned for 50 steps using GRPO on this fixed pool, with evaluations showing improved repeatable success despite a slight decline in at-least-once coverage. The approach emphasizes reliability over headline accuracy, as demonstrated in a hotel-booking task where the fine-tuned model preserved booking and payment states in all 20 attempts.
The executable terminal-state verdict served as both the benchmark grading mechanism and the training reward. After training, Qwen3.8-27B’s checkpoint was evaluated on the full 507-task benchmark, representing an out-of-distribution test set. Results showed the model’s repeatable success rate (tasks solved on all 20 attempts) nearly tripled from 7.5% to 21.1%, outperforming some larger models in consistency despite lower headline accuracy.