A reliable prompt is a small specification. The pattern that survives production:
1. Role and objective — who the model is and what success means. 2. Context — only the evidence needed, clearly delimited. 3. Constraints — length, tone, banned behaviours, what to do when unsure. 4. Few-shot examples — 2-5 examples pin down format far better than adjectives. 5. Output contract — an exact schema, ideally enforced by structured output.
text
You are a support triage assistant.
Classify the ticket using ONLY the evidence between <ticket> tags.
If the category is unclear, return "unknown" — never guess.
Return JSON: {"category": "...", "severity": 1|2|3, "reason": "<=20 words"}
<ticket>
{{ticket_text}}
</ticket>Techniques worth knowing: chain-of-thought ("think step by step") for reasoning-light models, self-consistency (sample k answers, take the majority), and decomposition (split one hard prompt into several small verifiable ones).
Gotcha: with modern reasoning models, verbose "think step by step" scaffolding can *hurt* — they already reason internally. Prompt for the contract, not the process.