ACL2023
RAMP: Retrieval and Attribute-Marking Enhanced Prompting for Attribute-Controlled Translation
Gabriele Sarti, Phu Mon Htut, Xing Niu, Benjamin Hsu, Anna Currey, Georgiana Dinu, Maria Nadejde
3 citations
Abstract
Attribute-controlled translation (ACT) is a subtask of machine translation that involves controlling stylistic or linguistic attributes (like formality and gender) of translation outputs. While ACT has garnered attention in recent years due to its usefulness in real-world applications, progress in the task is currently limited by dataset availability, since most prior approaches rely on supervised methods. To address this limitation, we propose Retrieval and Attribute-Marking enhanced Prompting (RAMP), which leverages large multilingual language models to perform ACT in few-shot and zero-shot settings. RAMP improves generation accuracy over the standard prompting approach by (1) incorporating a semantic similarity retrieval component for selecting similar in-context examples, and (2) marking in-context examples with attribute annotations. Our comprehensive experiments show that RAMP is a viable approach in both zero-shot and few-shot settings. * Work conducted during an internship at Amazon. 𝒟 ! labeled examples EN: You will always be welcome here. ES formal: Siempre será bienvenido aquí. EN: I wish you welcome and enjoy your stay. IT formal: Le do il benvenuto e si goda il soggiorno. Here is a sentence: You will always be welcome here. Here is its Spanish translation written in a formal style: Siempre será bienvenido aquí. The translated sentence conveys a formal style by using words such as 'será'. ----Here is a sentence: I wish you welcome and enjoy your stay. Here is its Italian translation written in a formal style: Le do il benvenuto e si goda il soggiorno. The translated sentence conveys a formal style by using words such as 'Le', 'si goda'. ----Here is a sentence: You're welcome. Here is its French translation written in a formal style: EN: You're welcome. FR formal: input ✗ ✓ ✓ similarity retrieval 𝒌 = 𝟐 • source & target • language & attribute • attribute marker Large Language Model Je vous en prie.