Example of a Prompt Template for Generating Instructions from Input-Output Pairs
To have a Large Language Model infer and generate an instruction from examples, one can use a template that provides the input-output pairs explicitly. For instance:
You are provided with several input-output pairs for a task. Please write an instruction for performing this task. Input: *input1* Output: *output1* Input: *input2* Output: *output2* ...
This formatting allows the model to deduce the correct task instruction.

0
1
Tags
Ch.3 Prompting - Foundations of Large Language Models
Foundations of Large Language Models
Computing Sciences
Foundations of Large Language Models Course
Related
Example of a Prompt Template for Generating Instructions from Input-Output Pairs
Instruction Inference from Input-Output Pairs
A developer wants a language model to generate a clear instruction for the task of 'summarizing a long paragraph into a single, concise sentence.' To do this, they will provide the model with a set of input-output examples and ask it to infer the instruction. Which of the following sets of examples is most likely to result in the desired instruction?
Diagnosing Issues in Instruction Inference
Crafting Examples for Instruction Inference
Learn After
A developer wants a language model to generate a clear, general instruction for the task of converting informal date expressions into a standard YYYY-MM-DD format. They have several examples of inputs and their corresponding outputs. Which of the following prompts is best structured to have the model generate the desired task instruction, rather than just performing the task on a new input?
Diagnosing a Flawed Prompt for Instruction Generation