An exercise to try
Teach a boundary with one example
One example in a prompt can teach more than you meant. Label five visitor questions yourself, read supplied runs with and without an example, test your explanation of what changed on a sixth question, then test a second example as a separate question.
- Time
- 25 minutes
- What you need
- This page and a place to write. A chatbot is optional.
Illustration. The repair club, its notices, the questions and every label in the runs here are invented teaching material, not outputs from a model.
The notices and the task
March notice. Saturday repairs run from 10 am to noon. Bring one item. Entry is free.
April update. From 3 April, Saturday repairs run from 1 pm to 3 pm. The one-item limit still applies. This update changes the hours only.
A volunteer wants a chatbot to sort visitor questions into those the notices answer and those they do not. Every run starts with this instruction:
“Label each visitor question below. Write ANSWER if the two notices answer it, or NOT SAID if they do not. Add a reason of a few words.”
- B1. “Is entry free on Saturdays?”
- B2. “Is a new fuse free?”
- B3. “Can I bring two lamps?”
- B4. “Do I need to book a place?”
- B5. “Did the April update change the one-item rule?”
Step 1. Label the five questions yourself
Before anything else, label B1 to B5 as the instruction asks, with a reason for each. Your labels become the key the runs are graded against, so check each one against the exact words of the notices.
Check your labels
- B1. ANSWER. The March notice says entry is free; the update changes the hours only.
- B2. NOT SAID. The notices give no price for parts.
- B3. ANSWER. One item only.
- B4. NOT SAID. Neither notice mentions booking.
- B5. ANSWER. No: the update says the limit still applies.
Step 2. Predict what one example will change
Runs 2 and 3 add one example. Run 2 uses the name Ola, run 3 the name Ben; nothing else changes:
“Example. Ola asks: "Is a new zip free?" Label: NOT SAID. Reason: the notices say entry is free, not what parts cost.”
Two words help here. An exception is a question that a quick reading of the notices gets wrong. A near neighbour looks like the exception on the surface but belongs on the other side of the boundary between what the notices answer and what they do not.
Write which of B1 to B5 is the exception and which is its near neighbour. Then predict which labels the example will change, in which direction, and whether changing Ola to Ben should matter.
Step 3. Grade the three runs
Open the runs only after you have written your prediction. Grade each run against your labels: count the correct labels per run, then list the cases whose label changed between run 1 and run 2, and between run 2 and run 3.
The three runs (open after step 2)
Run 1 has no example. Run 2 adds Ola's example. Run 3 has the same example with Ben.
- B1. Run 1 ANSWER, run 2 NOT SAID, run 3 NOT SAID.
- B2. Run 1 ANSWER, run 2 NOT SAID, run 3 NOT SAID.
- B3. Run 1 ANSWER, run 2 ANSWER, run 3 ANSWER.
- B4. Run 1 NOT SAID, run 2 NOT SAID, run 3 NOT SAID.
- B5. Run 1 ANSWER, run 2 ANSWER, run 3 ANSWER.
Reasons given for the wrong labels:
- B2, run 1: “entry is free, so yes”
- B1, run 2: “the notices do not say what things cost”
- B1, run 3: “the notices do not say what things cost”
Check your counts
- Correct labels: run 1 4 of 5, run 2 4 of 5, run 3 4 of 5.
- Changed between run 1 and run 2: B1 and B2. Changed between run 2 and run 3: none.
- With the example, B2 became right and B1 became wrong.
The totals are equal and hide the change. B2 is the exception and B1 its near neighbour. Both ask whether something is free, and they sit on opposite sides of the boundary: the notices cover hours, the item limit and entry, and say nothing about parts or booking.
Common wrong answer: “the example made no difference” (4 of 5 both times).
Step 4. Explain the change as rules you can test
Write every explanation you can think of for why B1 went wrong once the example was added, and one for why Ola and Ben gave the same labels. Write each as a rule that says which labels the example changes, so that it predicts a label for any question. A rule like that is a hypothesis: a guess you can test, not a finding.
Three hypotheses to compare with yours
- H-free. The example changes a label to NOT SAID only when the question contains the word “free”. Every other question keeps its run 1 label.
- H-cost. The example changes a label to NOT SAID when the question asks about cost (it contains free, charge, cost, pay or price). Every other question keeps its run 1 label.
- H-name. Changing the name in the example from Ola to Ben changes no label: run 3 repeats run 2.
On B1 to B5, H-free and H-cost predict the same run 2 label for every question, so those five cannot tell the two rules apart. A question about cost without the word free can.
Step 5. Test the rules on a sixth question
B6. “Is there a charge to come in?”
B6 asks about cost without the word free. In run 1, with no example, it was labelled ANSWER. Before you open the result, write the key label from the notices, then the run 2 label that H-free predicts for it and the run 2 label that H-cost predicts. Check both rules against the run 2 labels of B1 to B5 as well.
The result for B6 (open after step 5)
B6. Key ANSWER, run 1 ANSWER, run 2 NOT SAID.
Reason given in run 2: “the notices do not say what things cost”.
Check your work
Key for B6: ANSWER. The March notice says entry is free; the update changes the hours only.
What each rule predicts for run 2, beside what run 2 gave:
- B1. Run 2 gave NOT SAID. H-free predicts NOT SAID; H-cost predicts NOT SAID.
- B2. Run 2 gave NOT SAID. H-free predicts NOT SAID; H-cost predicts NOT SAID.
- B3. Run 2 gave ANSWER. H-free predicts ANSWER; H-cost predicts ANSWER.
- B4. Run 2 gave NOT SAID. H-free predicts NOT SAID; H-cost predicts NOT SAID.
- B5. Run 2 gave ANSWER. H-free predicts ANSWER; H-cost predicts ANSWER.
- B6. Run 2 gave NOT SAID. H-free predicts ANSWER; H-cost predicts NOT SAID.
H-free matches 5 of 6 run 2 labels. It misses B6, where it predicts the run 1 label (ANSWER) because the word free is absent, and the run gave NOT SAID. H-cost matches 6 of 6. So H-cost fits these runs better: the example seems to have taught “questions about cost get NOT SAID”, which is still a surface feature, not the rule. One run each is a reason to test further, not proof.
H-name matches 5 of 5 run 3 labels. That fits, but it cannot establish the rule, from one run of each on five questions.
Common wrong answer: “the name had no effect”, stated as a finding.
These runs show that one example can move a near neighbour; they cannot say how often that happens.
Step 6. Does a second example help?
Steps 4 and 5 asked which explanation fits, with Ola's example held fixed. Adding an example changes the prompt, so it answers a different question: does the new example fix the errors? The fair test compares Ola alone (run 2) with Ola plus the new example on the same six questions.
First write a second example of your own, in the same format as Ola's, from the side of the boundary that broke. Wording alone cannot tell you whether it helps; only a run can.
Run 4 tests one such example. Its prompt is the run 2 prompt with one line added:
“Example. Kim asks: "Do I have to pay anything to come in and watch?" Label: ANSWER. Reason: the March notice says entry is free.”
Kim's question asks about cost without the word free. Before you open the result, write the label you expect run 4 to give each of B1 to B6, and which cases you expect it to fix, leave wrong or break compared with run 2.
Run 4 beside run 2 and the key (open after step 6)
- B1. Key ANSWER, run 2 NOT SAID, run 4 ANSWER.
- B2. Key NOT SAID, run 2 NOT SAID, run 4 NOT SAID.
- B3. Key ANSWER, run 2 ANSWER, run 4 ANSWER.
- B4. Key NOT SAID, run 2 NOT SAID, run 4 NOT SAID.
- B5. Key ANSWER, run 2 ANSWER, run 4 ANSWER.
- B6. Key ANSWER, run 2 NOT SAID, run 4 ANSWER.
Reasons given in run 4 for the labels that changed:
- B1: “the March notice says entry is free”
- B6: “entry is free, so there is no charge to come in”
Check your work on run 4
- Correct labels: run 2 4 of 6, run 4 6 of 6.
- Fixed: B1 and B6. Still wrong: none. Broken: none.
In this one run, adding Kim's example fixed both entry-cost questions and broke nothing, including B2, the part-price question on the other side. The supplied labels score 6 of 6. One run like this cannot show how often a prompt does so, whether it holds on questions not tried here (another part price, another way of asking about entry), or why it helped. Nor does it settle H-free against H-cost: the prompt changed, so that question belongs to B6 and runs 1 and 2. Before relying on it, rerun run 4 several times and add new near neighbours.
Common wrong answers: “Kim's example proves H-cost”; “the prompt is fixed now”.
Check your own example against this. If it asks about entry cost and takes the label ANSWER, it sits on the side that broke, as Kim's does. If it is another question about a part, it repeats what Ola's example already teaches. Either way, it is untested until it is run.
Step 7 (optional). Run it with a chatbot
Open a new chat for each run. Paste the instruction, the two notices and the six questions. Then run it again with Ola's example added, again with Ben's, and again with Ola's and Kim's. Grade every run against your labels, case by case. Your chatbot may label every case correctly, or go wrong somewhere else. Either way, the lesson is in the cases that change between runs, not in the totals. Keep the two questions apart: to test an explanation, keep the prompt fixed and add a question that separates the explanations; to test a fix, change the prompt and rerun the same questions.
Try a different case
Instead of a second example, write one sentence for the instruction that states the boundary in words. Which run would you compare it with, on which questions, and what would you change and keep the same?
Check this one too
One sentence to try: “The notices answer questions about entry, hours and the item limit; they say nothing about parts or booking.” Add it to the run 2 prompt and change nothing else, then compare with run 2 on the same six questions, B1, B2 and B6 included. A case it fixes and a case it breaks both count. Until it is run, the sentence is a guess, and one run shows only that it can help, not how often.
Where this sits: What does an example teach? in the prompting long read, and the short page What one example teaches. As of November 2026, Anthropic's prompting guide for its current Claude models asks for varied examples: “Cover edge cases and vary enough that Claude doesn’t pick up unintended patterns.” Next step: test one request in two wordings.