🤖 AI Engineering · Prompt Engineering
Select few-shot examples that move accuracy (Classification tasks)
Choose and order examples covering edge cases so the model generalizes instead of copying surface patterns.
intermediate~30 minAI EngineersML EngineersLLM App Developers
Steps
- 1Cover each output field's edge cases once: empty, unicode, long input, ambiguity
- 2Order examples easy-to-hard so difficulty ramps within context
- 3Match example format byte-for-byte to the required output format
- 4Prefer real production samples over invented ones
- 5Rotate in failure cases you fixed, turning regressions into teachers
- 6Measure: remove one example at a time, drop any whose removal costs nothing
- 7Include one deliberately ambiguous item with the correct tie-break label
- 8Balance classes in examples; imbalance biases predictions
Common Pitfalls
- ▲Six near-identical easy examples teaching style but not judgment
- ▲Whitespace mismatches between examples and instructions
Commands
Install with skills CLI
$ npx skills add aniruddhaadak80/skills --skill prompt-engineering-few-shot-selection-clsInstall globally
$ npx skills add aniruddhaadak80/skills --skill prompt-engineering-few-shot-selection-cls -gTags
#prompts#few-shot#ai-engineering#prompt-engineering