⚡AgentSkills
🤖 AI Engineering · Prompt Engineering

Select few-shot examples that move accuracy (Extraction 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

  1. 1Cover each output field's edge cases once: empty, unicode, long input, ambiguity
  2. 2Order examples easy-to-hard so difficulty ramps within context
  3. 3Match example format byte-for-byte to the required output format
  4. 4Prefer real production samples over invented ones
  5. 5Rotate in failure cases you fixed, turning regressions into teachers
  6. 6Measure: remove one example at a time, drop any whose removal costs nothing
  7. 7Show null handling for missing fields explicitly
  8. 8Demonstrate normalization: dates, currencies, units

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-extr
Install globally
$ npx skills add aniruddhaadak80/skills --skill prompt-engineering-few-shot-selection-extr -g

Tags

#prompts#few-shot#ai-engineering#prompt-engineering

Related skills

Organize identity, rules, tools, and output contracts into sections that evolve without breaking behavior.

🤖 AI Engineering·~30m

Choose and order examples covering edge cases so the model generalizes instead of copying surface patterns.

🤖 AI Engineering·~30m

Get machine-parseable JSON reliably using schema-first prompting, constrained decoding, and repair loops.

🤖 AI Engineering·~35m