HarnessSQL trains an 8B SQL agent inside the kind of executable database environment it will use at deployment; reported Spider 2.0 SQLite accuracy rises from 15.5% to 45.2%. Instead of generating a query in one pass, the agent can inspect tables and schemas, execute SQL, and use feedback to revise its approach.
Published byEdited with GPT-6 LunaImages generated with GPT Image 2
Research answer

Create a landscape editorial hero image for this Studio Global article: How does HarnessSQL, developed by HKUST and described as a collaboration with Microsoft researchers in an October 2026 arXiv paper covered b. Article summary: HarnessSQL’s central idea is to train a SQL agent inside the same execution environment it will use at deployment, rather than train it only to generate a final SQL statement from a question and schema. The available evi. Topic tags: general, academic, general web, user generated, documentation. Style: premium digital editorial illustration, source-backed research mood, clean composition, high detail, modern web publication hero. Use reference image context only for broad subject, composition, and topical grounding; do not copy the exact image. Avoid: logos, brand marks, copyrighted characters, real person likenesses, fake screenshots, UI text, readable text, w
HarnessSQL’s core idea is to teach a text-to-SQL model to work inside an executable database environment, rather than train it only to turn a question into one final query. Reports say an 8B model’s score on Spider 2.0-SQLite rose from 15.5% to 45.2% after this harness-matched training. 8
9
A one-shot text-to-SQL model receives a question and schema, then tries to produce a query immediately. A database agent, by contrast, can inspect the available tables, examine a schema, run a query and use the result or an error to decide what to try next. HarnessSQL is designed to train for that interactive workflow, keeping the execution environment involved during both supervised fine-tuning and reinforcement learning. 17
25
HarnessSQL builds on DeepSeek Harness, an open-source agent framework with composable plugins, and adapts it for database tasks. 9
10
13 Its SQL-specific interface supports actions such as listing tables, inspecting schemas and executing queries. The reported setup also uses read-only execution, a single-statement constraint and a 60-second timeout.
28
The researchers describe isolated, executable database environments that provide schemas, query execution and runtime feedback. The project’s implementation repository says it converts Spider 2.0-DBT databases from DuckDB to SQLite and uses Spider 2.0-Lite and DBT-derived SQLite data to create executable SQL tasks. 5
25
The training approach preserves interaction trajectories: the model learns through sequences of actions and database responses, rather than only from isolated question-and-query pairs. The paper describes supervised fine-tuning followed by reinforcement learning that uses execution rewards. 4
17
25
This matters because the model is practicing with the same kind of tool-mediated loop it faces when answering questions against a database. It can learn to gather information and respond to execution feedback, not just imitate a standalone SQL string.
On Spider 2.0-SQLite, reports put the HarnessSQL-trained 8B model at 45.2%, compared with a reported 15.5% baseline. 8
9 A separate report gives a 54.8% score for a 14B model.
2 The same coverage cites scores of 14.8% for OmniSQL-32B and 16.3% for Arctic-Text2SQL-32B on Spider 2.0-SQLite.
2
These figures suggest that training an agent to use its execution environment can make a substantial difference on this benchmark. They do not establish that a smaller model will outperform larger models across all SQL workloads: results depend on the benchmark, setup and comparison being reported.
The available source excerpts do not provide enough detail to independently verify every experimental figure, including the full set of four tool definitions, trajectory averages, detailed ablations or the LiveSQLBench comparisons. Those specifics are best treated as unconfirmed here. The repository offers code for the project’s data generation and training pipeline, while the paper describes its broader harness-native approach. 5
17
25
Studio Global AI
This page includes a source-backed answer you can continue inside Studio Global.
HarnessSQL trains an 8B SQL agent inside the kind of executable database environment it will use at deployment; reported Spider 2.0 SQLite accuracy rises from 15.5% to 45.2%.
HarnessSQL trains an 8B SQL agent inside the kind of executable database environment it will use at deployment; reported Spider 2.0 SQLite accuracy rises from 15.5% to 45.2%. Instead of generating a query in one pass, the agent can inspect tables and schemas, execute SQL, and use feedback to revise its approach.
The reported method combines supervised fine tuning on interaction trajectories with reinforcement learning based on execution feedback.
HarnessSQL trains an 8B SQL agent inside the kind of executable database environment it will use at deployment; reported Spider 2.0 SQLite accuracy rises from 15.5% to 45.2%. Instead of generating a query in one pass, the agent can inspect tables and schemas, execute SQL, and use feedback to revise its approach.
Published byEdited with GPT-6 LunaImages generated with GPT Image 2
Research answer

Create a landscape editorial hero image for this Studio Global article: How does HarnessSQL, developed by HKUST and described as a collaboration with Microsoft researchers in an October 2026 arXiv paper covered b. Article summary: HarnessSQL’s central idea is to train a SQL agent inside the same execution environment it will use at deployment, rather than train it only to generate a final SQL statement from a question and schema. The available evi. Topic tags: general, academic, general web, user generated, documentation. Style: premium digital editorial illustration, source-backed research mood, clean composition, high detail, modern web publication hero. Use reference image context only for broad subject, composition, and topical grounding; do not copy the exact image. Avoid: logos, brand marks, copyrighted characters, real person likenesses, fake screenshots, UI text, readable text, w
HarnessSQL’s core idea is to teach a text-to-SQL model to work inside an executable database environment, rather than train it only to turn a question into one final query. Reports say an 8B model’s score on Spider 2.0-SQLite rose from 15.5% to 45.2% after this harness-matched training. 8
9
A one-shot text-to-SQL model receives a question and schema, then tries to produce a query immediately. A database agent, by contrast, can inspect the available tables, examine a schema, run a query and use the result or an error to decide what to try next. HarnessSQL is designed to train for that interactive workflow, keeping the execution environment involved during both supervised fine-tuning and reinforcement learning. 17
25
HarnessSQL builds on DeepSeek Harness, an open-source agent framework with composable plugins, and adapts it for database tasks. 9
10
13 Its SQL-specific interface supports actions such as listing tables, inspecting schemas and executing queries. The reported setup also uses read-only execution, a single-statement constraint and a 60-second timeout.
28
The researchers describe isolated, executable database environments that provide schemas, query execution and runtime feedback. The project’s implementation repository says it converts Spider 2.0-DBT databases from DuckDB to SQLite and uses Spider 2.0-Lite and DBT-derived SQLite data to create executable SQL tasks. 5
25
The training approach preserves interaction trajectories: the model learns through sequences of actions and database responses, rather than only from isolated question-and-query pairs. The paper describes supervised fine-tuning followed by reinforcement learning that uses execution rewards. 4
17
25
This matters because the model is practicing with the same kind of tool-mediated loop it faces when answering questions against a database. It can learn to gather information and respond to execution feedback, not just imitate a standalone SQL string.
On Spider 2.0-SQLite, reports put the HarnessSQL-trained 8B model at 45.2%, compared with a reported 15.5% baseline. 8
9 A separate report gives a 54.8% score for a 14B model.
2 The same coverage cites scores of 14.8% for OmniSQL-32B and 16.3% for Arctic-Text2SQL-32B on Spider 2.0-SQLite.
2
These figures suggest that training an agent to use its execution environment can make a substantial difference on this benchmark. They do not establish that a smaller model will outperform larger models across all SQL workloads: results depend on the benchmark, setup and comparison being reported.
The available source excerpts do not provide enough detail to independently verify every experimental figure, including the full set of four tool definitions, trajectory averages, detailed ablations or the LiveSQLBench comparisons. Those specifics are best treated as unconfirmed here. The repository offers code for the project’s data generation and training pipeline, while the paper describes its broader harness-native approach. 5
17
25
Studio Global AI
This page includes a source-backed answer you can continue inside Studio Global.
HarnessSQL trains an 8B SQL agent inside the kind of executable database environment it will use at deployment; reported Spider 2.0 SQLite accuracy rises from 15.5% to 45.2%.
HarnessSQL trains an 8B SQL agent inside the kind of executable database environment it will use at deployment; reported Spider 2.0 SQLite accuracy rises from 15.5% to 45.2%. Instead of generating a query in one pass, the agent can inspect tables and schemas, execute SQL, and use feedback to revise its approach.
The reported method combines supervised fine tuning on interaction trajectories with reinforcement learning based on execution feedback.