How to Prompt LLMs for Text-to-SQL: A Study in Zero-shot, Single-domain, and Cross-domain Settings

by   Shuaichen Chang, et al.

Large language models (LLMs) with in-context learning have demonstrated remarkable capability in the text-to-SQL task. Previous research has prompted LLMs with various demonstration-retrieval strategies and intermediate reasoning steps to enhance the performance of LLMs. However, those works often employ varied strategies when constructing the prompt text for text-to-SQL inputs, such as databases and demonstration examples. This leads to a lack of comparability in both the prompt constructions and their primary contributions. Furthermore, selecting an effective prompt construction has emerged as a persistent problem for future research. To address this limitation, we comprehensively investigate the impact of prompt constructions across various settings and provide insights for future work.


page 1

page 3

page 7


Enhancing Few-shot Text-to-SQL Capabilities of Large Language Models: A Study on Prompt Design Strategies

In-context learning (ICL) has emerged as a new approach to various natur...

KaggleDBQA: Realistic Evaluation of Text-to-SQL Parsers

The goal of database question answering is to enable natural language qu...

CSS: A Large-scale Cross-schema Chinese Text-to-SQL Medical Dataset

The cross-domain text-to-SQL task aims to build a system that can parse ...

End-to-End Cross-Domain Text-to-SQL Semantic Parsing with Auxiliary Task

In this work, we focus on two crucial components in the cross-domain tex...

A Case-Based Reasoning Framework for Adaptive Prompting in Cross-Domain Text-to-SQL

Recent advancements in Large Language Models (LLMs), such as Codex, Chat...

Prompts Matter: Insights and Strategies for Prompt Engineering in Automated Software Traceability

Large Language Models (LLMs) have the potential to revolutionize automat...

LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relations

This work aims to tackle the challenging heterogeneous graph encoding pr...

Please sign up or login with your details

Forgot password? Click here to reset