Prompting formula

The Few-shot formula

Provide 2-5 exemplars of the exact input/output shape before asking.

Skeleton

{example 1}
{example 2}
...
Now do it for: {input}

When to use it

Format-sensitive output, classification, style mimicry.

How to apply it without breaking it

  1. Fill every slot. A formula with a missing slot silently degrades into a generic prompt — the model will fill the gap with its own assumptions.
  2. Keep the ordering. Structure carries meaning; moving the output contract to the front of a long prompt is the most common reason a good formula fails.
  3. Pin the output shape explicitly (format, length, delimiters) rather than describing it in prose.
  4. Test with three inputs: a typical one, an edge case, and one where the correct answer is "insufficient context".

Pairs well with

Other formulas

Free starter pack

Get the free Starter Kit

5 starter prompts + 3 essential formulas (RTF, Chain-of-Thought, Persona) + the one-page "how to test a prompt" sheet. No spam, unsubscribe anytime.

Delivered instantly. You can also see what's inside first.