A team from the Hong Kong University of Science and Technology has developed HarnessSQL—an agent for converting text to SQL, trained based on the open-source DeepSeek Harness agent framework. The researchers reported that this agent enables smaller models to outperform much larger models when tested on enterprise-level database benchmarks. The work was published on arXiv in October, and on November 2nd, it was highlighted by Xinzhiyuan, who called it a collaboration between HKUST and Microsoft researchers.
The core component, named DSH-SQL, adapts DeepSeek Harness into a full-fledged database agent equipped with four tools: table viewing, schema reading, query execution, and final answer provision. The team prepared 79 isolated databases from Spider 2.0-Lite and Spider 2.0-DBT, converting DuckDB projects to SQLite, and ran them in read-only mode with a 60-second time limit.
The training process began with controlled fine-tuning on full agent trajectories, averaged over 11,800 tokens, 16 steps, and 14 query executions, excluding tool observations from the loss calculation. This was followed by reinforcement learning using DAPO.
On the Spider 2.0-SQLite benchmark, an 8B model based on Qwen3-8B demonstrated a performance increase from 15.5% to 45.2%, while the 14B version reached 54.8%. Baseline models with 32B parameters, including OmniSQL-32B, Arctic-Text2SQL-32B, and Qwen2.5-Coder-32B, showed results ranging from 14.8% to 16.3%. On LiveSQLBench, the 8B and 14B models scored 24.8% and 28.5% respectively, surpassing the baseline 32B models, which achieved 7.0%–8.9%.
Analysis of various factors revealed the sources of performance gains. Reinforcement learning alone contributed only 20.0%, whereas only the controlled tuning stage provided 30.4% for the 8B model and 37.8% for the 14B model. Fine-tuning on trajectories collected without using harness yielded only 9.6%. Context length also played a significant role: the 8B model showed 27.4% with an 8K window and 45.2% with a 32K window. Among reinforcement learning algorithms, GRPO achieved 40.7%, GSPO—43.7%, and DAPO—45.2%.
The authors assert that it is the well-designed agentic harness, rather than just the scale of the model, that is key to enabling multi-step reasoning over real databases. The project code is available on GitHub. This development complements the growing body of research and tools built upon DeepSeek Harness since its open-source release.



