Few-Shot Template
A few-shot prompt template — three worked examples, one fresh input — for tasks where the model needs to see the shape before producing it.
Clean few-shot scaffold with input/output examples.
Prompt
Your task: {{TASK_DESCRIPTION}}
Examples:
<example>
<input>{{INPUT_1}}</input>
<output>{{OUTPUT_1}}</output>
</example>
<example>
<input>{{INPUT_2}}</input>
<output>{{OUTPUT_2}}</output>
</example>
<example>
<input>{{INPUT_3}}</input>
<output>{{OUTPUT_3}}</output>
</example>
Now do the same for:
<input>{{NEW_INPUT}}</input>
Variables
{{TASK_DESCRIPTION}}— what the model should do{{INPUT_N}}/{{OUTPUT_N}}— example pairs{{NEW_INPUT}}— the input to process
When to Use
- Classification tasks
- Format conversion
- Style matching
- Any task where examples are clearer than instructions