Prompt Tuning for Natural Language to SQL with Embedding Fine-Tuning and RAG
Jisoo Jang, Tien-Cuong Bui, Yunjun Choi, Wen-Syan Li

TL;DR
This paper presents a novel NL-to-SQL translation framework that combines prompt tuning, embedding fine-tuning, and RAG to improve accuracy and error correction, significantly advancing natural language interfaces for databases.
Contribution
It introduces an error correction mechanism integrated with prompt tuning, embedding fine-tuning, and RAG, offering a new approach for more accurate NL-to-SQL translation.
Findings
Achieves 12% accuracy improvement over baselines
Effectively diagnoses and corrects errors in SQL queries
Utilizes external knowledge bases for enhanced performance
Abstract
This paper introduces an Error Correction through Prompt Tuning for NL-to-SQL, leveraging the latest advancements in generative pre-training-based LLMs and RAG. Our work addresses the crucial need for efficient and accurate translation of natural language queries into SQL expressions in various settings with the growing use of natural language interfaces. We explore the evolution of NLIDBs from early rule-based systems to advanced neural network-driven approaches. Drawing inspiration from the medical diagnostic process, we propose a novel framework integrating an error correction mechanism that diagnoses error types, identifies their causes, provides fixing instructions, and applies these corrections to SQL queries. This approach is further enriched by embedding fine-tuning and RAG, which harnesses external knowledge bases for improved accuracy and transparency. Through comprehensive…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Topic Modeling · Web Application Security Vulnerabilities
