arXiv:2606.05634cs.CL2026-06

通过执行反馈自动补全文本转SQL的语义映射,提升复杂查询准确率。

Bootstrapping Semantic Layer from Execution for Text-to-SQL

论文配图:Bootstrapping Semantic Layer from Execution for Text-to-SQL
图 1 · 摘自论文原文
  • 执行已知部分获取反馈,筛选支持观测结果的语义假设。
  • 在真实与可控基准上,相比强基线提升3.2~7.8个百分点准确率。
  • 适合处理领域专用术语缺失的复杂数据库查询场景。

现实中的文本转SQL常因用户表述未明确数据库值的存储方式而存在歧义。现有方法依赖预先定义的语义层来指定映射关系,但此类定义在专业领域往往不完整,导致同一SQL片段存在多个可能的语义假设。为此,本文提出GATE(Grouding After Test from Execution),通过执行反馈动态补全缺失的语义映射。GATE在执行已确定部分的同时保留开放的语义假设,并根据执行结果仅将与观测一致的假设固化为记忆条目,记录测试内容及对应SQL写法。这些条目累积形成执行驱动的记忆库,供后续步骤复用。在真实世界与受控基准上,GATE持续优于强基线,证明执行不仅能验证,还能作为可复用记忆的构建机制。

原文摘要 · Abstract (English)

Real-world text-to-SQL is often under-specified until user phrases are grounded in how the database stores values. Prior work attempts to address this by requiring a semantic layer to specify groundings in advance, but such specifications are often incomplete, especially in expert domains where domain-specific conventions are under-documented. As this leaves multiple grounding hypotheses open for the same SQL part, we introduce GATE (Grouding After Test from Execution), which bootstraps missing groundings from execution feedback. GATE keeps grounding hypotheses open while executing the already grounded parts to obtain observations. Then, only the hypothesis supported by that observation is grounded and stored as a memory entry, recording what was tested and how the open part should be written in SQL. These entries accumulate into execution-grounded memory, allowing later steps to reuse supported groundings. Across real-world and controlled benchmarks, GATE consistently improves over strong baselines, demonstrating that execution can serve not only as validation but also as a bootstrapping mechanism for reusable memory in text-to-SQL.

文本转SQL语义映射执行反馈记忆机制

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。