Learn Before
Examples of Key-Value Pairs in a Code-Style Translation Prompt
In a code-style translation prompt, demonstrations are often formatted as key-value pairs, sometimes called a 'name:content' style. These pairs specify the language and the corresponding text. For example, [English] = [I have an apple.], [German] = [Ich habe einen Apfel.], and [English] = [I have an orange.] are all concrete instances of this format, which can be used to construct few-shot learning prompts for translation tasks.
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 Name:Content Prompt for Conversation
Example of a Name:Content Prompt for Question-Answering
Example of a Code-like Prompt for Machine Translation
Storing Prompt Data in Key-Value Formats like JSON
Example of a Code-Style Demonstration for English-to-German Translation
Examples of Key-Value Pairs in a Code-Style Translation Prompt
A developer is building a system to extract structured information from customer support emails. Their initial prompt, 'From the following email, extract the customer's name, order number, and the core issue,' often results in the language model producing a long, narrative paragraph that mixes the requested information with other details. Which of the following best explains why adopting a
name:contentformatting style, where the model is prompted to complete fields likecustomer_name:,order_number:, andissue_summary:, would be a more effective strategy?Designing a Structured Prompt for Recipe Generation
A developer is creating a few-shot prompt to teach a language model how to convert informal user requests into a structured JSON object for an internal API. The goal is to extract the user's name and the item they want to order. Which of the following prompts most effectively uses a clear, key-value formatting style to structure the task and guide the model toward a reliable output?
Example of a Name:Content Prompt for Task Specification
Learn After
You are constructing a prompt to teach a language model how to translate from French to Spanish. You want to provide one complete example: the French phrase 'Bonjour le monde' and its Spanish equivalent 'Hola mundo'. Which of the following demonstrates the correct way to format this single, complete example using a key-value structure where the language name is the key?
Debugging a Few-Shot Translation Prompt
Constructing a Few-Shot Translation Prompt