A comprehensive evaluation of ChatGPT's zero-shot Text-to-SQL capability
Preprint
Abstract
This paper presents the first comprehensive analysis of ChatGPT's Text-to-SQL ability. Given the recent emergence of large-scale conversational language model ChatGPT and its impressive capabilities in both conversational abilities and code generation, we sought to evaluate its Text-to-SQL performance. We conducted experiments on 12 benchmark datasets with different languages, settings, or scenarios, and the results demonstrate that ChatGPT has strong text-to-SQL abilities. Although there is still a gap from the current state-of-the-art (SOTA) model performance, considering that the experiment was conducted in a zero-shot scenario, ChatGPT's performance is still impressive. Notably, in the ADVETA (RPL) scenario, the zero-shot ChatGPT even outperforms the SOTA model that requires fine-tuning on the Spider dataset by 4.1\%, demonstrating its potential for use in practical applications. To support further research in related fields, we have made the data generated by ChatGPT publicly available at https://github.com/THU-BPM/chatgpt-sql.Keywords
All Related Versions
This publication has 14 references indexed in Scilit:
- CQR-SQL: Conversational Question Reformulation Enhanced Context-Dependent Text-to-SQL Parsers2022
- STAR: SQL Guided Pre-Training for Context-dependent Text-to-SQL Parsing2022
- RASAT: Integrating Relational Structures into Pretrained Seq2Seq Model for Text-to-SQL2022
- Measuring and Improving Compositional Generalization in Text-to-SQL via Component Alignment2022
- Towards Robustness of Text-to-SQL Models Against Natural and Realistic Adversarial Table Perturbation2022
- Exploring Underexplored Limitations of Cross-Domain Text-to-SQL Generalization2021
- PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Models2021
- LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relations2021
- Semantic Evaluation for Text-to-SQL with Distilled Test Suites2020
- RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parsers2020