Few-Shot

prompting

Prompting with a handful of examples that demonstrate the pattern you want, before asking for a new one. Instead of describing your ideal product description in the abstract, you paste two or three real ones and say: now write one for this product. Models are exceptional pattern-matchers, so few-shot dramatically improves format and tone consistency. It works for creative tasks too: show an LLM three of your best image prompts, then ask it to write ten more in the same style. Usually 2-5 examples is enough — more just eats context without adding much.

Related terms