Scaling Text2SQL via LLM-efficient Schema Filtering with Functional Dependency Graph Rerankers
- URL: http://arxiv.org/abs/2512.16083v1
- Date: Thu, 18 Dec 2025 01:59:06 GMT
- Title: Scaling Text2SQL via LLM-efficient Schema Filtering with Functional Dependency Graph Rerankers
- Authors: Thanh Dat Hoang, Thanh Tam Nguyen, Thanh Trung Huynh, Hongzhi Yin, Quoc Viet Hung Nguyen,
- Abstract summary: Most modern Text2 systems prompt large language models (LLMs) with entire schemas alongside the user's question.<n>toolname is an open-source framework that compacts Text2 prompts by ranking columns with a query-aware re-ranking.<n>Experiments show that toolname achieves near-perfect recall and higher precision than CodeS, encoderExP, Qwen rerankers, and embedding retrievers.
- Score: 38.94000136647706
- License: http://creativecommons.org/licenses/by-nc-nd/4.0/
- Abstract: 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.
Related papers
- CORE-T: COherent REtrieval of Tables for Text-to-SQL [91.76918495375384]
CORE-T is a scalable, training-free framework that enriches tables with purpose metadata and pre-computes a lightweight table-compatibility cache.<n>Across Bird, Spider, and MMQA, CORE-T improves table-selection F1 by up to 22.7 points while retrieving up to 42% fewer tables.
arXiv Detail & Related papers (2026-01-19T14:51:23Z) - AutoLink: Autonomous Schema Exploration and Expansion for Scalable Schema Linking in Text-to-SQL at Scale [68.29002818359844]
Existing methods incur prohibitive costs, struggle to trade off recall and noise, and scale poorly to large databases.<n>We present textbfAutoLink, an autonomous agent framework that reformulates schema linking as an iterative, agent-driven process.<n>Experiments demonstrate AutoLink's superior performance, achieving state-of-the-art strict schema linking recall, i.e., textbf68.7% EX on Bird-Dev (better than CHESS) and textbf34.9% EX on Spider-2.0-Lite (ranking 2nd
arXiv Detail & Related papers (2025-11-21T12:12:17Z) - SchemaGraphSQL: Efficient Schema Linking with Pathfinding Graph Algorithms for Text-to-SQL on Large-Scale Databases [1.6544167074080365]
We present a zero-shot, training-free schema linking approach that first constructs a schema graph based on foreign key relations.<n>We apply classical path-finding algorithms and post-processing to identify the optimal sequence of tables and columns that should be joined.<n>Our method achieves state-of-the-art results on the BIRD benchmark, outperforming previous specialized, fine-tuned, and complex multi-step LLM-based approaches.
arXiv Detail & Related papers (2025-05-23T20:42:36Z) - UNJOIN: Enhancing Multi-Table Text-to-SQL Generation via Schema Simplification [50.59009084277447]
We introduce UNJOIN, a framework that decouples the retrieval of schema elements from logic generation.<n>In the first stage, we merge the column names of all tables in the database into a single-table representation by prefixing each column with its table name.<n>In the second stage, the query is generated on this simplified schema and mapped back to the original schema by reconstructing JOINs, UNIONs, and relational logic.
arXiv Detail & Related papers (2025-05-23T17:28:43Z) - LinkAlign: Scalable Schema Linking for Real-World Large-Scale Multi-Database Text-to-SQL [24.740161980003652]
LinkAlign is a novel framework tailored for large-scale databases with thousands of fields.<n>LinkAlign consistently outperforms existing baselines on all schema linking metrics.<n>It achieves a new state-of-the-art score of 33.09% on the Spider 2.0-Lite benchmark.
arXiv Detail & Related papers (2025-03-24T11:53:06Z) - PSM-SQL: Progressive Schema Learning with Multi-granularity Semantics for Text-to-SQL [8.416319689644556]
It is challenging to convert tasks due to the vast number of database schemas with redundancy.<n>We propose a progressive schema linking with multi-granularity semantics (PSM-)<n>PSM- learns the schema semantics at the column, table, and database levels.
arXiv Detail & Related papers (2025-02-07T08:31:57Z) - Extractive Schema Linking for Text-to-SQL [17.757832644216446]
Text-to-one is emerging as a practical interface for real world databases.<n>We introduce a new approach to adapt decoder-only LLMs to schema linking.
arXiv Detail & Related papers (2025-01-23T19:57:08Z) - RSL-SQL: Robust Schema Linking in Text-to-SQL Generation [51.00761167842468]
We propose a novel framework called RSL- that combines bidirectional schema linking, contextual information augmentation, binary selection strategy, and multi-turn self-correction.
benchmarks demonstrate that our approach achieves SOTA execution accuracy among open-source solutions, with 67.2% on BIRD and 87.9% on GPT-4ocorrection.
Our approach outperforms a series of GPT-4 based Text-to-Seek systems when adopting DeepSeek (much cheaper) with same intact prompts.
arXiv Detail & Related papers (2024-10-31T16:22:26Z) - The Death of Schema Linking? Text-to-SQL in the Age of Well-Reasoned Language Models [0.9149661171430259]
We revisit schema linking when using the latest generation of large language models (LLMs)
We find empirically that newer models are adept at utilizing relevant schema elements during generation even in the presence of large numbers of irrelevant ones.
Instead of filtering contextual information, we highlight techniques such as augmentation, selection, and correction, and adopt them to improve the accuracy of our Text-to-BIRD pipeline.
arXiv Detail & Related papers (2024-08-14T17:59:04Z) - RB-SQL: A Retrieval-based LLM Framework for Text-to-SQL [48.516004807486745]
Large language models (LLMs) with in-context learning have significantly improved the performance of text-to- task.
We propose RB-, a novel retrieval-based framework for in-context prompt engineering.
Experiment results demonstrate that our model achieves better performance than several competitive baselines on public datasets BIRD and Spider.
arXiv Detail & Related papers (2024-07-11T08:19:58Z) - CRUSH4SQL: Collective Retrieval Using Schema Hallucination For Text2SQL [47.14954737590405]
Existing text-to-text generators require the entire schema to be encoded with user text.
Standard dense retrieval techniques are inadequate for schema subsetting a large structured database.
We introduce three benchmarks for schema subsetting on large databases.
arXiv Detail & Related papers (2023-11-02T12:13:52Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.