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

Lixia Wu, Peng Li, Junhong Lou, Lei Fu
9/24/2024
cs.AI

Official code: CainiaoTechAi/datagpt-sql-7b (7 stars, last commit 2024-09-11).

Abstract

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}

View on arXivView PDF

Code Implementations(1)

70Sep 11, 20242 years ago

Similar Papers

Cite this paper

@article{wu2024datagptsqlb,
  title  = {DataGpt-SQL-7B: An Open-Source Language Model for Text-to-SQL},
  author = {Lixia Wu and Peng Li and Junhong Lou and Lei Fu},
  year   = {2024},
  eprint = {2409.15985},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.15985v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.15985.svg)](https://codeofpaper.com/paper/2409.15985)

Discussion