Skip to content
Service status

Type to search

Prompting Course: Basics

Use examples for better results

Few-shot thinking: show your desired format and tone instead of just describing it.

Section 3: Use examples for better results

Section titled “Section 3: Use examples for better results”

Learning objectives

  • Understand why examples often beat pure explanation
  • Know roughly how many examples to start with
  • Create simple but effective examples
Show rather than just explain

A concrete example shows tone, format, and level of detail in a way that’s hard to capture in abstract terms.

Without example – task only:

TASK: Categorize customer emails into the right category.
CATEGORIES: Technical support, Billing questions, Product information

With examples:

TASK: Categorize customer emails into the right category.
CATEGORIES: Technical support, Billing questions, Product information
EXAMPLES:
Email: "My app crashes every time I try to log in."
Category: Technical support
Email: "Why have I been charged an extra 299 kr?"
Category: Billing questions
Email: "Does product X support Bluetooth 5.0?"
Category: Product information
How many examples?
  1. Start with none – see if the model handles the task.
  2. Add one – often enough.
  3. Two to three if responses still vary too much.
How to create good examples
  • Realistic – close to the actual phrasing you receive in practice.
  • Variation – different types of customers or case types if needed.

Avoid repeating the same tone and situation if you want to teach the model breadth.

  • Examples = pattern for tone, format, and detail.
  • Start small (0–1), increase only if needed.
  • Make them realistic and varied where appropriate.

Test your knowledge

Question 1 of 2

Question 1 of 2

You're building a customer service assistant and add two examples to show variation. Which option follows the course's advice best?

You're building a customer service assistant and add two examples to show variation. Which option follows the course's advice best?