跳到正文
arXiv cs.CL· Haolin Yang, Jipeng Zhang, Zhiqiang Qian, Jian Xie, Shuaishuai Gong, Yike Guo, Sirui Han·· 9 天前AI 评分34

HarnessSQL:面向真实数据库环境的 SQL 智能体 harness 原生训练框架

HarnessSQL: Harness-Native Training for SQL Agents in Realistic Database Environments

AI 导读

HarnessSQL 是一个 harness 原生后训练框架,在监督微调与强化学习中保留完整多轮交互结构,让模型直接在目标 SQL harness 内训练。

正文 · 原文

View PDF HTML (experimental)

Abstract:Text-to-SQL models are commonly trained to map questions directly to static queries, whereas real-world database agents operate through stateful, multi-turn interaction with live databases -- inspecting schemas, executing probe queries, diagnosing errors, and revising hypotheses. This creates a critical train-deploy mismatch, as the execution harness that mediates this interaction is introduced only at inference time. To bridge this gap, we propose HarnessSQL, a harness-native post-training framework that preserves the full interaction structure throughout both supervised fine-tuning and reinforcement learning. HarnessSQL builds isolated, executable database environments paired with hidden execution oracles, rolls out teachers directly inside the target SQL harness, and retains only verified trajectories for full-sequence SFT, followed by execution-reward RL. Across Spider 2.0-SQLite, HarnessSQL dramatically boosts the execution accuracy of compact models, raising Qwen3-8B from 15.5% to 45.2% and Qwen3-14B from 22.2% to 54.8%, while transferring effectively to out-of-distribution interactive benchmarks such as BIRD-Interact and LiveSQLBench. Our findings demonstrate that training database agents directly within their execution harness is essential for mastering complex, long-horizon database workflows.
Subjects: Computation and Language (cs.CL)
Cite as: arXiv:2610.12274 [cs.CL]
  (or arXiv:2610.12274v1 [cs.CL] for this version)
  https://doi.org/10.48550/arXiv.2610.12274

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Haolin Yang [view email]
[v1] Thu, 8 Oct 2026 16:36:39 UTC (487 KB)

来源:arXiv cs.CL · arxiv.org