HyperAIHyperAI
2 months ago

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

Wu, Lixia ; Li, Peng ; Lou, Junhong ; Fu, Lei
DataGpt-SQL-7B: An Open-Source Language Model for Text-to-SQL
Abstract

In addressing the pivotal role of translating natural language queries intoSQL commands, we propose a suite of compact, fine-tuned models and self-refinemechanisms 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 aswell as the preference dateset, to improve the efficiency in the domain of SQLgeneration. To further ensure code validity, a code corrector was integratedinto the model. Our system, DataGpt-sql, achieved 87.2\% accuracy on thespider-dev, respectively, showcasing the effectiveness of our solution intext-to-SQL conversion tasks. Our code, data, and models are available at\url{https://github.com/CainiaoTechAi/datagpt-sql-7b}