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.
DCG-SQL: Enhancing In-Context Learning for Text-to-SQL with Deep Contextual Schema Link Graph
Department of Artificial Intelligence, Sungkyunkwan University(人工智能系,成均馆大学);Department of Immersive Media Engineering, Sungkyunkwan University(沉浸媒体工程系,成均馆大学);Department of Computer Science and Engineering, Sungkyunkwan University(计算机科学与工程系,成均馆大学)
ZAS-SQL: Distilling Rules from Failures for Zero-Shot Text-to-SQL
Shanghai Research Institute for Intelligent Autonomous Systems, Tongji University(同济大学上海自主智能无人系统科学中心);College of Architecture and Urban Planning, Tongji University(同济大学建筑与城市规划学院);Behavioral and Spatial AI Lab, Peking University & Tongji University(北京大学与同济大学行为与空间人工智能实验室)
PET-SQL: A Prompt-Enhanced Two-Round Refinement of Text-to-SQL with Cross-consistency
SenseTime Research(商汤科技研究院);Peking University(北京大学);Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);School of Computer Science and Technology, Beijing Institute of Technology(北京理工大学计算机学院);University of Cologne(科隆大学)
Selective Annotation Makes Language Models Better Few-Shot Learners
The University of Hong Kong(香港大学);University of Washington(华盛顿大学);Carnegie Mellon University(卡内基梅隆大学);Meta AI;Penn State University(宾夕法尼亚州立大学);Allen Institute for AI(艾伦人工智能研究所)