Selective Demonstrations for Cross-domain Text-to-SQL

Shuaichen Chang, Eric Fosler-Lussier


Abstract
Large language models (LLMs) with in-context learning have demonstrated impressive generalization capabilities in the cross-domain text-to-SQL task, without the use of in-domain annotations. However, incorporating in-domain demonstration examples has been found to greatly enhance LLMs’ performance. In this paper, we delve into the key factors within in-domain examples that contribute to the improvement and explore whether we can harness these benefits without relying on in-domain annotations. Based on our findings, we propose a demonstration selection framework, ODIS, which utilizes both out-of-domain examples and synthetically generated in-domain examples to construct demonstrations. By retrieving demonstrations from hybrid sources, ODIS leverages the advantages of both, showcasing its effectiveness compared to baseline methods that rely on a single data source. Furthermore, ODIS outperforms state-of-the-art approaches on two cross-domain text-to-SQL datasets, with improvements of 1.1 and 11.8 points in execution accuracy, respectively.
Anthology ID:
2023.findings-emnlp.944
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2023
Month:
December
Year:
2023
Address:
Singapore
Editors:
Houda Bouamor, Juan Pino, Kalika Bali
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
14174–14189
Language:
URL:
https://aclanthology.org/2023.findings-emnlp.944
DOI:
10.18653/v1/2023.findings-emnlp.944
Bibkey:
Cite (ACL):
Shuaichen Chang and Eric Fosler-Lussier. 2023. Selective Demonstrations for Cross-domain Text-to-SQL. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 14174–14189, Singapore. Association for Computational Linguistics.
Cite (Informal):
Selective Demonstrations for Cross-domain Text-to-SQL (Chang & Fosler-Lussier, Findings 2023)
Copy Citation:
PDF:
https://aclanthology.org/2023.findings-emnlp.944.pdf