Agrahari, A.; Ojha, P.K.; Gautam, A.; Singh, P. SFT For Improved Text-to-SQL Translation. Preprints2024, 2024020693. https://doi.org/10.20944/preprints202402.0693.v1
APA Style
Agrahari, A., Ojha, P.K., Gautam, A., & Singh, P. (2024). SFT For Improved Text-to-SQL Translation. Preprints. https://doi.org/10.20944/preprints202402.0693.v1
Chicago/Turabian Style
Agrahari, A., Abhishek Gautam and Parikshit Singh. 2024 "SFT For Improved Text-to-SQL Translation" Preprints. 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.