Example of a Few-Shot Prompt for Chinese-to-English Translation
A few-shot learning prompt can utilize a simple pattern to guide a model in a translation task. For instance, to translate Chinese words into English, several demonstrations are provided to establish the input-output format, followed by a new user query for the model to process. An example of such a prompt is:
DEMO 现在 → now 来 → come 去 → go 男孩 → boy
USER 女孩 →

0
1
Tags
Ch.3 Prompting - Foundations of Large Language Models
Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Related
Example of a Sentiment Classification Task Instruction
Example of a Few-Shot Prompt for Chinese-to-English Translation
Example of a Positive Sentiment Text Snippet for Classification
A user provides a language model with the text below. By analyzing the structure and the relationship between the inputs and outputs, determine the specific task the user is instructing the model to perform.
Review: This movie was a masterpiece. The acting was superb.Sentiment: PositiveReview: I was really disappointed with the plot.Sentiment: NegativeReview: The film was okay, but not memorable.Sentiment: NeutralDesigning a Prompt for Information Extraction
Predicting Model Output from a Pattern
Example of a Few-Shot Prompt for Chinese-to-English Translation
A developer is crafting a prompt to have a large language model extract the primary color from a product description. Below are two approaches for the examples (demonstrations) within the prompt:
Approach A: Text: "This t-shirt comes in a vibrant shade of royal blue." Color: The main color is blue. Text: "The car's exterior is painted a deep, glossy black." Color: The main color is black.
Approach B: Text: "This t-shirt comes in a vibrant shade of royal blue." -> blue Text: "The car's exterior is painted a deep, glossy black." -> black
Based on common principles for guiding language models, which approach is generally more effective and why?
Critique and Refine a Few-Shot Prompt
Optimizing a Sentiment Analysis Prompt
Learn After
A user provides the following text to a large language model to teach it a simple rule for making words plural:
cat → cats dog → dogs book → books fish →
Based on the specific pattern established by the examples provided, what is the most probable output the model will generate for the last line?
Analyzing a Flawed Translation Prompt
Constructing a Few-Shot Prompt