Building with AILesson 12 of 80

Module 2 · Prompting as engineering

Examples that teach, and examples that mislead

In this lesson

  • 9 min read
  • 6 reading sections
  • Knowledge check
  • Lesson 2 of 10 in this chapter

This chapter’s goalTurn a prompt that works once into a versioned, cached, example-driven interface with a stated behaviour when the model does not know, and justify with cost and latency numbers whether a given task needs a longer prompt, a chain of smaller ones, a reasoning budget, or a fine-tune.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 7Free · no account needed
Lesson steps

Why a few examples beat a paragraph of rules

Describing a format in prose is lossy. Showing it is not. Three worked examples of the input-output pair you want will usually outperform two hundred words of description, because the model is very good at pattern continuation and only moderately good at following abstract instructions.

The effect is largest where the task is easy to demonstrate and awkward to define: tone, how much detail counts as enough, where to draw a category boundary, how to handle the messy input you actually receive rather than the clean one you imagined.

Text
Classify each message as BILLING, TECHNICAL, ACCOUNT or OTHER.

Message: my card was charged twice this month
Label: BILLING

Message: app crashes when I open the reports tab
Label: TECHNICAL

Message: charged twice AND the app crashed while I was checking
Label: BILLING

Message: {{ input }}
Label:

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Python, from Zero, for AI exam.

Stuck on something?Ask Sayali, your AI tutor

How to cite: Addaly (2026) ‘Examples that teach, and examples that mislead’, in Building with AI. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/building-with-ai/examples-that-teach (Accessed: 29 November 2026).