Module 1 · Foundations of Agentic AI · scripted
Exercise: Train by Example
The rule: no sentences
In this exercise you will teach an LLM to perform tasks using examples only. The discipline is strict, and it is the whole point:
The rule
The user prompt may contain NO sentences and NO instructions — only the pattern: examples, then one example left incomplete. The ONLY imperative in the entire conversation lives in the system prompt, and it says just one thing: "Complete the pattern. Output only the completion, with no explanation." Everything the model needs to know, the examples must teach.
You are building the intuition behind in-context learning: how much a handful of examples can carry — labels, boundaries, whole procedures — with nothing explained in words.
The exercise at a glance
- 1Part 1: teach a classifier with labeled examples alone.
- 2Part 2: teach a whole procedure — with and without a thought: line.
- 3Part 3: repair a wobbly pattern with the smallest possible declaration.
- 4Save every pattern that works — we read the libraries together at the end.
The exercise playground
For this exercise we have built an exercise playground — the Pattern Trainer — to help you do it. It is two boxes and a Send button: the system box already holds the one permitted instruction, and the user box holds your pattern of examples. Nothing else gets between your examples and the model, so what the pattern teaches is all the model gets. A template menu offers a dozen starting shapes, and a Save button builds you a small library of trained patterns as you go.
You can also do the exercise in ChatGPT, Claude, or Gemini instead — if you're going to use one of those tools, click here for the instructions →.
How the playground works
- 1Open it.The link: /exercises/pattern-trainer — or scan the QR code on the next card.
- 2Leave the system box alone.It already says the only thing it's allowed to say: "Complete the pattern. Output only the completion, with no explanation."
- 3Write your pattern of examples in the user box — ending with one example left incomplete — and press Send.The completion appears below.
- 4Use the template menu for starting shapes, and press Save on every pattern that works.Your saved library is what we read together at the end.
Scan to open the Pattern Trainer

Two templates in the menu deserve a special look. Wacky language
teaches a notation no human has ever spoken — arrows, suns, moons, a
~ and a ? — through five translations, then asks the model to
write in it. Notice what you never wrote: a legend. The examples
alone carry the grammar, and the final line asks for generation, not
just decoding. Notice, too, how much sentence fits in six glyphs —
the invented language is denser than the English it translates. Then
invent your own: new symbols, a new hidden rule, and see how few
examples the model needs to speak it.
And Structured edits gives
the model a line-numbered document and two ways to say an edit —
"line 4:
Part 1 · Classification
Part 1 · What you'll do
- 1Load the starter classification template and Send it.Its shape is below — examples, then one left incomplete.
- 2Rebuild it for your own domain.Pick a domain with an inherent fixed set of labels — three to five classes — and write four to six labeled examples, ending with an incomplete one. Get the model outputting the correct label, and ONLY the label.
- 3Probe it: how few examples can you get away with?Delete examples one at a time and re-Send.
- 4Write a genuinely borderline case as the incomplete example.Does the implied boundary hold? Add ONE example that quietly teaches that boundary, and try again.
The shape
…
Capture — end of Part 1
Copy into your course document and save:
- 1Your best pattern — Saved in the trainer, and copied verbatim.
- 2The fewest examples that still classified correctly.
- 3The borderline case, and the single example you added to fix it.
Part 2 · Problem solving
Examples can teach more than labels — they can teach procedure. Two shapes to build and compare, on the same kind of problem:
Part 2 · What you'll do
- 1Write ONE worked example in each shape below, for a problem type from your domain.Diagnosing something, routing something, working through a calculation.
- 2Give both patterns the SAME new problem, and Send each.
- 3Compare the two completions.Does the thought: line change the QUALITY of the chosen actions — or only the verbosity?
Without thinking
With thinking
Capture — end of Part 2
Copy into your course document and save:
- 1Both patterns, Saved.
- 2The same new problem's completion under each — side by side.
- 3One sentence: what did thought: buy, if anything?
Part 3 · When examples want a little help
Pure examples sometimes wobble: the model invents a label that wasn't in your set, or misreads the boundary you meant. The fix is rarely a paragraph. Notice that none of these are sentences either:
Declarations that aren't prose
A brace-enclosed set, a dash list of rules, a range written
0..10 — these look instructive because the model has seen a
million files that use them. Formats carry trained meaning the
same way words do; you don't need to write everything out in
prose to be understood.
Part 3 · What you'll do
- 1Find a case where your Part 1 or Part 2 pattern misbehaves.Force one if needed — feed it an input far outside your examples.
- 2Repair it with the SMALLEST possible declaration.One labels: line, one rule, one allowed range — count the words you added.
- 3Re-Send and confirm the fix.
Before we regroup
Keep one document for this course. Copy each item below into it and save — we will load and read the pattern libraries together at the end: the domains people chose, the fewest-examples records, the thought:/no-thought comparisons, and the smallest declarations that fixed a misbehaving pattern.
Copy into your course document and save:
- 1The misbehavior from Part 3: the input and the wrong completion.
- 2The declaration line(s) you added — with the word count.
- 3The corrected completion.
Be ready to discuss:
- Where was the boundary between what examples alone could teach and what needed a declaration? State it as a rule of thumb.
- Your Part 2 pattern taught a procedure with no instructions at all. What else in your research could be taught as a trace of worked steps?