The Few-Shot Example Builder helps you craft the example pairs that teach a language model exactly what you want — by demonstration rather than description. Few-shot prompting (also called in-context learning) is among the most dependable techniques in prompt engineering: a few clean input/output examples placed before your real input let the model infer the pattern, tone, and format you are after, often outperforming pages of written instructions. This tool builds a consistent, ready-to-paste few-shot block in your browser.
How it works
You start with a one-line task description, then add three to five example pairs. For each pair you supply the input the model will actually see and the output you expect, plus an optional reasoning note for your own reference. The builder renders the set in your chosen syntax — XML-tagged blocks for Claude-style prompts, or simple Input: / Output: delimiters for any model — with the task instruction at the top and a trailing slot for your real input.
Because the tool keeps every pair in the same shape, it enforces the consistency that makes few-shot work. The biggest failure mode is examples that disagree on format; the model then cannot tell which pattern to follow. By templating each pair identically, the builder removes that ambiguity and produces a block you can drop straight into ChatGPT, Claude, Gemini, or an API call.
Tips and notes
Aim for diversity within consistency: cover the range of inputs the model will meet, and include at least one edge case so the pattern generalises. For classification and extraction, show only input and output. For reasoning tasks, put the step-by-step working inside the output to get the benefits of few-shot chain-of-thought. Keep examples short — they cost tokens on every call — and order them so the most representative case comes first. When the model still drifts, the fix is almost always a clearer or more consistent example, not more examples.