Prompting GPT-3.5 for Text-to-SQL with De-semanticization and Skeleton Retrieval
Chunxi Guo, Zhiliang Tian, Jintao Tang, Pancheng Wang, Zhihua Wen,, Kang Yang, Ting Wang

TL;DR
This paper introduces a novel LLM-based framework for Text-to-SQL that uses de-semanticization and skeleton retrieval to improve example selection, enhancing performance and generalization across multiple benchmarks.
Contribution
It proposes a de-semanticization mechanism and schema filtering approach to better retrieve demonstration examples, significantly improving Text-to-SQL performance.
Findings
Outperforms state-of-the-art models on three benchmarks.
Demonstrates strong generalization across domains.
Effective retrieval of structurally similar examples enhances accuracy.
Abstract
Text-to-SQL is a task that converts a natural language question into a structured query language (SQL) to retrieve information from a database. Large language models (LLMs) work well in natural language generation tasks, but they are not specifically pre-trained to understand the syntax and semantics of SQL commands. In this paper, we propose an LLM-based framework for Text-to-SQL which retrieves helpful demonstration examples to prompt LLMs. However, questions with different database schemes can vary widely, even if the intentions behind them are similar and the corresponding SQL queries exhibit similarities. Consequently, it becomes crucial to identify the appropriate SQL demonstrations that align with our requirements. We design a de-semanticization mechanism that extracts question skeletons, allowing us to retrieve similar examples based on their structural similarity. We also model…
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
TopicsTopic Modeling · Natural Language Processing Techniques · Semantic Web and Ontologies
Methods{Dispute@FaQ-s}How to file a dispute with Expedia? · 15 Ways to Contact How can i speak to someone at Delta Airlines · Attention Is All You Need · ALIGN · Cosine Annealing · Linear Layer · Adam · Layer Normalization · Attention Dropout · Dense Connections
