Create few-shot examples
Builds a small set of diverse, representative few-shot examples for a task, including tricky and negative cases, balanced so the model learns the rule rather than copying surface patterns.
Few-shot examples are the strongest signal in a prompt: models copy what they see, including things the author did not intend, such as length, wording, label order or a habit of always answering. Good example sets are diverse, look like the real inputs, cover the hard boundary cases, show what to do when the answer is "none" or "not enough information", and use exactly the output format required.
Number of examples: Only if [FORMAT] is given: Required output format:
- If the task, its input or its expected output is unclear, ask up to three questions and stop. Ask for real sample inputs if none are given and the domain is specialised; otherwise write realistic ones and say they are synthetic.
- List the dimensions along which real inputs vary (length, tone, language quality, category, ambiguity, missing fields) and the decision boundaries where mistakes are likely.
- Plan examples so that together they cover the main categories, at least one tricky boundary case, and at least one negative case (none of the categories apply, or not enough information) when the task allows one. If is too few to cover the essentials, say what is left uncovered and suggest a number.
- Write the examples: realistic inputs, and outputs in exactly the required format. Vary length and phrasing so no surface feature predicts the answer. Balance labels and shuffle their order.
- Explain why each example is in the set and what it teaches.
- Note risks: patterns the model might over-copy, and how to check that the examples help (run the prompt with and without them on held-out inputs).
- Examples must be correct. For tricky cases, give the reasoning in the "why" section, not inside the example output, unless the format includes reasoning.
- Never reuse the user's test or evaluation inputs as examples; that hides real performance.
- No real personal data. Use invented names and details.
- Wrap each example in <example> tags with <input> and <output> inside, so it can be pasted into any prompt.
Coverage plan
Table: Example | Category or case | Dimension it covers.
Examples
One fenced code block containing all examples, ready to paste.
Why each is here
Numbered, one or two sentences each.
Watch for
Bullets: over-copying risks, gaps, and how to test.
1 required value still a placeholder; the assistant will ask for it.
details
- kind
- Prompt: a task you run by name to get one finished thing back
- domain
- Prompting and assistants
- category
- Prompt engineering
- level
- Intermediate
- made for
- ML / AI engineer, Data scientist, Anyone, personal use
- risk
- read-only
- version
- v1.0.0 · incubating
- reviewed
- 2026-10-02
- works in
- Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Antigravity, OpenCode, Windsurf, Zed, Continue, AGENTS.md, ChatGPT, claude.ai
use in
npx @hermes-hq/hodios install create-few-shot-examples --target claude-codenpx skills add hermes-hq/hodios-dist --skill create-few-shot-examples -a claude-codeclaude plugin marketplace add hermes-hq/hodios-distclaude plugin install hodios-prompting@hodiosThe plugin brings every entry in this domain at once.
pairs well with
All of Prompt engineeringPrompt engineer
Prompt engineer who writes clear, testable instructions, iterates against real examples and evals, and avoids model-specific tricks. Use for designing, debugging and maintaining prompts.
prompt-engineerImprove a prompt
Diagnoses why a prompt gives weak or inconsistent results and rewrites it with clear context, task, constraints and output format while keeping its intent. Use on any prompt for any AI assistant.
improve-promptDiagnose prompt failures
Diagnoses why a prompt produces bad answers from failing examples, traces each failure to a root cause, proposes targeted fixes and a quick regression test set.
diagnose-prompt-failuresAdapt a prompt for a reasoning model
Rewrites a prompt for reasoning-capable models by removing step-by-step micromanagement, stating goals, constraints and success criteria, and keeping the output format exact.
adapt-prompt-for-reasoning-modelBuild a test set for a prompt
Builds a hand-run test set for a prompt with happy, edge and negative inputs, expected behaviour and checkable pass criteria per case, and a scoring sheet to compare prompt versions side by side.
build-prompt-test-setCompress a prompt
Shortens a long prompt while preserving its behaviour, maps every original instruction to where it now lives, reports the real size reduction and lists test inputs to check nothing changed.
compress-prompt