mlsanityData to 14 Oct 2026

PET-SQL: A Prompt-Enhanced Two-Round Refinement of Text-to-SQL with Cross-consistency

arXiv 2403.09732 ↗First posted 13 Mar 2024cs.CL cs.AIcited by 27

Not on the map. Why?

Abstract (arXiv)

Recent advancements in Text-to-SQL (Text2SQL) emphasize stimulating the large language models (LLM) on in-context learning, achieving significant results. Nevertheless, they face challenges when dealing with verbose database information and complex user intentions. This paper presents a two-stage framework to enhance the performance of current LLM-based natural language to SQL systems. We first introduce a novel prompt representation, called reference-enhanced representation, which includes schema information and randomly sampled cell values from tables to instruct LLMs in generating SQL queries. Then, in the first stage, question-SQL pairs are retrieved as few-shot demonstrations, prompting the LLM to generate a preliminary SQL (PreSQL). After that, the mentioned entities in PreSQL are parsed to conduct schema linking, which can significantly compact the useful information. In the second stage, with the linked schema, we simplify the prompt's schema information and instruct the LLM to produce the final SQL. Finally, as the post-refinement module, we propose using cross-consistency across different LLMs rather than self-consistency within a particular LLM. Our methods achieve new SOTA results on the Spider benchmark, with an execution accuracy of 87.6%.

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

Builds on

25 of 34 references.

References · 25

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2023GPT-4 Technical Reportcited by 18,396
  4. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  5. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  6. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  7. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
  8. 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 688
  9. 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 687
  10. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 477
  11. 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 411
  12. 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 385
13 more
  1. 2023RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLcited by 195
  2. 2024The Effect of Sampling Temperature on Problem Solving in Large Language Modelscited by 170
  3. 2023C3: Zero-shot Text-to-SQL with ChatGPTcited by 164
  4. 2017SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learningcited by 135
  5. 2020Semantic Evaluation for Text-to-SQL with Distilled Test Suitescited by 126
  6. 2018Coarse-to-Fine Decoding for Neural Semantic Parsingcited by 110
  7. 2023ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thoughtcited by 65
  8. 2023TPTU-v2: Boosting Task Planning and Tool Usage of Large Language Model-based Agents in Real-world Systemscited by 39
  9. 2023Controlling Large Language Model-based Agents for Large-Scale Decision-Making: An Actor-Critic Approachcited by 38
  10. 2020Hybrid Ranking Network for Text-to-SQLcited by 33
  11. 2024SQLBench: A Comprehensive Evaluation for Text-to-SQL Capabilities of Large Language Modelscited by 32
  12. 2021SeaD: End-to-end Text-to-SQL Generation with Schema-aware Denoisingcited by 27
  13. 2023Reboost Large Language Model-based Text-to-SQL, Text-to-Python, and Text-to-Function -- with Real Applications in Traffic Domaincited by 9

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 4; 2025: 16; 2026: 7.

27 papers.

Sort:

By area:

  1. 2025XiYan-SQL: A Novel Multi-Generator Framework For Text-to-SQLcited by 40
  2. 2025LinkAlign: Scalable Schema Linking for Real-World Large-Scale Multi-Database Text-to-SQLcited by 29
  3. 2025LLM/Agent-as-Data-Analyst: A Surveycited by 16
  4. 2025ST-Raptor: LLM-Powered Semi-Structured Table Question Answeringcited by 11
  5. 2024MoMQ: Mixture-of-Experts Enhances Multi-Dialect Query Generation across Relational and Non-Relational Databasescited by 6
  6. 2025Are Your LLM-based Text-to-SQL Models Secure? Exploring SQL Injection via Backdoor Attackscited by 6
  7. 2025DB-Explore: Automated Database Exploration and Instruction Synthesis for Text-to-SQLcited by 5
  8. 2024LLM+Reasoning+Planning for Supporting Incomplete User Queries in Presence of APIscited by 4
  9. 2025DCG-SQL: Enhancing In-Context Learning for Text-to-SQL with Deep Contextual Schema Link Graphcited by 4
  10. 2025Abacus-SQL: A Text-to-SQL System Empowering Cross-Domain and Open-Domain Database Retrievalcited by 3
  11. 2025SchemaGraphSQL: Efficient Schema Linking with Pathfinding Graph Algorithms for Text-to-SQL on Large-Scale Databasescited by 3
  12. 2024Controllable and Reliable Knowledge-Intensive Task-Oriented Conversational Agents with Declarative Genie Worksheetscited by 2
15 more
  1. 2024Multi-Turn Interactions for Text-to-SQL with Large Language Modelscited by 2
  2. 2026LLM-Based SQL Generation: Prompting, Self-Refinement, and Adaptive Weighted Majority Votingcited by 2
  3. 2026ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinementcited by 2
  4. 2026EvoOntology: A Self-Evolving Ontology Layer for Data Agentscited by 2
  5. 2025Distill-C: Enhanced NL2SQL via Distilled Customization with LLMscited by 1
  6. 2025Schema-R1: A reasoning training approach for schema linking in Text-to-SQL Taskcited by 1
  7. 2025GBV-SQL: Guided Generation and SQL2Text Back-Translation Validation for Multi-Agent Text2SQLcited by 1
  8. 2025ORANGE: An Online Reflection ANd GEneration framework with Domain Knowledge for Text-to-SQLcited by 1
  9. 2025Knowledge Distillation with Structured Chain-of-Thought for Text-to-SQLcited by 1
  10. 2026Beyond Static Pipelines: Learning Dynamic Workflows for Text-to-SQLcited by 1
  11. 2025Reliable Curation of EHR Dataset via Large Language Models under Environmental Constraintscited by 0
  12. 2025GPG: Generalized Policy Gradient Theorem for Transformer-based Policiescited by 0
  13. 2026SIRIUS-SQL: Anchoring Multi-Candidate Text-to-SQL in Execution Feedbackcited by 0
  14. 2026Are These Modules Worth Their Cost? A Paradigm-Level Accuracy-Cost Analysis of In-context Learning Text-to-SQLcited by 0
  15. 2026LIMIT: Less Is More for Instruction Tuning in Text-to-SQLcited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2024RB-SQL: A Retrieval-based LLM Framework for Text-to-SQL
  2. 2023Retrieval-augmented GPT-3.5-based Text-to-SQL Framework with Sample-aware Prompting and Dynamic Revision Chain
  3. 2023How to Prompt LLMs for Text-to-SQL: A Study in Zero-shot, Single-domain, and Cross-domain Settings
  4. 2026Integrating Reasoning and Generalization in Text-to-SQL via Self-Enhanced Fine-Tuning
  5. 2025SLM-SQL: An Exploration of Small Language Models for Text-to-SQL
  6. 2025Auto prompt sql: a resource-efficient architecture for text-to-sql translation in constrained environments
  7. 2024Open-SQL Framework: Enhancing Text-to-SQL on Open-source Large Language Models
  8. 2024ROUTE: Robust Multitask Tuning and Collaboration for Text-to-SQL