HarnessSQL: Harness-Native Training for SQL Agents in Realistic Database Environments
TL;DR - HarnessSQL trains text-to-SQL agents inside the same stateful execution harness used at deployment, enabling them to inspect schemas, test queries, diagnose failures, and revise solutions. This substantially improves compact models on realistic, long-horizon database tasks.
- Uses isolated executable databases, hidden execution oracles, and verified teacher trajectories for full-sequence supervised fine-tuning.
- Adds reinforcement learning with execution-based rewards after supervised post-training.
- Raises Spider 2.0-SQLite execution accuracy from 15.5% to 45.2% for Qwen3-8B and from 22.2% to 54.8% for Qwen3-14B.
- Transfers effectively to out-of-distribution interactive benchmarks, including BIRD-Interact and LiveSQLBench.