CLNov 6, 2023

SQLPrompt: In-Context Text-to-SQL with Minimal Labeled Data

arXiv:2311.02883v1137 citationsh-index: 44
Originality Incremental advance
AI Analysis

This work addresses the challenge of automating SQL query generation for database users with limited labeled data, representing an incremental improvement in few-shot learning for text-to-SQL tasks.

The paper tackles the problem of generating SQL queries from natural language with minimal labeled data by proposing SQLPrompt, which improves few-shot prompting for large language models through innovative prompt design and execution-based consistency decoding, resulting in performance that closes the gap with fine-tuned state-of-the-art methods using thousands of labeled data.

Text-to-SQL aims to automate the process of generating SQL queries on a database from natural language text. In this work, we propose "SQLPrompt", tailored to improve the few-shot prompting capabilities of Text-to-SQL for Large Language Models (LLMs). Our methods include innovative prompt design, execution-based consistency decoding strategy which selects the SQL with the most consistent execution outcome among other SQL proposals, and a method that aims to improve performance by diversifying the SQL proposals during consistency selection with different prompt designs ("MixPrompt") and foundation models ("MixLLMs"). We show that \emph{SQLPrompt} outperforms previous approaches for in-context learning with few labeled data by a large margin, closing the gap with finetuning state-of-the-art with thousands of labeled data.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes