English

C3: Zero-shot Text-to-SQL with ChatGPT

Computation and Language 2023-07-17 v1 Artificial Intelligence

Abstract

This paper proposes a ChatGPT-based zero-shot Text-to-SQL method, dubbed C3, which achieves 82.3\% in terms of execution accuracy on the holdout test set of Spider and becomes the state-of-the-art zero-shot Text-to-SQL method on the Spider Challenge. C3 consists of three key components: Clear Prompting (CP), Calibration with Hints (CH), and Consistent Output (CO), which are corresponding to the model input, model bias and model output respectively. It provides a systematic treatment for zero-shot Text-to-SQL. Extensive experiments have been conducted to verify the effectiveness and efficiency of our proposed method.

Cite

@article{arxiv.2307.07306,
  title  = {C3: Zero-shot Text-to-SQL with ChatGPT},
  author = {Xuemei Dong and Chao Zhang and Yuhang Ge and Yuren Mao and Yunjun Gao and lu Chen and Jinshu Lin and Dongfang Lou},
  journal= {arXiv preprint arXiv:2307.07306},
  year   = {2023}
}
R2 v1 2026-06-28T11:30:25.608Z