Example

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.

Image 0

0

1

Updated 2026-04-30

Contributors are:

Who are from:

Tags

Ch.3 Prompting - Foundations of Large Language Models

Foundations of Large Language Models

Computing Sciences

Foundations of Large Language Models Course