In-context Examples Selection for Machine Translation
Agrawal, Sweta, Zhou, Chunting, Lewis, Mike, Zettlemoyer, Luke, Ghazvininejad, Marjan
–arXiv.org Artificial Intelligence
Large-scale generative models show an impressive ability to perform a wide range of Natural Language Processing (NLP) tasks using in-context learning, where a few examples are used to describe a task to the model. For Machine Translation (MT), these examples are typically randomly sampled from the development dataset with a similar distribution as the evaluation set. However, it is unclear how the choice of these in-context examples and their ordering impacts the output translation quality. In this work, we aim to understand the properties of good in-context examples for MT in both in-domain and out-of-domain settings. We show that the translation quality and the domain of the in-context examples matter and that 1-shot noisy unrelated example can have a catastrophic impact on output quality. While concatenating multiple random examples reduces the effect of noise, a single good prompt optimized to maximize translation quality on the development dataset can elicit learned information from the pre-trained language model. Adding similar examples based on an n-gram overlap with the test source significantly and consistently improves the translation quality of the outputs, outperforming a strong kNN-MT baseline in 2 out of 4 out-of-domain datasets.
arXiv.org Artificial Intelligence
Dec-5-2022
- Country:
- Asia > Vietnam (0.04)
- North America > United States
- Maryland (0.04)
- Minnesota > Hennepin County
- Minneapolis (0.14)
- Louisiana > Orleans Parish
- New Orleans (0.04)
- Europe
- Czechia > Prague (0.04)
- Italy > Tuscany
- Florence (0.04)
- Ireland > Leinster
- County Dublin > Dublin (0.04)
- Denmark > Capital Region
- Copenhagen (0.04)
- Belgium
- Brussels-Capital Region > Brussels (0.04)
- Flanders > East Flanders
- Ghent (0.04)
- Genre:
- Research Report > New Finding (0.68)
- Technology: