Few-Shot Prompting Examples That Ship (2026)
Five copy-paste few-shot prompting examples that ship: classification, JSON extraction, tone matching, refusal, and format locking, plus the shot-count and label-bias traps.
Tag
12 posts tagged.
Five copy-paste few-shot prompting examples that ship: classification, JSON extraction, tone matching, refusal, and format locking, plus the shot-count and label-bias traps.
ReAct prompting interleaves reasoning and tool calls: Thought, Action, Observation, repeat, until the model has enough to answer. It is how a plain prompt becomes an agent. Six copy-paste ReAct recipes below, each with the failure mode that bites first. Tested July 2026.
Zero-shot prompting is the right default for most tasks in 2026. Five recipes that make instruction-only prompts reliable, plus the exact point to add one example.
A terse, production-first prompt engineering cheat sheet for 2026: fifteen patterns, each with a one-line rule, its failure mode, and a link to the full recipe.
Five paste-ready role prompting recipes for 2026: domain expert, audience, format contract, adversary, and voice, each with its failure mode.
Five paste-ready chain-of-thought prompting examples for 2026, each with its failure mode, plus when reasoning out loud makes the answer worse.
Five paste-ready prompt chaining recipes for 2026: extract-then-reason, draft-critique-rewrite, route, map-reduce, and generate-then-gate, each with its failure mode.
Five paste-ready meta prompting recipes: make the model write, critique, rubric, and template your prompts, each with its failure mode. Plus the honest part: when meta prompting just wastes tokens.
Four prompt-layer defenses against prompt injection that measurably help, three that are theater, and the one architecture rule that actually keeps you safe. With paste-ready prompts and each failure mode.
Five copy-paste few-shot prompting recipes for July 2026: lock output format, tone, labels, and edge cases. Each with the prompt and the exact case where it breaks.
Three production prompt patterns for Anthropic's Claude Tag in Slack channels, plus two failure modes that bite in week one. June 2026.
Three production-grade Claude structured output recipes for June 2026. Invoice extraction on Sonnet 4.6, support triage on Haiku 4.5, NL to SQL on Opus 4.7. Real cost per call. Three failure modes the docs do not warn you about.