mlsanityData to 7 Oct 2026

Prompting GPT-3.5 for Text-to-SQL with De-semanticization and Skeleton Retrieval

arXiv 2304.13301 ↗First posted 26 Apr 2023cs.CL cs.AIcited by 16

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

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  5. 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
  6. 2023A Survey of Large Language Modelscited by 2,537
  7. 2017Billion-scale similarity search with GPUscited by 2,477
  8. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
  9. 2021Learning To Retrieve Prompts for In-Context Learningcited by 641
  10. 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 420
  11. 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 402
  12. 2018Hyperbolic Neural Networkscited by 393
22 more
  1. 2022Selective Annotation Makes Language Models Better Few-Shot Learnerscited by 242
  2. 2022Binding Language Models in Symbolic Languagescited by 224
  3. 2019Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representationcited by 210
  4. 2020Bridging Textual and Tabular Data for Cross-Domain Text-to-SQL Semantic Parsingcited by 133
  5. 2020Semantic Evaluation for Text-to-SQL with Distilled Test Suitescited by 123
  6. 2021LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relationscited by 119
  7. 2023A comprehensive evaluation of ChatGPT's zero-shot Text-to-SQL capabilitycited by 118
  8. 2021Towards Robustness of Text-to-SQL Models against Synonym Substitutioncited by 110
  9. 2022Evaluating the Text-to-SQL Capabilities of Large Language Modelscited by 101
  10. 2023Graphix-T5: Mixing Pre-Trained Transformers with Graph-Aware Layers for Text-to-SQL Parsingcited by 93
  11. 2021Exploring Underexplored Limitations of Cross-Domain Text-to-SQL Generalizationcited by 92
  12. 2022RASAT: Integrating Relational Structures into Pretrained Seq2Seq Model for Text-to-SQLcited by 85
  13. 2020Grounded Adaptation for Zero-shot Executable Semantic Parsingcited by 76
  14. 2019Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsingcited by 74
  15. 2020RYANSQL: Recursively Applying Sketch-based Slot Fillings for Complex Text-to-SQL in Cross-Domain Databasescited by 63
  16. 2021Probing BERT in Hyperbolic Spacescited by 50
  17. 2022S2SQL: Injecting Syntax to Question-Schema Interaction Graph Encoder for Text-to-SQL Parserscited by 41
  18. 2021ShadowGNN: Graph Projection Neural Network for Text-to-SQL Parsercited by 35
  19. 2020Hybrid Ranking Network for Text-to-SQLcited by 33
  20. 2017An Encoder-Decoder Framework Translating Natural Language to Database Queriescited by 23
  21. 2019X-SQL: reinforce schema representation with contextcited by 22
  22. 2022STAR: SQL Guided Pre-Training for Context-dependent Text-to-SQL Parsingcited by 19

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 2; 2024: 8; 2025: 5; 2026: 1.

16 papers.

Sort:

  1. 2024Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQLcited by 118
  2. 2024MCS-SQL: Leveraging Multiple Prompts and Multiple-Choice Selection For Text-to-SQL Generationcited by 103
  3. 2024A Survey on Employing Large Language Models for Text-to-SQL Taskscited by 67
  4. 2025OpenSearch-SQL: Enhancing Text-to-SQL with Dynamic Few-shot and Consistency Alignmentcited by 51
  5. 2024SQLBench: A Comprehensive Evaluation for Text-to-SQL Capabilities of Large Language Modelscited by 32
  6. 2025LinkAlign: Scalable Schema Linking for Real-World Large-Scale Multi-Database Text-to-SQLcited by 26
  7. 2025Reliable Text-to-SQL with Adaptive Abstentioncited by 19
  8. 2023SUQL: Conversational Search over Structured and Unstructured Data with Large Language Modelscited by 13
  9. 2024Solid-SQL: Enhanced Schema-linking based In-context Learning for Robust Text-to-SQLcited by 11
  10. 2024DAC: Decomposed Automation Correction for Text-to-SQLcited by 6
  11. 2024DFIN-SQL: Integrating Focused Schema with DIN-SQL for Superior Accuracy in Large-Scale Databasescited by 4
  12. 2025DCG-SQL: Enhancing In-Context Learning for Text-to-SQL with Deep Contextual Schema Link Graphcited by 4
4 more
  1. 2025Exploring the Landscape of Text-to-SQL with Large Language Models: Progresses, Challenges and Opportunitiescited by 4
  2. 2024KeyInst: Keyword Instruction for Improving SQL Formulation in Text-to-SQLcited by 1
  3. 2023dIR -- Discrete Information Retrieval: Conversational Search over Unstructured (and Structured) Data with Large Language Modelscited by 0
  4. 2026An Iterative LangGraph Agent for Text-to-SQL: Natural Language Access to the Chicago Crime Databasecited by 0