In-context learning using large language models has recently shown surprising results for semantic parsing tasks such as Text-to-SQL translation. Prompting GPT-3 or Codex using several examples of question-SQL pairs can produce excellent results, comparable to state-of-the-art finetuning-based models. However, existing work primarily focuses on English datasets, and it is unknown whether large language models can serve as competitive semantic parsers for other languages. To bridge this gap, our work focuses on cross-lingual Text-to-SQL semantic parsing for translating non-English utterances into SQL queries based on an English schema. We consider a zero-shot transfer learning setting with the assumption that we do not have any labeled examples in the target language (but have annotated examples in English). This work introduces the XRICL framework, which learns to retrieve relevant English exemplars for a given query to construct prompts. We also include global translation exemplars for a target language to facilitate the translation process for large language models. To systematically evaluate our model, we construct two new benchmark datasets, XSpider and XKaggle-dbqa, which include questions in Chinese, Vietnamese, Farsi, and Hindi. Our experiments show that XRICL effectively leverages large pre-trained language models to outperform existing baselines. Data and code are publicly available at https://github.com/Impavidity/XRICL.
翻译:使用大语言模型的内文学习最近为文本到 SQL 翻译等语义解析任务展示出令人惊讶的结果。 使用问- SQL 配对的多个示例提示 GPT-3 或 Codex 能够产生优异的结果, 类似于基于 问- SQL 配对的模型。 但是, 现有工作主要侧重于英语数据集, 不清楚大型语言模型是否能成为其他语言具有竞争力的语义解析器。 为了缩小这一差距, 我们的工作重点是跨语言文本到 SQL 的语义解析解析, 将非英语词译为基于英语的 SQL 查询 。 我们考虑一个零点化的传输学习设置, 假设我们没有目标语言的标签示例( 但有一个附加英文示例 ) 。 这项工作引入了 XRICL 框架, 该框架学会为某个特定查询获取相关的英语Explaker 。 我们还包括一个目标语言的全局翻译Exemplicers, 以便利大型语言模型的翻译进程。 我们系统地评估 XXXx 和 VIL 的大规模模型, 我们建立两个数据模型, 我们在 XISG 和 VIL 测试中测试中, 我们将两个新的数据模型中标定了两个数据。