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

    Research output: Chapter in Book/Report/Conference proceedingConference contributionAcademicpeer-review

    2 Citations (Scopus)
    29 Downloads (Pure)


    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.
    Original languageEnglish
    Title of host publicationProceedings of the 61st Annual Meeting of the Association for Computational Linguistics
    EditorsAnna Rogers, Jordan Boyd-Graber, Naoaki Okazaki
    Place of PublicationToronto, ON, CA
    PublisherAssociation for Computational Linguistics (ACL)
    Number of pages14
    Publication statusPublished - Jul-2023
    Event61st Annual Meeting of the Association for Computational Linguistics (ACL 2023) - 1 Harbour Square, Toronto, ON M5J 1A6, Canada, Toronto, Canada
    Duration: 9-Jul-202312-Jul-2023


    Conference61st Annual Meeting of the Association for Computational Linguistics (ACL 2023)
    Abbreviated titleACL 2023
    Internet address


    • large language models
    • machine translation
    • Style transfer
    • natural language generation
    • prompting
    • information retrieval
    • Amazon AWS AI

      Gabriele Sarti (Visiting researcher)


      Activity: Visiting an external institutionProfessional

    Cite this