Example

Example of a Code-like Prompt for Machine Translation

A code-like prompt for machine translation structures the task similarly to variable assignments in programming. For instance, to translate an English sentence to Chinese, the prompt could be formatted as: [src-lang] = English [tgt-lang] = Chinese [input] = {*sentence*} [output] = ___. In this template, {*sentence*} is a placeholder for the actual input sentence, and the model is expected to generate the translated text following the [output] = field.

Image 0

0

1

Updated 2026-04-19

Contributors are:

Who are from:

Tags

Ch.2 Generative Models - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences

Related