Article
Version 1
Preserved in Portico This version is not peer-reviewed
SFT For Improved Text-to-SQL Translation
Version 1
: Received: 8 February 2024 / Approved: 12 February 2024 / Online: 13 February 2024 (03:07:37 CET)
How to cite: Agrahari, A.; Ojha, P. K.; Gautam, A.; Singh, P. SFT For Improved Text-to-SQL Translation. Preprints 2024, 2024020693. https://doi.org/10.20944/preprints202402.0693.v1 Agrahari, A.; Ojha, P. K.; Gautam, A.; Singh, P. SFT For Improved Text-to-SQL Translation. Preprints 2024, 2024020693. https://doi.org/10.20944/preprints202402.0693.v1
Abstract
Large Language Models (LLMs) have proved significant proficiency when comes to code generation especially in Structured Query Language (SQL) for databases and recent successful Text-to-SQL method involves fine-tuning pre-trained LLMs for SQL generation tasks. Transforming natural language text into SQL queries, has been attempted to solve with various learning techniques including Few-shot learning[1], fine tuning. In this paper we propose Supervised fine-tuning (SFT) as a better alternative for learning technique for text-to-SQL generation task using Code-Llama that pushes state of art accuracy on spider test suite to 89.6% on dev set which represent first instance of surpassing the earlier best-in-class with 5.5% higher score and 86.8% of exact match accuracy on dev set. Furthermore, we demonstrate that properly prompted LLM along with SFT provides far fewer hallucinations and much more robust LLM that can be used as a general tool for any text-to-SQL generation use case.
Keywords
Text-to-sql
Subject
Computer Science and Mathematics, Artificial Intelligence and Machine Learning
Copyright: This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Comments (0)
We encourage comments and feedback from a broad range of readers. See criteria for comments and our Diversity statement.
Leave a public commentSend a private comment to the author(s)
* All users must log in before leaving a comment