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

**Authors:** Xuemei Dong, Chao Zhang, Yuhang Ge, Yuren Mao, Yunjun Gao, lu Chen, Jinshu Lin, Dongfang Lou  
**arXiv:** [2307.07306](https://arxiv.org/abs/2307.07306)  
**Date:** 2023-07-14  
**Summary page:** https://www.summarizepaper.com/en/paper/2307.07306v1/

## Key points

- C3 is a novel ChatGPT-based zero-shot Text-to-SQL method
- Achieves state-of-the-art performance on the Spider Challenge
- Execution accuracy of 82.3% on the holdout test set of Spider
- C3 consists of three key components: Clear Prompting (CP), Calibration with Hints (CH), and Consistent Output (CO)
- CP improves model's input by providing clear prompts
- CH calibrates model's output using hints to address model bias
- CO ensures consistent and coherent output through consistency loss during training
- Outperforms existing methods in terms of execution accuracy
- Promising approach for addressing zero-shot Text-to-SQL tasks

## Summary

This paper presents C3, a novel ChatGPT-based zero-shot Text-to-SQL method that achieves state-of-the-art performance on the Spider Challenge. The proposed method achieves an execution accuracy of 82.3% on the holdout test set of Spider. C3 consists of three key components: Clear Prompting (CP), Calibration with Hints (CH), and Consistent Output (CO). CP focuses on improving the model's input by providing clear prompts to guide the generation process. CH addresses the issue of model bias by calibrating the model's output using hints. CO ensures consistent and coherent output by leveraging a consistency loss during training. The effectiveness and efficiency of C3 are extensively evaluated through experiments, which demonstrate that it outperforms existing methods in terms of execution accuracy, making it the new state-of-the-art zero-shot Text-to-SQL method for the Spider Challenge. The systematic treatment provided by C3 offers a promising approach for addressing zero-shot Text-to-SQL tasks. The authors of this paper are Xuemei Dong, Chao Zhang, Yuhang Ge, Yuren Mao, Yunjun Gao, lu Chen, Jinshu Lin, and Dongfang Lou.
