Prompting GPT-3.5 for Text-to-SQL with De-semanticization and Skeleton Retrieval
Not on the map. Why?
Abstract (arXiv)
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 the relationships between question tokens and database schema items (i.e., tables and columns) to filter out scheme-related information. Our framework adapts the range of the database schema in prompts to balance length and valuable information. A fallback mechanism allows for a more detailed schema to be provided if the generated SQL query fails. Ours outperforms state-of-the-art models and demonstrates strong generalization ability on three cross-domain Text-to-SQL benchmarks.
Key facts. Cited by 16 papers in the map (data through 7 Oct 2026). Builds on 34 of its 42 references that are in the map. First posted on arXiv 26 Apr 2023.
Builds on
34 of 42 references.
References · 34
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
- 2023A Survey of Large Language Modelscited by 2,537
- 2017Billion-scale similarity search with GPUscited by 2,477
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
- 2021Learning To Retrieve Prompts for In-Context Learningcited by 641
- 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 420
- 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 402
- 2018Hyperbolic Neural Networkscited by 393
22 more
- 2022Selective Annotation Makes Language Models Better Few-Shot Learnerscited by 242
- 2022Binding Language Models in Symbolic Languagescited by 224
- 2019Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representationcited by 210
- 2020Bridging Textual and Tabular Data for Cross-Domain Text-to-SQL Semantic Parsingcited by 133
- 2020Semantic Evaluation for Text-to-SQL with Distilled Test Suitescited by 123
- 2021LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relationscited by 119
- 2023A comprehensive evaluation of ChatGPT's zero-shot Text-to-SQL capabilitycited by 118
- 2021Towards Robustness of Text-to-SQL Models against Synonym Substitutioncited by 110
- 2022Evaluating the Text-to-SQL Capabilities of Large Language Modelscited by 101
- 2023Graphix-T5: Mixing Pre-Trained Transformers with Graph-Aware Layers for Text-to-SQL Parsingcited by 93
- 2021Exploring Underexplored Limitations of Cross-Domain Text-to-SQL Generalizationcited by 92
- 2022RASAT: Integrating Relational Structures into Pretrained Seq2Seq Model for Text-to-SQLcited by 85
- 2020Grounded Adaptation for Zero-shot Executable Semantic Parsingcited by 76
- 2019Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsingcited by 74
- 2020RYANSQL: Recursively Applying Sketch-based Slot Fillings for Complex Text-to-SQL in Cross-Domain Databasescited by 63
- 2021Probing BERT in Hyperbolic Spacescited by 50
- 2022S2SQL: Injecting Syntax to Question-Schema Interaction Graph Encoder for Text-to-SQL Parserscited by 41
- 2021ShadowGNN: Graph Projection Neural Network for Text-to-SQL Parsercited by 35
- 2020Hybrid Ranking Network for Text-to-SQLcited by 33
- 2017An Encoder-Decoder Framework Translating Natural Language to Database Queriescited by 23
- 2019X-SQL: reinforce schema representation with contextcited by 22
- 2022STAR: SQL Guided Pre-Training for Context-dependent Text-to-SQL Parsingcited by 19
Built on by
Citing papers per year: 2023: 2; 2024: 8; 2025: 5; 2026: 1.
16 papers.
Sort:
- 2024Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQLcited by 118
- 2024MCS-SQL: Leveraging Multiple Prompts and Multiple-Choice Selection For Text-to-SQL Generationcited by 103
- 2024A Survey on Employing Large Language Models for Text-to-SQL Taskscited by 67
- 2025OpenSearch-SQL: Enhancing Text-to-SQL with Dynamic Few-shot and Consistency Alignmentcited by 51
- 2024SQLBench: A Comprehensive Evaluation for Text-to-SQL Capabilities of Large Language Modelscited by 32
- 2025LinkAlign: Scalable Schema Linking for Real-World Large-Scale Multi-Database Text-to-SQLcited by 26
- 2025Reliable Text-to-SQL with Adaptive Abstentioncited by 19
- 2023SUQL: Conversational Search over Structured and Unstructured Data with Large Language Modelscited by 13
- 2024Solid-SQL: Enhanced Schema-linking based In-context Learning for Robust Text-to-SQLcited by 11
- 2024DAC: Decomposed Automation Correction for Text-to-SQLcited by 6
- 2024DFIN-SQL: Integrating Focused Schema with DIN-SQL for Superior Accuracy in Large-Scale Databasescited by 4
- 2025DCG-SQL: Enhancing In-Context Learning for Text-to-SQL with Deep Contextual Schema Link Graphcited by 4
4 more
- 2025Exploring the Landscape of Text-to-SQL with Large Language Models: Progresses, Challenges and Opportunitiescited by 4
- 2024KeyInst: Keyword Instruction for Improving SQL Formulation in Text-to-SQLcited by 1
- 2023dIR -- Discrete Information Retrieval: Conversational Search over Unstructured (and Structured) Data with Large Language Modelscited by 0
- 2026An Iterative LangGraph Agent for Text-to-SQL: Natural Language Access to the Chicago Crime Databasecited by 0
- 2026An Iterative LangGraph Agent for Text-to-SQL: Natural Language Access to the Chicago Crime Database19 Sep 2026
- 2025Exploring the Landscape of Text-to-SQL with Large Language Models: Progresses, Challenges and Opportunities28 May 2025
- 2025DCG-SQL: Enhancing In-Context Learning for Text-to-SQL with Deep Contextual Schema Link Graph26 May 2025
- 2025LinkAlign: Scalable Schema Linking for Real-World Large-Scale Multi-Database Text-to-SQL24 Mar 2025
- 2025OpenSearch-SQL: Enhancing Text-to-SQL with Dynamic Few-shot and Consistency Alignment19 Feb 2025
- 2025Reliable Text-to-SQL with Adaptive Abstention18 Jan 2025
- 2024Solid-SQL: Enhanced Schema-linking based In-context Learning for Robust Text-to-SQL17 Dec 2024
- 2024KeyInst: Keyword Instruction for Improving SQL Formulation in Text-to-SQL18 Oct 2024
- 2024DAC: Decomposed Automation Correction for Text-to-SQL16 Aug 2024
- 2024A Survey on Employing Large Language Models for Text-to-SQL Tasks21 Jul 2024
- 2024Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQL12 Jun 2024
- 2024MCS-SQL: Leveraging Multiple Prompts and Multiple-Choice Selection For Text-to-SQL Generation13 May 2024
4 more
- 2024SQLBench: A Comprehensive Evaluation for Text-to-SQL Capabilities of Large Language Models5 Mar 2024
- 2024DFIN-SQL: Integrating Focused Schema with DIN-SQL for Superior Accuracy in Large-Scale Databases1 Mar 2024
- 2023dIR -- Discrete Information Retrieval: Conversational Search over Unstructured (and Structured) Data with Large Language Models20 Dec 2023
- 2023SUQL: Conversational Search over Structured and Unstructured Data with Large Language Models16 Nov 2023
- 2024Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQLcited by 118
- 2024MCS-SQL: Leveraging Multiple Prompts and Multiple-Choice Selection For Text-to-SQL Generationcited by 103
- 2024A Survey on Employing Large Language Models for Text-to-SQL Taskscited by 67
- 2025OpenSearch-SQL: Enhancing Text-to-SQL with Dynamic Few-shot and Consistency Alignmentcited by 51
- 2024SQLBench: A Comprehensive Evaluation for Text-to-SQL Capabilities of Large Language Modelscited by 32
- 2025LinkAlign: Scalable Schema Linking for Real-World Large-Scale Multi-Database Text-to-SQLcited by 26
- 2025Reliable Text-to-SQL with Adaptive Abstentioncited by 19
- 2023SUQL: Conversational Search over Structured and Unstructured Data with Large Language Modelscited by 13
- 2024Solid-SQL: Enhanced Schema-linking based In-context Learning for Robust Text-to-SQLcited by 11
- 2024DAC: Decomposed Automation Correction for Text-to-SQLcited by 6
- 2024DFIN-SQL: Integrating Focused Schema with DIN-SQL for Superior Accuracy in Large-Scale Databasescited by 4
- 2025DCG-SQL: Enhancing In-Context Learning for Text-to-SQL with Deep Contextual Schema Link Graphcited by 4
12 most cited of 16 All 16 (JSON)
- 2026An Iterative LangGraph Agent for Text-to-SQL: Natural Language Access to the Chicago Crime Database19 Sep 2026
- 2025Exploring the Landscape of Text-to-SQL with Large Language Models: Progresses, Challenges and Opportunities28 May 2025
- 2025DCG-SQL: Enhancing In-Context Learning for Text-to-SQL with Deep Contextual Schema Link Graph26 May 2025
- 2025LinkAlign: Scalable Schema Linking for Real-World Large-Scale Multi-Database Text-to-SQL24 Mar 2025
- 2025OpenSearch-SQL: Enhancing Text-to-SQL with Dynamic Few-shot and Consistency Alignment19 Feb 2025
- 2025Reliable Text-to-SQL with Adaptive Abstention18 Jan 2025
- 2024Solid-SQL: Enhanced Schema-linking based In-context Learning for Robust Text-to-SQL17 Dec 2024
- 2024KeyInst: Keyword Instruction for Improving SQL Formulation in Text-to-SQL18 Oct 2024
- 2024DAC: Decomposed Automation Correction for Text-to-SQL16 Aug 2024
- 2024A Survey on Employing Large Language Models for Text-to-SQL Tasks21 Jul 2024
- 2024Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQL12 Jun 2024
- 2024MCS-SQL: Leveraging Multiple Prompts and Multiple-Choice Selection For Text-to-SQL Generation13 May 2024
12 newest of 16 All 16 (JSON)