CLDBIRDec 6, 2023

DBCopilot: Natural Language Querying over Massive Databases via Schema Routing

arXiv:2312.03463v315 citationsh-index: 29EDBT
AI Analysis

This addresses the challenge of scaling natural language interfaces to databases for real-world applications, though it appears incremental by building on existing LLM-based methods.

The paper tackles the problem of natural language querying over massive databases by introducing DBCopilot, a framework that decouples schema-agnostic NL2SQL into schema routing and SQL generation, resulting in a scalable and effective solution that advances handling such queries for NLIDBs.

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.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes