Manuals / Prompt Engineering / Chapter 4
A · Structure · intermediate · ~35 min · Chapter 4 of 12
Few-shot examples & negative constraints
Show 1–3 input→output examples for the pattern you want. Also say what NOT to do — models respond well to explicit boundaries.
Path progress29%
Step 1 of 2
Build a 3-example set
Pick a repetitive task (bug titles, test case names, commit messages). Write 3 gold examples.
Do this now
Prompt with examples. Compare output quality vs zero-shot.
Was this step clear?
Chapter learning outcomes
- Few-shot prompting
- Negative constraints
- Edge case examples
Clear these before you leave
Side quest
Test case generator
Few-shot prompt that turns user stories into Given/When/Then cases.