Selective Demonstrations for Cross-domain Text-to-SQL

Shuaichen Chang, Eric Fosler-Lussier
10/10/2023
cs.CL

No official code found. Best implementation: shuaichenchang/ODIS-Text-to-SQL (9 stars, Apache-2.0, last commit 2023-12-10).

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.

View on arXivView PDF

Code Implementations(1)

Apache-2.0
90Python, JavaScriptOct 10, 20232 years agoApache-2.0

Similar Papers

Cite this paper

@article{chang2023selective,
  title  = {Selective Demonstrations for Cross-domain Text-to-SQL},
  author = {Shuaichen Chang and Eric Fosler-Lussier},
  year   = {2023},
  eprint = {2310.06302},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.06302v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.06302.svg)](https://codeofpaper.com/paper/2310.06302)

Discussion