DBCopilot: Natural Language Querying over Massive Databases via Schema Routing
Authors: Tianshu Wang, Xiaoyang Chen, Hongyu Lin, Xianpei Han, Le Sun, Hao Wang, Zhenyu Zeng
Abstract
The development of Natural Language Interfaces to Databases (NLIDBs) has been greatly advanced by the advent of large language models (LLMs), which provide an intuitive way to translate natural language (NL) questions into Structured Query Language (SQL) queries. While significant progress has been made in LLM-based NL2SQL, existing approaches face several challenges in real-world scenarios of natural language querying over massive databases. In this paper, we present DBCopilot, a framework that addresses these challenges by employing a compact and flexible copilot model for routing over massive databases. Specifically, DBCopilot decouples schema-agnostic NL2SQL into schema routing and SQL generation. This framework utilizes a single lightweight differentiable search index to construct semantic mappings for massive database schemata, and navigates natural language questions to their target databases and tables in a relation-aware joint retrieval manner. The routed schemata and questions are then fed into LLMs for effective SQL generation. Furthermore, DBCopilot introduces a reverse schema-to-question generation paradigm that can automatically learn and adapt the router over massive databases without manual intervention. Experimental results verify that DBCopilot is a scalable and effective solution for schema-agnostic NL2SQL, providing a significant advance in handling natural language querying over massive databases for NLIDBs.
The papers around it, by date and closeness
Higher is closer to this paper; left is older. Lines join papers close to each other: groups of lines are sub-topics. Select a point to see why it is there. Back to the summary of this paper
Papers around this one
Ranked by how close their title and abstract are to this paper’s. Select some to read them together.
Closest papers
-
DBCopilot: Scaling Natural Language Querying to Massive DatabasesTianshu Wang, Hong-Yu Lin, Xian-Pei Han et al. · 2023 · arXiv.org · preprint, not peer reviewed · cited 20 times · Not summarized yet
DBCopilot: Scaling Natural Language Querying to Massive Databases addresses natural-language querying over massive databases, the same target as this paper.
-
NLI4DB: A Systematic Review of Natural Language Interfaces for DatabasesMengyi Liu, Jianqiu Xu · 2025 · Databases · preprint, not peer reviewed · cited 15 times · AI summary available
NLI4DB surveys natural-language interfaces for databases, placing the paper’s NLIDB problem within prior systems and translation approaches.
Abstract
As the demand for querying databases in all areas of life continues to grow, researchers have devoted significant attention to the natural language interface for databases (NLIDB). This paper presents a comprehensive survey of recently proposed NLIDBs. We begin with a brief introduction to natural language processing techniques, executable database languages and the intermediate representation between natural language and executable language, and then provide an overview of the translation process from natural language to executable database language. The translation process is divided into three stages: (i) natural language preprocessing, (ii) natural language understanding, and (iii) natur…
-
NL2SQL-OLM: A Novel Framework for Natural Language to SQL with Schema-Aware LLM Prompting and Zero-Shot Query GenerationRam Ghadiyaram, Durga Krishnamoorthy, Laxmi Vanam et al. · 2025 · 2025 IEEE International Conference on Advances in Data-Driven Analytics And Intelligent Systems (ADACIS) · Not summarized yet
NL2SQL-OLM uses automatic schema extraction and schema-aware LLM prompting for zero-shot SQL generation, rather than routing across massive schemas.
Abstract
This paper presents NL2SQL-OLM, a novel framework for converting natural language queries to SQL statements utilizing DeepSeek-Coder large language model, that is integrated with automatic database schema extraction and a schema-aware prompting strategy. While text-to-SQL systems have been extensively studied, the integration of pre-trained open-source LLMs with database schema extraction for zero-shot query generation remains underexplored. We address this research gap by proposing a schema-aware prompting architecture that eliminates the need for manually providing database structural information. Through automatic extraction of database metadata and its strategic incorporation into LLM co…
-
NL2Database: A Text-to-SQL Framework for Seamless Natural Language Interaction with Relational DatabasesD. Ramya, N. Devi, B. P. Murthy et al. · 2025 · 2025 5th International Conference on Mobile Networks and Wireless Communications (ICMNWC) · Not summarized yet
NL2Database translates natural-language questions into SQL for relational databases using semantic parsing, query optimization, and schema adaptation.
Abstract
The complexity of Structured Query Language (SQL) often restricts non-technical users from efficiently accessing information stored in relational databases. To address this limitation, this paper presents NL2Database, an intelligent text-to-SQL system designed to enable seamless natural language interaction with relational databases. The proposed framework leverages natural language processing (NLP) techniques and deep learning models to accurately translate user queries expressed in natural language into executable SQL statements. NL2Database incorporates semantic parsing, query optimization, and database schema adaptation to enhance translation accuracy and scalability across diverse domai…
-
DBTagger: Multi-Task Learning for Keyword Mapping in NLIDBs Using Bi-Directional Recurrent Neural NetworksArif Usta, Akifhan Karakayali, Özgür Ulusoy · 2021 · Databases · cited 13 times · AI summary available
DBTagger maps query keywords to database elements with multi-task recurrent neural networks, addressing a component of natural-language-to-SQL processing.
Abstract
Translating Natural Language Queries (NLQs) to Structured Query Language (SQL) in interfaces deployed in relational databases is a challenging task, which has been widely studied in database community recently. Conventional rule based systems utilize series of solutions as a pipeline to deal with each step of this task, namely stop word filtering, tokenization, stemming/lemmatization, parsing, tagging, and translation. Recent works have mostly focused on the translation step overlooking the earlier steps by using ad-hoc solutions. In the pipeline, one of the most critical and challenging problems is keyword mapping; constructing a mapping between tokens in the query and relational database e…
-
Advancing NLIDB Systems with T5-RAG: An Encoder-Decoder Approach to SQL Query GenerationM. Potdar, M. Potdar, Shubhangi M. Potdar · 2025 · 2025 International Conference on Electronics and Computing, Communication Networking Automation Technologies (ICEC2NT) · Not summarized yet
T5-RAG retrieves schema information for an encoder-decoder SQL generator, addressing schema scale with a different retrieval-and-generation design.
Abstract
Interacting with relational databases often requires expertise in Structured Query Language (SQL), which limits accessibility for non-technical users. Natural Language Interfaces to Databases (NLIDBs) aim to bridge this gap by translating user questions in plain language into executable SQL queries. Recent developments in large language models (LLMs) have improved this translation process, yet decoder-only models face challenges in handling large schemas, generating accurate queries in complex scenarios, and managing prompt length efficiently. This study presents a hybrid approach that integrates a Retrieval-Augmented Generation (RAG) framework with an encoder-decoder model based on the Text…
-
NL2SQLBench: A Modular Benchmarking Framework for LLM-Enabled NL2SQL SolutionsShizheng Hou, Wen-Qi Pei, Nuo Chen et al. · 2026 · Proceedings of the VLDB Endowment · cited 1 time · Not summarized yet
NL2SQLBench provides a modular evaluation framework for LLM-based NL2SQL, including schema selection, a component central to DBCopilot.
Abstract
Natural Language to SQL (NL2SQL) technology empowers nonexpert users to query relational databases without requiring SQL expertise. While large language models (LLMs) have greatly improved NL2SQL algorithms, their rapid development outpaces systematic evaluation, leaving a critical gap in understanding their effectiveness, efficiency, and limitations. To this end, we present NL2SQLBench , the first modular evaluation and benchmarking framework for LLM-enabled NL2SQL approaches. Specifically, we dissect NL2SQL systems into three core modules: Schema Selection, Candidate Generation, and Query Revision. For each module, we comprehensively review existing strategies and propose novel finegrained…
-
Natural Language to SQL Using Large Language ModelsGuosong Zhan, Ge Shi, Xiaoguo Liu et al. · 2025 · International Conference on Natural Computation, Fuzzy Systems and Knowledge Discovery · cited 1 time · Not summarized yet
Natural Language to SQL Using Large Language Models surveys LLM-based NL2SQL methods and cites DBCopilot.
Abstract
This survey provides a comprehensive overview of the transformative impact of Large Language Models (LLMs) on the field of NL2SQL. NL2SQL(aka Text2SQL), the task of converting natural language questions into executable SQL queries, is crucial for democratizing data access, bridging the gap between human language and structured database querying statement. A significant paradigm shift has occurred in this field, redirecting the focus from rule-based method or training models from scratch to adapting pretrained large language models, which has considerably advanced NL2SQL capabilities. The advancements driven by LLMs have not only enhanced accuracy but have also fundamentally altered research …
Prior work it builds on
-
Interleaving Pre-Trained Language Models and Large Language Models for Zero-Shot NL2SQL GenerationZihui Gu, Ju Fan, Nan Tang et al. · 2023 · arXiv.org · preprint, not peer reviewed · cited 43 times · Not summarized yet
ZeroNL2SQL combines pretrained language models for schema alignment with LLM reasoning in zero-shot SQL generation, and the paper cites it.
Abstract
Zero-shot NL2SQL is crucial in achieving natural language to SQL that is adaptive to new environments (e.g., new databases, new linguistic phenomena or SQL structures) with zero annotated NL2SQL samples from such environments. Existing approaches either fine-tune pre-trained language models (PLMs) based on annotated data or use prompts to guide fixed large language models (LLMs) such as ChatGPT. PLMs can perform well in schema alignment but struggle to achieve complex reasoning, while LLMs is superior in complex reasoning tasks but cannot achieve precise schema alignment. In this paper, we propose a ZeroNL2SQL framework that combines the complementary advantages of PLMs and LLMs for supporti…
-
Natural language interfaces to databases – an introductionIon Androutsopoulos, Graeme D. Ritchie, P. Thanisch · 1995 · Natural Language Engineering · cited 953 times · Not summarized yet
Natural language interfaces to databases – an introduction discusses NLIDB architectures and portability, and the paper cites it as background.
Abstract
Abstract This paper is an introduction to natural language interfaces to databases (NLIDBS). A brief overview of the history of NLIDBS is first given. Some advantages and disadvantages of NLIDBS are then discussed, comparing NLIDBS to formal query languages, form-based interfaces, and graphical interfaces. An introduction to some of the linguistic problems NLIDBS have to confront follows, for the benefit of readers less familiar with computational linguistics. The discussion then moves on to NLIDB architectures, portability issues, restricted natural language input systems (including menu-based NLIDBS), and NLIDBS with reasoning capabilities. Some less explored areas of NLIDB research are th…
-
DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-CorrectionMohammadreza Pourreza, Davood Rafiei · 2023 · Computation and Language · cited 981 times · AI summary available
DIN-SQL decomposes text-to-SQL into subproblems and uses self-correction to improve LLM performance, and the paper cites it.
Abstract
We study the problem of decomposing a complex text-to-sql task into smaller sub-tasks and how such a decomposition can significantly improve the performance of Large Language Models (LLMs) in the reasoning process. There is currently a significant gap between the performance of fine-tuned models and prompting approaches using LLMs on challenging text-to-sql datasets such as Spider. We show that SQL queries, despite their declarative structure, can be broken down into sub-problems and the solutions of those sub-problems can be fed into LLMs to significantly improve their performance. Our experiments with three LLMs show that this approach consistently improves their performance by roughly 10%…
-
Text-to-SQL Empowered by Large Language Models: A Benchmark EvaluationDa-Wei Gao, Haibin Wang, Ya-Liang Li et al. · 2023 · Proceedings of the VLDB Endowment · cited 856 times · Not summarized yet
DAIL-SQL evaluates prompt-engineering methods for Text-to-SQL and proposes an integrated solution, which the paper cites.
Abstract
Large language models (LLMs) have emerged as a new paradigm for Text-to-SQL task. However, the absence of a systematical benchmark inhibits the development of designing effective, efficient and economic LLM-based Text-to-SQL solutions. To address this challenge, in this paper, we first conduct a systematical and extensive comparison over existing prompt engineering methods, including question representation, example selection and example organization, and with these experimental results, we elaborate their pros and cons. Based on these findings, we propose a new integrated solution, named DAIL-SQL, which refreshes the Spider leaderboard with 86.6% execution accuracy and sets a new bar. To ex…
-
Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLsJinyang Li, Binyuan Hui, Ge Qu et al. · 2023 · Computation and Language · cited 1,356 times · AI summary available
BIRD supplies a large-scale, database-grounded Text-to-SQL benchmark that the paper cites when discussing real-world querying challenges.
Abstract
Text-to-SQL parsing, which aims at converting natural language instructions into executable SQLs, has gained increasing attention in recent years. In particular, Codex and ChatGPT have shown impressive results in this task. However, most of the prevalent benchmarks, i.e., Spider, and WikiSQL, focus on database schema with few rows of database contents leaving the gap between academic study and real-world applications. To mitigate this gap, we present Bird, a big benchmark for large-scale database grounded in text-to-SQL tasks, containing 12,751 pairs of text-to-SQL data and 95 databases with a total size of 33.4 GB, spanning 37 professional domains. Our emphasis on database values highlights…
Papers that cite it
-
SSRB: Direct Natural Language Querying to Massive Heterogeneous Semi-Structured DataXin Zhang, Mingxin Li, Yanzhao Zhang et al. · 2025 · Neural Information Processing Systems · cited 3 times · Not summarized yet
SSRB targets natural-language search over massive heterogeneous semi-structured data, sharing the challenge of querying across varied schemas.
Abstract
Searching over semi-structured data with natural language (NL) queries has at-tracted sustained attention, enabling broader audiences to access information easily. As more applications, such as LLM agents and RAG systems, emerge to search and interact with semi-structured data, two major challenges have become evident: (1) the increasing diversity of domains and schema variations, making domain-customized solutions prohibitively costly; (2) the growing complexity of NL queries, which combine both exact field matching conditions and fuzzy semantic requirements, often involving multiple fields and implicit reasoning. These challenges make formal language querying or keyword-based search insuff…
-
SchemaGraphSQL: Efficient Schema Linking with Pathfinding Graph Algorithms for Text-to-SQL on Large-Scale DatabasesAmir Safdarian, Milad Mohammadi, Ehsan Jahanbakhsh et al. · 2025 · Conference of the European Chapter of the Association for Computational Linguistics · cited 8 times · Not summarized yet
SchemaGraphSQL links questions to large-database schemas using foreign-key graphs and pathfinding, a different approach to schema routing.
Abstract
Text-to-SQL systems translate natural language questions into executable SQL queries, and recent progress with large language models (LLMs) has driven substantial improvements in this task. Schema linking remains a critical component in Text-to-SQL systems, reducing prompt size for models with narrow context windows and sharpening model focus even when the entire schema fits. We present a zero-shot, training-free schema linking approach that first constructs a schema graph based on foreign key relations, then uses a single prompt to Gemini 2.5 Flash to extract source and destination tables from the user query, followed by applying classical path-finding algorithms and post-processing to iden…
-
A robust natural language text-to-SQL generation framework with dynamic strategies based on LLMsXi Su, Yanggan Gu, Peng Wang et al. · 2026 · Scientific Reports · cited 4 times · Not summarized yet
TriSQL selects relevant schemas and adapts SQL-generation strategies to question complexity, offering a different schema-selection approach.
Abstract
Natural language text-to-SQL generation (Text2SQL) aims to translate natural language questions into executable SQL queries. Although the emergence of large language models (LLMs) has led to significant advancements in this field, their performance degrades sharply with question complexity increases. A key limitation of current LLM-based methods lies in their uniform generation strategies, which fail to adapt dynamically to varying question complexity. To address this issue, we propose TriSQL, a novel three-stage framework designed to analyze question complexity and generate accurate and executable SQL. First, a Question-Guided Schema Selector is conceived to get the most relevant schema to …
-
Can LLMs Narrate Tabular Data? An Evaluation Framework for Natural Language Representations of Text-to-SQL System OutputsJyotika Singh, Wei-Yi Sun, Amit Agarwal et al. · 2025 · Conference on Empirical Methods in Natural Language Processing · cited 8 times · Not summarized yet
Combo-Eval evaluates natural-language descriptions of Text-to-SQL outputs rather than routing questions to schemas or generating SQL.
Abstract
In modern industry systems like multi-turn chat agents, Text-to-SQL technology bridges natural language (NL) questions and database (DB) querying. The conversion of tabular DB results into NL representations (NLRs) enables the chat-based interaction. Currently, NLR generation is typically handled by large language models (LLMs), but information loss or errors in presenting tabular results in NL remains largely unexplored. This paper introduces a novel evaluation method - Combo-Eval - for judgment of LLM-generated NLRs that combines the benefits of multiple existing methods, optimizing evaluation fidelity and achieving a significant reduction in LLM calls by 25-61%. Accompanying our method is…
-
CoeusBI: A Comprehensive Interactive Business Intelligence System Powered by LLMs at Baidu [Extended Version]Jin-Qing Lian, Chao-Fan Li, Yingxia Shao et al. · 2026 · Proceedings of the VLDB Endowment · cited 1 time · Not summarized yet
CoeusBI addresses schema linking and SQL generation in an industrial interactive BI system, a broader deployment setting related to database querying.
Abstract
The advent of Large Language Models has catalyzed the emergence of interactive Business Intelligence (BI) systems. Although commercial BI products increasingly adopt semantic layers paired with natural language interfaces, they predominantly rely on manual configurations to define metrics and dimensions. Real-world deployments continue to face critical challenges: (a) frequent JOIN operations degrade the accuracy of SQL generation; (b) wide schemas exacerbate the challenge of schema linking; and (c) the generation of dialect-specific queries and the accurate support for multi-round dialogues incur high costs and yield limited accuracy. We introduce CoeusBI, an industrial-scale interactive BI…
Go further
How are these papers found?
We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.
Updated on 1 November 2026.