Why examples beat instructions
Two or three well-chosen examples routinely outperform several paragraphs of instruction, particularly for output format compliance. Showing the shape is more reliable than describing it.
They are also the most expensive part of a prompt per unit of instruction, and they are resent on every request. That trade-off is worth making deliberately rather than by accident, which is why the token count is shown as you format.
Choosing a format
XML example blocks are the most explicit and the most expensive. Best for complex outputs where the boundary between one example and the next could be ambiguous.
Labelled pairs are the cheapest and work well for short, simple mappings such as classification.
Alternating chat turns place examples as prior conversation, which some models follow more closely than examples embedded in a system prompt. Worth testing against the alternatives on your task.
Choosing the examples themselves
Cover the boundaries, not the middle. Three examples of the obvious case teach less than one obvious, one ambiguous and one that should be refused.
Keep them consistent in format. Examples that disagree with each other about capitalisation, punctuation or structure teach the model that the format is optional, and it will treat it accordingly.