Few-Shot Example Formatter

Build clean few-shot example blocks for your prompts. Add input/output pairs below and copy them as XML tags, markdown headings, or a JSON array, the three formats models parse most reliably.

Example inputExpected output
XML tags: recommended for Claude, unambiguous boundaries
Why few-shot examples work: a handful of concrete input/output pairs shows the model the exact format, tone, and level of detail you expect, far more reliably than describing it in words. Two or three well-chosen examples typically cut format errors and off-style answers dramatically, and including one tricky edge case teaches the model how to handle the hard inputs too. XML tags give the cleanest boundaries (Claude is specifically trained on them), markdown headings read well in chat UIs, and the JSON array form is handy when you build prompts programmatically.