Skip to main content
QUICK REVIEW

[Paper Review] XRICL: Cross-lingual Retrieval-Augmented In-Context Learning for Cross-lingual Text-to-SQL Semantic Parsing

Peng Shi, Rui Zhang|arXiv (Cornell University)|Oct 25, 2022
Topic ModelingComputer Science4 citations
TL;DR

This paper proposes XRICL, a cross-lingual retrieval-augmented in-context learning framework for zero-shot cross-lingual Text-to-SQL semantic parsing. It retrieves relevant English exemplars and uses a translation-instruction prompt to guide large language models like Codex to translate non-English queries into SQL, achieving state-of-the-art performance on multilingual benchmarks including XSpider and XKaggle-dbqa.

ABSTRACT

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.

Motivation & Objective

  • Address the lack of effective cross-lingual Text-to-SQL semantic parsing methods for non-English languages using in-context learning with large language models.
  • Overcome the challenge of zero-shot transfer where no labeled examples exist in the target language.
  • Improve few-shot in-context learning performance by retrieving and reranking relevant English exemplars for non-English queries.
  • Facilitate cross-lingual generalization by introducing a global translation exemplar that guides the model to translate the query into English before generating SQL.
  • Systematically evaluate the framework on newly constructed multilingual benchmarks to assess zero-shot cross-lingual transfer capabilities.

Proposed method

  • Train an English exemplar retriever using mT5 to retrieve relevant English question-SQL pairs based on cross-lingual semantic similarity.
  • Use self-distillation with soft labels from the LLM (Codex) to refine the retriever’s performance without requiring human-annotated feedback.
  • Apply a reranking module to re-rank retrieved exemplars based on their likelihood under the LLM’s generation distribution.
  • Construct a prompt that includes a translation exemplar instructing the model to first translate the non-English query into English before generating the SQL query.
  • Use chain-of-thought prompting via the translation exemplar to improve reasoning and cross-lingual alignment during inference.
  • Integrate the retrieved exemplars and the translation prompt into the in-context learning setup for Codex to generate SQL queries.

Experimental results

Research questions

  • RQ1Can in-context learning with large language models like Codex effectively perform zero-shot cross-lingual Text-to-SQL parsing without any labeled examples in the target language?
  • RQ2How effective is retrieval-augmented exemplar selection in improving few-shot in-context learning for cross-lingual semantic parsing?
  • RQ3Does incorporating a translation exemplar as a chain-of-thought prompt improve cross-lingual generalization in Text-to-SQL generation?
  • RQ4How does the proposed framework compare to strong baselines in terms of exact match accuracy across multiple low-resource languages?
  • RQ5To what extent can a single translation exemplar for each language pair generalize across diverse non-English queries?

Key findings

  • XRICL outperforms strong baselines, including the Template Oracle, achieving 52.5 EM accuracy on the full XSpider dataset and 58.0 on the subset.
  • The retrieval and reranking components significantly improve exemplar quality, leading to a substantial performance gain over random or unrefined retrieval.
  • Adding a global translation exemplar as a chain-of-thought prompt further improves performance, demonstrating its effectiveness in bridging the cross-lingual gap.
  • The framework achieves state-of-the-art results on both XSpider and XKaggle-dbqa benchmarks across four languages: Chinese, Vietnamese, Farsi, and Hindi.
  • The self-distilled retriever trained on LLM-generated soft labels achieves strong zero-shot cross-lingual retrieval performance without requiring target-language annotations.
  • The model shows strong generalization across diverse languages, indicating that the framework is effective even with minimal language-specific data.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.