[Paper Review] Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLs
Bird is a large-scale cross-domain Text-to-SQL benchmark focused on real-world databases with large values, noisy data, external knowledge grounding, and execution efficiency, showing current SOTA LLMs lag far behind human performance.
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 the new challenges of dirty database contents, external knowledge between NL questions and database contents, and SQL efficiency, particularly in the context of massive databases. To solve these problems, text-to-SQL models must feature database value comprehension in addition to semantic parsing. The experimental results demonstrate the significance of database values in generating accurate text-to-SQLs for big databases. Furthermore, even the most effective text-to-SQL models, i.e. ChatGPT, only achieves 40.08% in execution accuracy, which is still far from the human result of 92.96%, proving that challenges still stand. Besides, we also provide an efficiency analysis to offer insights into generating text-to-efficient-SQLs that are beneficial to industries. We believe that BIRD will contribute to advancing real-world applications of text-to-SQL research. The leaderboard and source code are available: https://bird-bench.github.io/.
Motivation & Objective
- Address the gap between academic Text-to-SQL benchmarks and real-world applications with large, noisy databases.
- Introduce a large-scale benchmark (Bird) emphasizing database values, external knowledge, and execution efficiency.
- Provide evaluation metrics and baselines to reveal current model limitations and guide future research.
Proposed method
- Curate 12,751 text-to-SQL pairs over 95 databases (33.4 GB) from 37 domains.
- Develop Database Description Files and external knowledge evidence categories to aid annotation.
- Use a double-blind SQL annotation process to obtain ground-truth SQLs and ensure validity.
- Define Valid Efficiency Score (VES) to jointly assess execution validity and efficiency of SQLs.
- Evaluate fine-tuning (FT) with T5 models and in-context learning (ICL) with LLMs (ChatGPT, Claude-2, GPT-4, etc.) under w/ knowledge and w/o knowledge settings.
- Compare Bird against Spider and WikiSQL to illustrate increased difficulty due to large values and noise.
Experimental results
Research questions
- RQ1Can LLMs generalize to large-scale databases with noisy values in Text-to-SQL tasks?
- RQ2How do external knowledge grounding and execution efficiency impact text-to-SQL performance on real-world, large databases?
- RQ3What is the gap between current SOTA models (LLMs) and human performance in Bird, and why?
- RQ4How do different annotation and evaluation setups (e.g., double-blind SQL annotation, knowledge evidence) affect benchmark results?
Key findings
- Bird contains 12,751 examples over 95 databases (33.4 GB) across 37 domains, highlighting real-world value challenges.
- Even the strongest LLMs (GPT-4) achieve only 54.89% execution accuracy, far below human performance (92.96%).
- External knowledge evidence markedly improves model performance across difficulty levels.
- Knowledge grounding, database value comprehension, and query efficiency are critical for real-world Text-to-SQL success.
- Two-stage optimization (semantic parsing then SQL optimization) can yield substantial speedups (average ~77.75% time saving) while preserving results.
- Chat-with-Database and index tuning can yield up to ~87.3% time savings for SQL queries.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.