跳到正文
arXiv cs.CL· \"Omer Faruk Akg\"ul, Nikhil Kapahi, Prajit Reddy Muppidi·· 12 小时前AI 评分44

无需 Schema 文档的 Text-to-SQL:从查询日志学习企业数据库结构

Schema-Free Text-to-SQL: Learning Enterprise Database Structure from Query Logs

AI 导读

研究者提出首个无需 Schema 文档的 Text-to-SQL 框架,改为从历史查询日志中学习数据库结构,通过解析查询模式构建知识图谱,并用实体驱动的 GraphRAG 检索将用户问题对齐到领域术语。在 Beaver 基准上执行有效率达 95.7%,而基于嵌入向量的检索仅为 60.8%;内部部署中数据工程师以 70% 对 10% 的比例更偏好该系统。

正文

View PDF HTML (experimental)

Abstract:Text-to-SQL systems achieve remarkable accuracy on academic benchmarks, yet performance drops dramatically in enterprise deployments. This gap stems from a fundamental assumption: existing approaches require complete schema documentation, but enterprise databases typically lack comprehensive documentation, featuring cryptic naming and implicit relationships. We present the first text-to-SQL framework that operates without schema documentation, instead learning database structure from historical query logs. Query logs encode implicit structural knowledge: which tables are queried together, how they join, and what columns map to business concepts. We construct a knowledge graph from parsed query patterns and introduce entity-driven GraphRAG retrieval that grounds user questions in domain terminology rather than relying solely on embedding similarity. Validated on both an industrial deployment with expert evaluation and the Beaver benchmark, our approach substantially outperforms similarity-based retrieval methods, the dominant industry approach, in both executability and answer quality. On Beaver, we achieve 95.7% execution validity compared to 60.8% for embedding-based retrieval, with expert data engineers preferring our system 70% to 10% on internal deployment. Our work demonstrates that text-to-SQL can operate effectively in schema-ambiguous enterprise environments, enabling natural language database interfaces "in the wild".
Subjects: Computation and Language (cs.CL)
Cite as: arXiv:2610.33946 [cs.CL]
  (or arXiv:2610.33946v1 [cs.CL] for this version)
  https://doi.org/10.48550/arXiv.2610.33946

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Ömer Faruk Akgül [view email]
[v1] Sat, 24 Oct 2026 23:24:54 UTC (266 KB)

来源:arXiv cs.CL · arxiv.org