Skip to content
Back to skills

Few Shot

ASecurity

Build few-shot examples that steer an LLM toward the format and behavior you want

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 3, 2026
ai-agentsgo

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add black141312/ada --skill few-shot --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Few Shot?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Few Shot
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/black141312-few-shot/badge)](https://www.skillsdirectory.com/skills/black141312-few-shot)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: few-shot
description: Build few-shot examples that steer an LLM toward the format and behavior you want
category: agent-llm
---

# Few-Shot Examples

Use this when zero-shot prompting gives inconsistent format or quality and you want to demonstrate the target behavior by example.

1. Pin down the exact target: the input shape, the output format, and the edge cases the model keeps getting wrong.
2. Write 3-5 examples as input/output pairs that match production data — same fields, same tone, same length you actually expect.
3. Cover variety deliberately: include a hard case, an edge case, and a "what not to do is implied" case, not five near-identical easy ones.
4. Make every example's output perfect and consistent in format — the model copies form as much as content, including mistakes.
5. Structure the prompt clearly: delimit examples (XML tags or labels) and separate them from the live input the model must answer.
6. Evaluate on a held-out set; add an example only when it fixes a real failure, and remove ones that don't move accuracy.

## Rules
- Consistency beats quantity — 3 flawless, format-aligned examples outperform 10 sloppy ones.
- Order can matter; put the most representative example last since recency biases the model.
- Don't let examples leak the test answer or encode spurious patterns (e.g. all positive labels first).
- More examples cost tokens on every call — prune to the minimum set that holds quality, then consider caching them.
- If the task is purely structural, prefer a schema/structured-output constraint over spending tokens on examples.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…