Neither alone is as good as both
A stated rule generalises but is often imprecise. An example is precise but does not tell you what it is an example of. Put them together and each covers the other’s weakness.
Rule alone:
Classify by what the customer is asking for, not by what went wrong.
Clear, and it leaves you wondering how it applies to a parcel that arrived smashed.
Example alone:
"My parcel arrived smashed and I want my money back." → refundPrecise, and the model has to infer why. It might infer your rule. It might infer “anything mentioning money is a refund”, which will fail on the next message.
Together:
Classify by what the customer is asking for, not by what went wrong.
"My parcel arrived smashed and I want my money back." → refund
(damage is what went wrong; money is what they want)Now the example demonstrates the rule and the annotation names the reasoning, so it transfers to cases you never showed.
Annotate the label, not the input
The parenthetical is doing real work, and it is the part most people leave out. A one-line reason attached to each awkward example is the cheapest generalisation you can buy.
This matters most where two examples look similar and get different labels. Without a reason, that pair looks like noise, and inconsistent-looking examples do more harm than no examples at all.
"Cancel my order, it's late." → cancellation (they want it stopped)
"Where is my order? It's late." → delivery (they want information)Two nearly identical inputs, two labels, one word of explanation each. That pair teaches more than six unannotated examples.
Which to write first
Write the rule first, always, even if you end up deleting it.
Trying to state the rule is how you find out whether one exists. Sometimes you write it in a sentence and discover you do not need examples. Sometimes you get three clauses in, hit a case the rule cannot cover, and you have found exactly the example to show. Either outcome is progress, and you cannot get either by starting with examples.
When the rule cannot be written
Some things resist statement. House tone. What counts as “too salesy”. Which level of detail your director wants. Whether a photo is on-brand.
Here, show and approximate. Give the examples, then state the rule as best you can, marked as approximate:
These three replies are the tone we want. Roughly: warm, no exclamation marks, no apology unless we were at fault, first names, under 100 words. The examples take priority where my description and they disagree.
That last clause matters. You have told the model which source wins, which stops it splitting the difference between your imperfect description and your accurate demonstration.
The same structure works for output shape
Output one line per row: `date | supplier | amount | VAT included?`
Dates as YYYY-MM-DD. Amounts with no currency symbol and no
thousands separator. If VAT is not stated, write `unknown`.
2026-03-14 | Adeyemi Ltd | 45200.00 | unknownRule, then one instance. The instance settles a dozen small questions the rule left open (spacing around the pipes, decimal places, capitalisation) that you would otherwise discover as inconsistencies in row 40.
The compact form
For most working prompts, this is the whole pattern:
- One or two sentences of rule.
- Two to four examples, awkward ones, each annotated with a short reason.
- One line saying what to do when neither the rule nor an example covers it.
Under two hundred words, and it outperforms almost anything longer.
Why this beats a longer prompt
A rule with annotated examples is compact because each part is doing a different job. The rule generalises. The examples pin the hard cases. The fallback covers everything neither reached. Nothing is repeated, so nothing competes.
The long prompts you inherit are usually long because somebody kept adding restatements of the same instruction in different words, hoping repetition would help. It does not, and it costs you the thing that would have: the third annotated example, or the sentence saying what to do when the rule does not apply.
If you are ever unsure whether to lengthen a prompt, ask which of the three parts is missing. Usually it is the fallback, and it is one line.
Every lesson here is open. Your progress is recorded once you pass the AI, Actually Explained exam.
Check your understanding
Two nearly identical customer messages appear in a prompt with different labels and no explanation. What effect should be expected?
Pick the one you would defend. Your answer stays private.
Stuck on something?Ask Asha, your AI tutor