Have you ever spent 20 minutes writing out an exhaustive set of rules for an AI: "Capitalize only the first letter, then add a colon, then format the date as YYYY-MM-DD, followed by a bracketed category, but only if the category is urgent..."
And then the AI immediately makes a formatting mistake anyway?
Humans don't learn complex formatting from dry rule manuals—we learn by looking at examples. An AI works the exact same way. This is called Few-Shot Prompting.
The 3 Tiers of In-Context Learning
- Zero-Shot: Pure instructions. No examples. Great for simple tasks, but prone to format drifting.
- One-Shot: Exactly one verified input/output demonstration. Instantly anchors output syntax.
- Few-Shot (2–4 Examples): Shows both standard cases and tricky edge cases (e.g. what to do when a field is missing).
One good example is worth 500 words of instructions. Whenever an AI struggles with formatting, delete your paragraphs of explanations and replace them with 2 clean input/output examples.