Prompting PaLM for Translation: Assessing Strategies and Performance

David Vilar, Markus Freitag, Colin Cherry, Jiaming Luo, Viresh Ratnakar, George Foster

This study from Google Research provides a rigorous deep dive into the machine translation (MT) capabilities of PaLM (Pathways Language Model), a 540-billion parameter large language model. While LLMs are not explicitly trained on parallel translation data, they exhibit emergent translation abilities through few-shot prompting. The authors move beyond basic benchmarks to evaluate how prompt selection strategies, data quality, and evaluation metrics affect our understanding of LLM performance compared to specialized, state-of-the-art (SOTA) supervised systems.

TL;DR

PaLM achieves impressive few-shot translation performance, but the quality of the examples used in the prompt is far more important than their semantic similarity to the input. While PaLM produces highly fluent text that rivals commercial systems, it still significantly lags behind specialized supervised SOTA models in translation accuracy.

What Problem Does This Paper Address?

Early evaluations of LLMs for translation often relied on older benchmarks and the BLEU metric, which is increasingly criticized for failing to capture the nuances of high-quality, fluent output. Furthermore, the "black box" nature of few-shot prompting leaves a major question: How do we pick the best examples to guide the model?

The authors address this by systematically testing different prompt selection strategies and using modern evaluation frameworks—specifically BLEURT (a neural metric) and MQM (Multidimensional Quality Metrics), an expert-based human evaluation—to provide a more accurate picture of where LLMs stand relative to dedicated translation engines.

Methods

The researchers focused on 5-shot prompting, where the model is given five example translation pairs before the target sentence. They explored two main variables:

  1. Selection Strategy: They compared random selection against $k$-Nearest Neighbor ($k$NN) selection. The $k$NN approach attempts to find examples that are "closest" to the input sentence using either Bag-of-Words (lexical similarity) or RoBERTa embeddings (semantic similarity).
  2. Prompt Pools: They drew examples from three sources:
  3. WMT-full: The massive, somewhat noisy standard training corpora.
  4. WMT-dev: Smaller, cleaner development sets.
  5. High-end: A manually curated pool of professionally edited bilingual articles.

Datasets

The study evaluated translation between English and three high-resource languages: German, Chinese, and French.

  • Evaluation sets: WMT 2021 news sets for German and Chinese; WMT 2014 for French (to allow comparison with the original PaLM paper).
  • Prompting pools: WMT training/dev data and a custom "high-end" pool consisting of aligned paragraphs from high-quality bilingual websites (e.g., NYT, France-Amerique).

Key Insights and Ideas

  • Quality Trumps Proximity: The most striking finding is that the quality of the examples in the prompt matters much more than their similarity to the source sentence. Using a small, high-quality pool (like WMT-dev) consistently outperformed picking "closer" examples from the massive, noisier WMT-full pool.
  • Extreme Sensitivity to Prompts: As shown in Figure 1, the choice of prompt can lead to massive swings in quality. Two different sets of five random examples can result in a difference of over 10 BLEURT points for the same sentence.
Figure 1: Histogram of the sentence-level BLEURT dif- ference between two different 5-shot PaLM runs using the random prompt selection method from the original paper on a corpus of 1000 sentences. Each bar cor- responds to a difference range of 1 BLEURT point. A majority of sentences (516) show a difference of more than 1 BLEURT point, demonstrating that the choice of prompt can strongly affect translation quality.
  • The Fluency-Accuracy Gap: PaLM is a "creative" translator. Human evaluators found that while PaLM's fluency is often on par with or better than SOTA systems, it suffers from accuracy errors, particularly omissions (leaving out parts of the source text) and hallucinations (adding facts not present in the source).
  • English Centricity: PaLM performs significantly better when translating into English than out of English, likely due to the overwhelming prevalence of English in its training data.

Key Results

  • Performance Gap: Specialized SOTA systems (like the WMT21 winners) still hold a substantial lead, typically beating PaLM by 1 to 3 BLEURT points.
  • Comparison to Commercial Systems: PaLM's performance is much closer to general-purpose systems like Google Translate, even reaching parity in some directions like French→English.
  • Selection Strategy: $k$NN selection using RoBERTa embeddings showed promise in noisy pools but offered no consistent advantage over random selection when the pool was already high-quality.
Table 4: Quantitative results across language pairs, showing PaLM (with various pools) vs. SOTA and Google Translate.

Limitations and Future Work

The authors acknowledge several limitations:

  • Scope: The study only looked at high-resource languages and English-centric pairs. Results for low-resource languages may be significantly worse.
  • Context: The experiments were conducted at the sentence level. LLMs have a massive context window that could potentially be leveraged for document-level translation, which might play more to their strengths in fluency and coherence.
  • Prompt Engineering: The study only scratched the surface of prompting techniques. Future work could explore "soft prompting" or more complex "chain-of-thought" templates to see if the accuracy gap can be closed.

Summary updated

BibTeX
@inproceedings{vilar2023prompting,
  author = {David Vilar and Markus Freitag and Colin Cherry and Jiaming Luo and Viresh Ratnakar and George Foster},
  title = {{Prompting PaLM for Translation: Assessing Strategies and Performance}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  url = {https://openreview.net/forum?id=OfWP8qFGEjX},
}
Figure