pith. sign in

arxiv: 2505.19988 · v2 · pith:OUBEADN4new · submitted 2025-05-26 · 💻 cs.DB

Automatic Metadata Extraction for Text-to-SQL

classification 💻 cs.DB
keywords metadatagenerationtext-to-sqlbirdextractionquerytechniquesautomatic
0
0 comments X
read the original abstract

Large Language Models (LLMs) have recently become sophisticated enough to automate many tasks ranging from pattern finding to writing assistance to code generation. In this paper, we examine text-to-SQL generation. We have observed from decades of experience that the most difficult part of query development lies in understanding the database contents. These experiences inform the direction of our research. Text-to-SQL benchmarks such as SPIDER and Bird contain extensive metadata that is generally not available in practice. Human-generated metadata requires the use of expensive Subject Matter Experts (SMEs), who are often not fully aware of many aspects of their databases. In this paper, we explore techniques for automatic metadata extraction to enable text-to-SQL generation. We explore the use of two standard and one newer metadata extraction techniques: profiling, query log analysis, and SQL-to text generation using an LLM. We use BIRD benchmark [JHQY+23] to evaluate the effectiveness of these techniques. BIRD does not provide query logs on their test database, so we prepared a submission that uses profiling alone, and does not use any specially tuned model (we used GPT-4o). From Sept 1 to Sept 23, 2024, and Nov 11 through Nov 23, 2024 we achieved the highest score both with and without using the "oracle" information provided with the question set. We regained the number 1 spot on Mar 11, 2025, and are still at #1 at the time of the writing (May, 2025).

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 3 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. DeepEye-SQL: A Software-Engineering-Inspired Text-to-SQL Framework

    cs.DB 2025-10 unverdicted novelty 7.0

    DeepEye-SQL applies SDLC-inspired orchestration to Text-to-SQL, achieving 73.5% on BIRD-Dev, 75.07% on BIRD-Test, and 89.8% on Spider-Test with ~30B MoE models.

  2. Data-aware candidate selection in NL2SQL translation via small separating instances

    cs.DB 2026-05 unverdicted novelty 6.0

    A selection technique based on separating instances and provenance outperforms baselines for choosing among 2-3 NL2SQL candidates on a BIRD-DEV subset without consistency scores.

  3. Sophrosyne: Agentic Exploration of Relational Data Systems Needs Moderation

    cs.DB 2026-05 unverdicted novelty 5.0

    Sophrosyne augments fine-grained data APIs with directives to curb over-exploration by Text2SQL agents, reducing it 4.6x and improving accuracy up to 4 points.