Leveraging Domain Knowledge at Inference Time for LLM Translation: Retrieval versus Generation

Bryan Li, Jiaming Luo, Eleftheria Briakou, Colin Cherry
3/6/2025
cs.CL

No confident code implementation found for this paper.

Abstract

While large language models (LLMs) have been increasingly adopted for machine translation (MT), their performance for specialist domains such as medicine and law remains an open challenge. Prior work has shown that LLMs can be domain-adapted at test-time by retrieving targeted few-shot demonstrations or terminologies for inclusion in the prompt. Meanwhile, for general-purpose LLM MT, recent studies have found some success in generating similarly useful domain knowledge from an LLM itself, prior to translation. Our work studies domain-adapted MT with LLMs through a careful prompting setup, finding that demonstrations consistently outperform terminology, and retrieval consistently outperforms generation. We find that generating demonstrations with weaker models can close the gap with larger model's zero-shot performance. Given the effectiveness of demonstrations, we perform detailed analyses to understand their value. We find that domain-specificity is particularly important, and that the popular multi-domain benchmark is testing adaptation to a particular writing style more so than to a specific domain.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2025leveraging,
  title  = {Leveraging Domain Knowledge at Inference Time for LLM Translation: Retrieval versus Generation},
  author = {Bryan Li and Jiaming Luo and Eleftheria Briakou and Colin Cherry},
  year   = {2025},
  eprint = {2503.05010},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.05010v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.05010.svg)](https://codeofpaper.com/paper/2503.05010)

Discussion