EMNLP Findings2023
Enhancing Text-to-SQL Capabilities of Large Language Models: A Study on Prompt Design Strategies
Linyong Nan, Yilun Zhao, Weijin Zou, Narutatsu Ri, Jaesung Tae, Ellen Zhang, Arman Cohan, Dragomir Radev
摘要
In-context learning (ICL) has emerged as a new approach to various natural language processing tasks, utilizing large language models (LLMs) to make predictions based on context that has been supplemented with a few examples or task-specific instructions. In this paper, we aim to extend this method to question answering tasks that utilize structured knowledge sources, and improve Text-to-SQL systems by exploring various prompt design strategies for employing LLMs. We conduct a systematic investigation into different demonstration selection methods and optimal instruction formats for prompting LLMs in the Text-to-SQL task. Our approach involves leveraging the syntactic structure of an example's SQL query to retrieve demonstrations, and we demonstrate that pursuing both diversity and similarity in demonstration selection leads to enhanced performance. Furthermore, we show that LLMs benefit from database-related knowledge augmentations. Our most effective strategy outperforms the state-of-the-art system by 2.5 points (Execution Accuracy) and the best fine-tuned system by 5.1 points on the Spider dataset. These results highlight the effectiveness of our approach in adapting LLMs to the Text-to-SQL task, and we present an analysis of the factors contributing to the success of our strategy.
问 Lune
尽管问,回答会引用原文。
Lune 会读完全文和相关的 Paper,每个回答都附上所依据的原文段落。
引用它的顶会 Paper9
- SQLFixAgent: Towards Semantic-Accurate Text-to-SQL Parsing via Consistency-Enhanced Multi-Agent CollaborationJipeng Cen, Jiaxin Liu, Zhixu Li, Jingjing WangAAAI 2025 · 18 次引用
- Reliable Text-to-SQL with Adaptive AbstentionKaiwen Chen, Yueting Chen, Nick Koudas, Xiaohui YuSIGMOD 2025 · 9 次引用
- 2D-TPE: Two-Dimensional Positional Encoding Enhances Table Understanding for Large Language ModelsJia-Nan Li, Jian Guan, Wei Wu, Zhengtao Yu 等WWW 2025 · 4 次引用
- Improving Retrieval-augmented Text-to-SQL with AST-based Ranking and Schema PruningZhili Shen, Pavlos Vougiouklis, Chenxin Diao, Kaustubh Vyas 等EMNLP 2024 · 3 次引用
- Skeletons Matter: Dynamic Data Augmentation for Text-to-QueryYuchen Ji, Bo Xu, Jie Shi, Jiaqing Liang 等EMNLP 2025
它引用的 Paper21
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
- Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo 等NeurIPS 2022 · 8,168 次引用
- CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order SensitivityYao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel 等ACL 2022 · 1,494 次引用
- CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and GenerationYue Wang, Weishi Wang, Shafiq R. Joty, Steven C. H. HoiEMNLP 2021 · 1,224 次引用
相关 Paper
- ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-ThoughtHanchong Zhang, Ruisheng Cao, Lu Chen, Hongshen Xu 等EMNLP Findings 2023 · 54 次引用
- DCG-SQL: Enhancing In-Context Learning for Text-to-SQL with Deep Contextual Schema Link GraphJihyung Lee, Jin-Seop Lee, Jaehoon Lee, YunSeok Choi 等ACL 2025
- DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-CorrectionMohammadreza Pourreza, Davood RafieiNeurIPS 2023 · 909 次引用
- SQLPrompt: In-Context Text-to-SQL with Minimal Labeled DataRuoxi Sun, Sercan Ö. Arik, Rajarishi Sinha, Hootan Nakhost 等EMNLP Findings 2023 · 18 次引用
- Selective Demonstrations for Cross-domain Text-to-SQLShuaichen Chang, Eric Fosler-LussierEMNLP Findings 2023 · 19 次引用
