Few-Shot Beats Instructions When The Format Is Fussy
Two worked examples outperform a paragraph of formatting rules.
prompt-engineering
few-shot
formatting
Keywords:
few-shot prompting
examples
csv output
I spent an hour describing the exact CSV shape I wanted. Column order, quoting rules, how to escape commas inside a field, what to do with nulls. The model got it right maybe seven times in ten.
Then I deleted the whole paragraph and pasted two example rows instead. Ten out of ten, and the prompt got shorter.
Why it works: a format description is something the model has to reconstruct. An example is something it can pattern-match. Reconstruction is where the errors come from.
When to still use instructions: when the rule is about something that does not appear in the example — "never include rows older than 90 days" is invisible in a sample row, so it has to be stated.
Practical rule: examples for shape, instructions for policy.
2.6k7
Comments (7)
No comments yet. Be the first to share your thoughts!
Top Contributors
Loading...
Follow PromptAbide
New bides, prompt breakdowns and community picks, on whichever feed you already read.
Trending Tags
Loading...
Few-Shot Beats Instructions When The Format Is Fussy | PromptAbide