Scaling Text2SQL via LLM-efficient Schema Filtering with Functional Dependency Graph Rerankers
Not on the map. Why?
Abstract (arXiv)
Most modern Text2SQL systems prompt large language models (LLMs) with entire schemas -- mostly column information -- alongside the user's question. While effective on small databases, this approach fails on real-world schemas that exceed LLM context limits, even for commercial models. The recent Spider 2.0 benchmark exemplifies this with hundreds of tables and tens of thousands of columns, where existing systems often break. Current mitigations either rely on costly multi-step prompting pipelines or filter columns by ranking them against user's question independently, ignoring inter-column structure. To scale existing systems, we introduce toolname, an open-source, LLM-efficient schema filtering framework that compacts Text2SQL prompts by (i) ranking columns with a query-aware LLM encoder enriched with values and metadata, (ii) reranking inter-connected columns via a lightweight graph transformer over functional dependencies, and (iii) selecting a connectivity-preserving sub-schema with a Steiner-tree heuristic. Experiments on real datasets show that toolname achieves near-perfect recall and higher precision than CodeS, SchemaExP, Qwen rerankers, and embedding retrievers, while maintaining sub-second median latency and scaling to schemas with 23,000+ columns. Our source code is available at https://github.com/thanhdath/grast-sql.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 25 of its 39 references that are in the map. First posted on arXiv 18 Dec 2025.
Builds on
25 of 39 references.
References · 25
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2024M3-Embedding: Multi-Linguality, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillationcited by 1,050
- 2023StarCoder: may the source be with you!cited by 790
- 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 679
- 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 667
- 2019Graph Transformer Networkscited by 520
- 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 465
- 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 420
- 2024Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflowscited by 223
- 2019Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representationcited by 210
- 2023RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLcited by 191
13 more
- 2024CodeS: Towards Building Open-source Language Models for Text-to-SQLcited by 183
- 2024CHESS: Contextual Harnessing for Efficient SQL Synthesiscited by 164
- 2023C3: Zero-shot Text-to-SQL with ChatGPTcited by 159
- 2023MAC-SQL: A Multi-Agent Collaborative Framework for Text-to-SQLcited by 158
- 2017SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learningcited by 135
- 2020Bridging Textual and Tabular Data for Cross-Domain Text-to-SQL Semantic Parsingcited by 133
- 2018TypeSQL: Knowledge-based Type-Aware Neural Text-to-SQL Generationcited by 81
- 2018SyntaxSQLNet: Syntax Tree Networks for Complex and Cross-DomainText-to-SQL Taskcited by 74
- 2019Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsingcited by 74
- 2019Global Reasoning over Database Structures for Text-to-SQL Parsingcited by 43
- 2023SQL-PaLM: Improved Large Language Model Adaptation for Text-to-SQL (extended)cited by 42
- 2021ShadowGNN: Graph Projection Neural Network for Text-to-SQL Parsercited by 35
- 2024PURPLE: Making a Large Language Model a Better SQL Writercited by 34
Built on by
Citing papers per year: 2026: 1.
1 paper.