ToolsPromptsWorkflowsSkillsCompareAbout

Few-Shot Prompting — teach by example

Give the AI 2-3 input/output examples before your real request to lock in format and style.

Prompting4.6

Prompt template

Here are examples of the output format I want:
Input: [example input 1]
Output: [example output 1]

Input: [example input 2]
Output: [example output 2]

Now do the same for:
Input: [your real input]

How to use

  1. 1Prepare 2-3 high-quality input/output pairs
  2. 2Label them 'Input:' and 'Output:' clearly
  3. 3Place your real request last
  4. 4Keep all examples in the same format you want returned

Pro tips

  • Few-shot beats zero-shot for classification and extraction
  • Use the exact template you want the model to mimic

Works best with

PromptingFormat ControlAutomation
Advertisement728 × 90 · reserved slot

Ratings & Reviews

Loading reviews…

Share your experience

Select a rating

Related Skills