XRICL:跨语言文本到SQL语义解析的跨语言检索增强上下文学习
XRICL: Cross-lingual Retrieval-Augmented In-Context Learning for Cross-lingual Text-to-SQL Semantic Parsing
摘要:
使用大语言模型的上下文学习最近在语义解析任务(如文本到SQL翻译)中显示出令人惊讶的结果。使用几个question-SQL对的示例来验证GPT-3或Codex可以产生非常好的结果,可以与最先进的基于微调的模型相媲美。然而,现有的工作主要集中在英语数据集,这是未知的大语言模型是否可以作为其他语言的竞争力的语义解析器。为了弥补这一差距,我们的工作重点是跨语言的文本到SQL的语义解析翻译非英语的话语到SQL查询的基础上的英语模式。我们考虑一个zero-shot迁移学习设置,假设我们没有任何标记的例子在目标语言(但有注释的例子在英语)。这项工作介绍了XRICL框架,学习检索相关的英语范例为一个给定的查询构造提示。我们还包括目标语言的全局翻译范例,以促进大语言模型的翻译过程。为了系统地评估我们的模型,我们构建了两个新的基准数据集,XSpider和XKaggle-dbqa,其中包括中文,越南语,波斯语和印地语的问题。我们的实验表明,XRECL有效地利用了大型预训练的语言模型,以超越现有的基线。数据和代码可在https://github.com/Impavidity/XRICL上公开获取。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。