Towards Making the Most of ChatGPT for Machine Translation

Keqin Peng, Liang Ding, Qihuang Zhong, Li Shen, Xuebo Liu, Min Zhang, Yuanxin Ouyang, Dacheng Tao

Abstract

Large Language Models (LLMs) like ChatGPT have demonstrated remarkable capabilities across various natural language tasks, yet their performance in machine translation (MT) often remains inconsistent compared to specialized commercial engines. This paper investigates the "task gap"—the discrepancy between ChatGPT's conversational fine-tuning and the requirements of formal translation. By systematically evaluating decoding temperatures and prompt engineering strategies, including Task-Specific Prompts (TSP) and Domain-Specific Prompts (DSP), we identify an optimal configuration that allows ChatGPT to match or outperform systems like Google Translate. Notably, we find that the popular Chain-of-Thought (CoT) prompting technique is counter-productive for translation, leading to significant quality degradation.

Introduction

While ChatGPT is a proficient "instruction follower," it is not natively a specialized translation engine. In high-resource language pairs like English-German, it performs admirably; however, it often struggles with low-resource languages, distant language pairs, and specialized domains. This research addresses the "task gap" resulting from the model's conversational training, which differs significantly from the linguistic distribution of formal translation. Most users utilize "vanilla" prompts that lack sufficient context, often resulting in hallucinations or sub-optimal fluency. This study seeks to establish an "optimal recipe" for prompting ChatGPT to function as a high-performing MT system.

Methodology

The researchers explored three primary dimensions of the LLM translation pipeline to bridge the performance gap:

1. Temperature Optimization

In MT, certainty and determinism are generally preferred over creative variety. The study tested the model across a range of temperatures ($T=0$ to $T=1$), hypothesizing that lower temperatures would yield more stable and accurate translations.

2. Prompt Engineering (TSP and DSP)

To anchor the model's persona, the researchers introduced Task-Specific Prompts (TSP), such as: "You are a machine translation system." To further refine performance in specialized fields, they utilized Domain-Specific Prompts (DSP), providing context such as: "You are a machine translation system that translates sentences in the biomedical domain."

3. In-Context Learning (ICL) and Chain-of-Thought (CoT)

The study evaluated few-shot learning (providing 1 or 3 examples) using "TopK" sampling, which selects examples most similar to the source text. Additionally, they tested the Chain-of-Thought (CoT) strategy, asking the model to translate "step-by-step" to see if reasoning improved linguistic mapping.

Experimental Setup

The study utilized a diverse set of benchmarks to ensure robustness:

  • Flores-200: For general multilingual translation across English, German, Chinese, and Romanian.
  • WMT19 News & Biomedical: To evaluate performance in high-stakes, specialized domains.
  • WMT22 E-Commerce: To test the model on out-of-distribution data likely underrepresented in the training set.

Key Insights and Results

The Determinism Factor

The results confirmed a clear correlation between temperature and quality: as temperature increases, translation quality (measured by COMET and BLEU) consistently drops. $T=0$ was identified as the optimal setting for stability and accuracy in translation tasks.

The CoT Paradox

A significant finding of this research is that Chain-of-Thought (CoT) degrades translation quality. While CoT is highly effective for mathematical or logical reasoning, in MT, asking for a "step-by-step" breakdown forces the model into a fragmented, word-by-word translation mode. This destroys sentence-level fluency. In English $\Rightarrow$ Chinese tests, CoT caused a massive drop of 8.8 COMET points.

Prompt Effectiveness and Commercial Comparison

Adding the simple TSP instruction ("You are a machine translation system") consistently boosted COMET scores, particularly for difficult pairs like English $\Rightarrow$ Chinese and English $\Rightarrow$ Romanian. Furthermore, with Domain-Specific Prompts, ChatGPT outperformed Google Translate on specific tasks, such as WMT19 Bio (ZH $\Rightarrow$ EN) and WMT19 News (EN $\Rightarrow$ ZH).

Hallucinations in Non-English Pairs

When translating between two non-English languages (e.g., Chinese to Romanian), ChatGPT frequently hallucinates "chatter" (e.g., adding phrases like "This can be translated as..."). While TSP helps mitigate this, it remains a challenge for tasks that do not involve English as a source or target.

Conclusion and Future Work

This study demonstrates that ChatGPT's internal knowledge base is a powerful resource for translation when accessed with the correct "map." By using deterministic decoding ($T=0$) and specific persona-based prompts, ChatGPT can rival specialized commercial engines.

Future research should focus on more sophisticated prompt engineering, such as "human-like" CoT that emphasizes grammatical structure over word-by-word mapping. Additionally, exploring how these strategies scale to document-level translation and improving example selection for few-shot learning remain critical areas for closing the gap with specialized MT models.

Summary updated

BibTeX
@inproceedings{peng2023towards,
  author = {Keqin Peng and Liang Ding and Qihuang Zhong and Li Shen and Xuebo Liu and Min Zhang and Yuanxin Ouyang and Dacheng Tao},
  title = {{Towards Making the Most of ChatGPT for Machine Translation}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.373},
}
Figure