DataGpt-SQL-7B: An Open-Source Language Model for Text-to-SQL

24 Sep 2024  ·  Lixia Wu, Peng Li, Junhong Lou, Lei Fu ·

In addressing the pivotal role of translating natural language queries into SQL commands, we propose a suite of compact, fine-tuned models and self-refine mechanisms to democratize data access and analysis for non-expert users, mitigating risks associated with closed-source Large Language Models. Specifically, we constructed a dataset of over 20K sample for Text-to-SQL as well as the preference dateset, to improve the efficiency in the domain of SQL generation. To further ensure code validity, a code corrector was integrated into the model. Our system, DataGpt-sql, achieved 87.2\% accuracy on the spider-dev, respectively, showcasing the effectiveness of our solution in text-to-SQL conversion tasks. Our code, data, and models are available at \url{https://github.com/CainiaoTechAi/datagpt-sql-7b}

PDF Abstract

Datasets


Results from the Paper


 Ranked #1 on Text-To-SQL on spider (Exact Match Accuracy (Dev) metric, using extra training data)

     Get a GitHub badge
Task Dataset Model Metric Name Metric Value Global Rank Uses Extra
Training Data
Result Benchmark
Text-To-SQL spider datagpt-sql-7B Exact Match Accuracy (Dev) 80.3 # 3
Execution Accuracy (Dev) 84.8 # 2
Text-To-SQL spider datagpt-sql-7B + InvalidSQL-Feedback Exact Match Accuracy (Dev) 81.6 # 1
Execution Accuracy (Dev) 87.2 # 1

Methods


No methods listed for this paper. Add relevant methods here