MCS-SQL: Leveraging Multiple Prompts and Multiple-Choice Selection For Text-to-SQL Generation

Auteurs : Dongjun Lee, Choongwon Park, Jaehyuk Kim, Heesoo Park

Soumis à arXiv le 13 Mai. 2024
Licence : CC BY 4.0
Résumé scientifique

Recent advancements in large language models (LLMs) have enabled in-context learning (ICL)-based methods that significantly outperform fine-tuning approaches for text-to-SQL tasks. However, their performance is still considerably lower than that of human experts on benchmarks that include complex schemas and queries, such as BIRD. This study considers the sensitivity of LLMs to the prompts and introduces a novel approach that leverages multiple prompts to explore a broader search space for possible answers and effectively aggregate them. Specifically, we robustly refine the database schema through schema linking using multiple prompts. Thereafter, we generate various candidate SQL queries based on the refined schema and diverse prompts. Finally, the candidate queries are filtered based on their confidence scores, and the optimal query is obtained through a multiple-choice selection that is presented to the LLM. When evaluated on the BIRD and Spider benchmarks, the proposed method achieved execution accuracies of 65.5\% and 89.6\%, respectively, significantly outperforming previous ICL-based methods. Moreover, we established a new SOTA performance on the BIRD in terms of both the accuracy and efficiency of the generated queries.

Les articles autour de lui, par date et par proximité

Plus haut, c’est plus proche de cet article ; à gauche, c’est plus ancien. Les traits relient les articles proches entre eux : les groupes de traits sont des sous-thèmes. Sélectionnez un point pour voir pourquoi il est là. Retour au résumé de cet article

Comment lire cette carte ? Guide illustré

Les articles les plus proches Les travaux antérieurs sur lesquels il s’appuie Les articles qui le citent

Les articles autour de celui-ci

Classés selon la proximité de leur titre et de leur résumé avec ceux de cet article. Sélectionnez-en pour les lire ensemble.

Les articles les plus proches

  1. Très proche
    PET-SQL: A Prompt-Enhanced Two-Round Refinement of Text-to-SQL with Cross-consistency
    Zhishuai Li, Xiang Wang, Jingjing Zhao et al. · 2024 · Computation and Language · cité 41 fois · Pas encore résumé
    Résumé scientifique

    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…

  2. Très proche
    Enhancing Text-to-SQL Capabilities of Large Language Models through Tailored Promptings
    Zhao Tan, X. Liu, Qing Shu et al. · 2024 · International Conference on Language Resources and Evaluation · cité 29 fois · Pas encore résumé
    Résumé scientifique

    Large language models (LLMs) with prompting have achieved encouraging results on many natural language processing (NLP) tasks based on task-tailored promptings. Text-to-SQL is a critical task that generates SQL queries from natural language questions. However, prompting on LLMs haven’t show superior performance on Text-to-SQL task due to the absence of tailored promptings. In this work, we propose three promptings specifically designed for Text-to-SQL: SL-prompt, CC-prompt, and SL+CC prompt. SL-prompt is designed to guide LLMs to identify relevant tables; CC-prompt directs LLMs to generate SQL clause by clause; and SL+CC prompt is proposed to combine the strengths of these above promptings. …

  3. Très proche
    Revealing the powerful ability of large language model prompts in Text-to-SQL tasks
    Zhihua Duan, Jialin Wang · 2024 · Other Conferences · Pas encore résumé
    Résumé scientifique

    Text-to-SQL is an important research direction in the field of artificial intelligence. This paper introduces a novel Text-to-SQL application framework based on large language models (LLMs), aiming to achieve more accurate Text-to-SQL generation. We propose three methods to effectively leverage the synergy between LLMs and Text-to-SQL prompts. Firstly, we employ prompt words in JSON format that include database query examples. Through interaction with LLMs, accurate SQL statements can be generated. Secondly, we utilize the Chain of Thought (CoT) prompt word method, prompting the model with query tables, fields, and conditions to generate SQL statements that comply with grammar rules. Finally…

  4. Très proche Cite cet article
    AGCS-SQL: Adaptive SQL Generation and Confidence-Aware Selection for Text-to-SQL
    Hong-Fu Jia, Xue-Jian Zhao, Qing-Yuan Ma et al. · 2026 · IEEE International Joint Conference on Neural Network · Pas encore résumé
    Résumé scientifique

    Recent advancements in large language models (LLMs) have significantly propelled the performance of Text to-SQL tasks. However, existing LLM-based approaches still struggle with complex queries, where a unified generation strategy fails to accommodate varying reasoning difficulty, and candidate selection methods based on self-consistency often conflate execution frequency with correctness. In this paper, we propose AGCS-SQL, a Text-to-SQL framework that combines adaptive SQL generation with confidence-aware selection. AGCS-SQL first predicts query difficulty and dynamically routes queries to different generation strategies. For complex queries, it adopts a structure-content decoupled generat…

  5. Très proche Cite cet article
    CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL
    Mohammadreza Pourreza, Hailong Li, Ruoxi Sun et al. · 2024 · International Conference on Learning Representations · cité 242 fois · Pas encore résumé
    Résumé scientifique

    In tackling the challenges of large language model (LLM) performance for Text-to-SQL tasks, we introduce CHASE-SQL, a new framework that employs innovative strategies, using test-time compute in multi-agent modeling to improve candidate generation and selection. CHASE-SQL leverages LLMs' intrinsic knowledge to generate diverse and high-quality SQL candidates using different LLM generators with: (1) a divide-and-conquer method that decomposes complex queries into manageable sub-queries in a single LLM call; (2) chain-of-thought reasoning based on query execution plans, reflecting the steps a database engine takes during execution; and (3) a unique instance-aware synthetic example generation t…

  6. Très proche
    Retrieval-augmented GPT-3.5-based Text-to-SQL Framework with Sample-aware Prompting and Dynamic Revision Chain
    Chunxi Guo, Zhiliang Tian, Jintao Tang et al. · 2023 · Information Retrieval · cité 33 fois · Résumé IA disponible
    Résumé scientifique

    Text-to-SQL aims at generating SQL queries for the given natural language questions and thus helping users to query databases. Prompt learning with large language models (LLMs) has emerged as a recent approach, which designs prompts to lead LLMs to understand the input question and generate the corresponding SQL. However, it faces challenges with strict SQL syntax requirements. Existing work prompts the LLMs with a list of demonstration examples (i.e. question-SQL pairs) to generate SQL, but the fixed prompts can hardly handle the scenario where the semantic gap between the retrieved demonstration and the input question is large. In this paper, we propose a retrieval-augmented prompting meth…

  7. Très proche
    Integrating Non-Parametric Attention and Prompt Refinement to Enhance LLM-Based Text-to-SQL Without External Knowledge
    Shouvon Sarker, Li-Jun Qian, Xi-Shuang Dong · 2025 · 2025 IEEE International Conference on Data Mining Workshops (ICDMW) · Pas encore résumé
    Résumé scientifique

    Text-to-SQL enables users without specialized database expertise to efficiently retrieve information by automatically translating natural language (NL) queries into machine-executable SQL statements. Recently, large language model (LLM)-based Text-to-SQL approaches have demonstrated remarkable performance by leveraging in-context learning and fine-tuning strategies. In particular, LLM-based Text-to-SQL without external knowledge offers a cost-effective solution while still achieving competitive performance compared to knowledge-enhanced methods. This study proposes a novel approach that integrates non-parametric attention and prompt refinement to further enhance LLM-based Text-to-SQL without…

  8. Très proche
    MageSQL: Enhancing In-context Learning for Text-to-SQL Applications with Large Language Models
    Chen Shen, Jin Wang, Sajjadur Rahman et al. · 2025 · VLDB Workshops · cité 8 fois · Pas encore résumé
    Résumé scientifique

    The text-to-SQL problem aims to translate natural language questions into SQL statements to ease the interaction between database systems and end users. Recently, Large Language Models (LLMs) have exhibited impressive capabilities in a variety of tasks, including text-to-SQL. While prior works have explored various strategies for prompting LLMs to generate SQL statements, they still fall short of fully harnessing the power of LLM due to the lack of (1) high-quality contextual information when constructing the prompts and (2) robust feedback mechanisms to correct translation errors. To address these challenges, we propose MageSQL, a text-to-SQL approach based on in-context learning over LLMs.…

Les travaux antérieurs sur lesquels il s’appuie

  1. Proche Utilisé en profondeur par cet article Une méthode qu’il utilise
    Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLs
    Jinyang Li, Binyuan Hui, Ge Qu et al. · 2023 · Computation and Language · cité 1 358 fois · Résumé IA disponible
    Résumé scientifique

    Text-to-SQL parsing, which aims at converting natural language instructions into executable SQLs, has gained increasing attention in recent years. In particular, Codex and ChatGPT have shown impressive results in this task. However, most of the prevalent benchmarks, i.e., Spider, and WikiSQL, focus on database schema with few rows of database contents leaving the gap between academic study and real-world applications. To mitigate this gap, we present Bird, a big benchmark for large-scale database grounded in text-to-SQL tasks, containing 12,751 pairs of text-to-SQL data and 95 databases with a total size of 33.4 GB, spanning 37 professional domains. Our emphasis on database values highlights…

  2. Proche Une méthode qu’il utilise
    DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
    Mohammadreza Pourreza, Davood Rafiei · 2023 · Computation and Language · cité 984 fois · Résumé IA disponible
    Résumé scientifique

    We study the problem of decomposing a complex text-to-sql task into smaller sub-tasks and how such a decomposition can significantly improve the performance of Large Language Models (LLMs) in the reasoning process. There is currently a significant gap between the performance of fine-tuned models and prompting approaches using LLMs on challenging text-to-sql datasets such as Spider. We show that SQL queries, despite their declarative structure, can be broken down into sub-problems and the solutions of those sub-problems can be fed into LLMs to significantly improve their performance. Our experiments with three LLMs show that this approach consistently improves their performance by roughly 10%…

  3. Très proche
    Exploring Chain-of-Thought Style Prompting for Text-to-SQL
    Chang-You Tai, Ziru Chen, Tianshu Zhang et al. · 2023 · Conference on Empirical Methods in Natural Language Processing · cité 132 fois · Pas encore résumé
    Résumé scientifique

    In-context learning with large language models (LLMs) has recently caught increasing attention due to its superior few-shot performance on various tasks. However, its performance on text-to-SQL parsing still has much room for improvement. In this paper, we hypothesize that a crucial aspect of LLMs to improve for text-to-SQL parsing is their multi-step reasoning ability. Thus, we systematically study how to enhance LLMs' reasoning ability through chain of thought (CoT) style prompting, including the original chain-of-thought prompting (Wei et al., 2022b) and least-to-most prompting (Zhou et al., 2023). Our experiments demonstrate that iterative prompting as in Zhou et al. (2023) may be unnece…

  4. Très proche
    Enhancing Text-to-SQL Capabilities of Large Language Models: A Study on Prompt Design Strategies
    Linyong Nan, Yilun Zhao, Weijin Zou et al. · 2023 · Conference on Empirical Methods in Natural Language Processing · cité 88 fois · Pas encore résumé
    Résumé scientifique

    ,

  5. Proche
    Prompting GPT-3.5 for Text-to-SQL with De-semanticization and Skeleton Retrieval
    Chunxi Guo, Zhiliang Tian, Jintao Tang et al. · 2023 · Pacific Rim International Conference on Artificial Intelligence · cité 35 fois · Pas encore résumé
    Résumé scientifique

    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 th…

Les articles qui le citent

  1. Très proche Utilise cet article en profondeur
    A Survey on Employing Large Language Models for Text-to-SQL Tasks
    Liang Shi, Zheng-Ju Tang, Nan Zhang et al. · 2024 · ACM Computing Surveys · cité 179 fois · Pas encore résumé
    Résumé scientifique

    With the development of the Large Language Models (LLMs), a large range of LLM-based Text-to-SQL(Text2SQL) methods have emerged. This survey provides a comprehensive review of LLM-based Text2SQL studies. We first enumerate classic benchmarks and evaluation metrics. For the two mainstream methods, prompt engineering and finetuning, we introduce a comprehensive taxonomy and offer practical insights into each subcategory. We present an overall analysis of the above methods and various models evaluated on well-known datasets and extract some characteristics. Finally, we discuss the challenges and future directions in this field.

  2. Très proche Utilise cet article en profondeur
    DCG-SQL: Enhancing In-Context Learning for Text-to-SQL with Deep Contextual Schema Link Graph
    Jih-Yun Lee, Jin-Seop Lee, Jaehoon Lee et al. · 2025 · Annual Meeting of the Association for Computational Linguistics · cité 15 fois · Pas encore résumé
    Résumé scientifique

    Text-to-SQL, which translates a natural language question into an SQL query, has advanced with in-context learning of Large Language Models (LLMs). However, existing methods show little improvement in performance compared to randomly chosen demonstrations, and significant performance drops when smaller LLMs (e.g., Llama 3.1-8B) are used. This indicates that these methods heavily rely on the intrinsic capabilities of hyper-scaled LLMs, rather than effectively retrieving useful demonstrations. In this paper, we propose a novel approach for effectively retrieving demonstrations and generating SQL queries. We construct a Deep Contextual Schema Link Graph, which contains key information and seman…

  3. Très proche Utilise cet article en profondeur
    AID-SQL: Adaptive In-Context Learning of Text-to-SQL with Difficulty-Aware Instruction and Retrieval-Augmented Generation
    Xiuwen Li, Qi-Feng Cai, Yang Shu et al. · 2025 · IEEE International Conference on Data Engineering · cité 10 fois · Pas encore résumé
    Résumé scientifique

    Recent research in Text-to-SQL translation has primarily adopted in-context learning methods leveraging large language models (LLMs), achieving significant progress. However, these methods face challenges in adapting to natural language questions of varying difficulty and the relevance of the few-shot examples provided. In this paper, we propose an adaptive in-context learning approach with difficulty-aware instruction and retrieval-augmented generation to enhance the performance of Text-to-SQL translation (AID-SQL). First, we introduce adaptive instructions for LLMs, which employ precise difficulty classification to apply difficulty-adaptive generative guidelines and chain of thought (CoT) …

  4. Proche Utilise cet article en profondeur
    MAG-SQL: Multi-Agent Generative Approach with Soft Schema Linking and Iterative Sub-SQL Refinement for Text-to-SQL
    Wenxuan Xie, Gaoche Wu, Bo-Wen Zhou · 2024 · arXiv.org · preprint, non relu par les pairs · cité 41 fois · Pas encore résumé
    Résumé scientifique

    Recent In-Context Learning based methods have achieved remarkable success in Text-to-SQL task. However, there is still a large gap between the performance of these models and human performance on datasets with complex database schema and difficult questions, such as BIRD. Besides, existing work has neglected to supervise intermediate steps when solving questions iteratively with question decomposition methods, and the schema linking methods used in these works are very rudimentary. To address these issues, we propose MAG-SQL, a multi-agent generative approach with soft schema linking and iterative Sub-SQL refinement. In our framework, an entity-based method with tables' summary is used to se…

  5. Proche Utilise cet article en profondeur
    XiYan-SQL: A Novel Multi-Generator Framework for Text-to-SQL
    Yifu Liu, Yin Zhu, Yingqi Gao et al. · 2025 · IEEE Transactions on Knowledge and Data Engineering · cité 62 fois · Pas encore résumé
    Résumé scientifique

    To leverage the advantages of LLM in addressing challenges in the Text-to-SQL task, we present XiYan-SQL, an innovative framework effectively generating and utilizing multiple SQL candidates. It consists of three components: 1) a Schema Filter module filtering and obtaining multiple relevant schemas; 2) a multi-generator ensemble approach generating multiple high-quality and diverse SQL queries; 3) a selection model with a candidate reorganization strategy implemented to obtain the optimal SQL query. Specifically, for the multi-generator ensemble, we employ a multi-task fine-tuning strategy to enhance the capabilities of SQL generation models for the intrinsic alignment between SQL and text,…

Comment ces articles sont-ils trouvés ?

Nous comparons le titre et le résumé de cet article avec ceux de tous les articles résumés sur ce site, et avec les articles que Semantic Scholar recommande, ceux qu’il cite et ceux qui le citent (pour un article très cité, ses citations les plus récentes et, depuis OpenAlex, les plus citées). Parmi les travaux antérieurs et les suites, les articles qui s’utilisent en profondeur, une méthode qu’il utilise et les suites très citées remontent un peu. Les niveaux (très proche, proche, apparenté) viennent de la similarité des textes, pas d’un jugement de qualité ; * signale un article sans résumé, comparé par son titre. La phrase sous un article est écrite par une IA à partir des deux résumés : vérifiez-la dans les articles. Un article jugé hors sujet par trois lecteurs quitte la liste.

Mis à jour le 2 novembre 2026.

Le guide illustré des articles autour d’un article