mlsanityData to 14 Oct 2026

PURPLE: Making a Large Language Model a Better SQL Writer

arXiv 2403.20014 ↗First posted 29 Mar 2024cs.DB cs.AI cs.CLcited by 34

Not on the map. Why?

Abstract (arXiv)

Large Language Model (LLM) techniques play an increasingly important role in Natural Language to SQL (NL2SQL) translation. LLMs trained by extensive corpora have strong natural language understanding and basic SQL generation abilities without additional tuning specific to NL2SQL tasks. Existing LLMs-based NL2SQL approaches try to improve the translation by enhancing the LLMs with an emphasis on user intention understanding. However, LLMs sometimes fail to generate appropriate SQL due to their lack of knowledge in organizing complex logical operator composition. A promising method is to input the LLMs with demonstrations, which include known NL2SQL translations from various databases. LLMs can learn to organize operator compositions from the input demonstrations for the given task. In this paper, we propose PURPLE (Pre-trained models Utilized to Retrieve Prompts for Logical Enhancement), which improves accuracy by retrieving demonstrations containing the requisite logical operator composition for the NL2SQL task on hand, thereby guiding LLMs to produce better SQL translation. PURPLE achieves a new state-of-the-art performance of 80.5% exact-set match accuracy and 87.8% execution match accuracy on the validation set of the popular NL2SQL benchmark Spider. PURPLE maintains high accuracy across diverse benchmarks, budgetary constraints, and various LLMs, showing robustness and cost-effectiveness.

Key facts. Cited by 34 papers in the map (data through 14 Oct 2026). Builds on 46 of its 65 references that are in the map. First posted on arXiv 29 Mar 2024.

Builds on

46 of 65 references.

References · 46

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  4. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  5. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
  6. 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,893
  7. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
  8. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
  9. 2023Teaching Large Language Models to Self-Debugcited by 988
  10. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 477
  11. 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 424
  12. 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 411
34 more
  1. 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 385
  2. 2022RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learningcited by 366
  3. 2022Dynamic Prompt Learning via Policy Gradient for Semi-structured Mathematical Reasoningcited by 350
  4. 2017Beam Search Strategies for Neural Machine Translationcited by 232
  5. 2019Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representationcited by 210
  6. 2023RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLcited by 195
  7. 2023C3: Zero-shot Text-to-SQL with ChatGPTcited by 164
  8. 2022Synchromesh: Reliable code generation from pre-trained language modelscited by 156
  9. 2020Bridging Textual and Tabular Data for Cross-Domain Text-to-SQL Semantic Parsingcited by 133
  10. 2020Semantic Evaluation for Text-to-SQL with Distilled Test Suitescited by 126
  11. 2020Structure-Grounded Pretraining for Text-to-SQLcited by 126
  12. 2021LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relationscited by 119
  13. 2023A comprehensive evaluation of ChatGPT's zero-shot Text-to-SQL capabilitycited by 119
  14. 2021Towards Robustness of Text-to-SQL Models against Synonym Substitutioncited by 110
  15. 2022Evaluating the Text-to-SQL Capabilities of Large Language Modelscited by 101
  16. 2020SmBoP: Semi-autoregressive Bottom-up Semantic Parsingcited by 97
  17. 2023Graphix-T5: Mixing Pre-Trained Transformers with Graph-Aware Layers for Text-to-SQL Parsingcited by 93
  18. 2021Exploring Underexplored Limitations of Cross-Domain Text-to-SQL Generalizationcited by 92
  19. 2022RASAT: Integrating Relational Structures into Pretrained Seq2Seq Model for Text-to-SQLcited by 85
  20. 2019Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsingcited by 74
  21. 2023Exploring Chain-of-Thought Style Prompting for Text-to-SQLcited by 69
  22. 2021Natural SQL: Making SQL Easier to Infer from Natural Language Specificationscited by 68
  23. 2022Prompt Consistency for Zero-Shot Task Generalizationcited by 67
  24. 2023How to Prompt LLMs for Text-to-SQL: A Study in Zero-shot, Single-domain, and Cross-domain Settingscited by 58
  25. 2023Skill-Based Few-Shot Selection for In-Context Learningcited by 46
  26. 2023Enhancing Few-shot Text-to-SQL Capabilities of Large Language Models: A Study on Prompt Design Strategiescited by 45
  27. 2019Global Reasoning over Database Structures for Text-to-SQL Parsingcited by 43
  28. 2022S2SQL: Injecting Syntax to Question-Schema Interaction Graph Encoder for Text-to-SQL Parserscited by 41
  29. 2023Interleaving Pre-Trained Language Models and Large Language Models for Zero-Shot NL2SQL Generationcited by 24
  30. 2023Divide and Prompt: Chain of Thought Prompting for Text-to-SQLcited by 20
  31. 2022N-Best Hypotheses Reranking for Text-To-SQL Systemscited by 19
  32. 2024Metasql: A Generate-then-Rank Framework for Natural Language to SQL Translationcited by 17
  33. 2023Retrieval-augmented GPT-3.5-based Text-to-SQL Framework with Sample-aware Prompting and Dynamic Revision Chaincited by 12
  34. 2023Adapt and Decompose: Efficient Generalization of Text-to-SQL via Domain Adapted Least-To-Most Promptingcited by 8

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 8; 2025: 17; 2026: 9.

34 papers.

Sort:

By area:

  1. 2024Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQLcited by 120
  2. 2024A Survey on Employing Large Language Models for Text-to-SQL Taskscited by 67
  3. 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?cited by 56
  4. 2025Reliable Text-to-SQL with Adaptive Abstentioncited by 20
  5. 2025Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errorscited by 14
  6. 2024NAT-NL2GQL: A Novel Multi-Agent Framework for Translating Natural Language to Graph Query Languagecited by 9
  7. 2025Knapsack Optimization-based Schema Linking for LLM-based Text-to-SQL Generationcited by 9
  8. 2024Grounding Natural Language to SQL Translation with Data-Based Self-Explanationscited by 8
  9. 2024DataLab: A Unified Platform for LLM-Powered Business Intelligencecited by 8
  10. 2025ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQLcited by 8
  11. 2025AGRAG: Advanced Graph-based Retrieval-Augmented Generation for LLMscited by 7
  12. 2025Exploring the Landscape of Text-to-SQL with Large Language Models: Progresses, Challenges and Opportunitiescited by 4
22 more
  1. 2025SEED: Enhancing Text-to-SQL Performance and Practical Usability Through Automatic Evidence Generationcited by 4
  2. 2024Towards Robustness of Text-to-Visualization Translation against Lexical and Phrasal Variabilitycited by 2
  3. 2024Multi-Turn Interactions for Text-to-SQL with Large Language Modelscited by 2
  4. 2025Feather-SQL: A Lightweight NL2SQL Framework with Dual-Model Collaboration Paradigm for Small Language Modelscited by 2
  5. 2025Toward Real-World Table Agents: Capabilities, Workflows, and Design Principles for LLM-based Table Intelligencecited by 2
  6. 2025LoopServe: An Adaptive Dual-phase LLM Inference Acceleration System for Multi-Turn Dialoguescited by 2
  7. 2025Exploring Database Normalization Effects on SQL Generationcited by 2
  8. 2025GBV-SQL: Guided Generation and SQL2Text Back-Translation Validation for Multi-Agent Text2SQLcited by 1
  9. 2025DeKeyNLU: Enhancing Natural Language to SQL Generation through Task Decomposition and Keyword Extractioncited by 1
  10. 2025ORANGE: An Online Reflection ANd GEneration framework with Domain Knowledge for Text-to-SQLcited by 1
  11. 2025Beyond SELECT: A Comprehensive Taxonomy-Guided Benchmark for Real-World Text-to-SQL Translationcited by 1
  12. 2025Scaling Text2SQL via LLM-efficient Schema Filtering with Functional Dependency Graph Rerankerscited by 1
  13. 2026Beyond Static Pipelines: Learning Dynamic Workflows for Text-to-SQLcited by 1
  14. 2026ODUTQA-MDC: A Task for Open-Domain Underspecified Tabular QA with Multi-turn Dialogue-based Clarificationcited by 1
  15. 2026NL2SQLBench: A Modular Benchmarking Framework for LLM-Enabled NL2SQL Solutionscited by 1
  16. 2025OsmT: Bridging OpenStreetMap Queries and Natural Language with Open-source Tag-aware Language Modelscited by 0
  17. 2026Accurate Table Question Answering with Accessible LLMscited by 0
  18. 2026LEAF-SQL: Level-wise Exploration with Adaptive Fine-graining for Text-to-SQL Skeleton Predictioncited by 0
  19. 2026When Cognitive Graphs Meet LLMs: BDEI Cognitive Pathways for Panic Emotional Arousal Predictioncited by 0
  20. 2026Database Context Compression for Text-to-SQL on Real-World Large Databasescited by 0
  21. 2026Benchmarking Text-to-SQL under Role-Based Access Controlcited by 0
  22. 2026Are These Modules Worth Their Cost? A Paradigm-Level Accuracy-Cost Analysis of In-context Learning Text-to-SQLcited by 0