Cheatsheet

ChatGPT prompt patterns cheatsheet (the 10 patterns that ship)

Ten production-tested ChatGPT prompt patterns: role + objective, structured output, persona conditioning, step-back, output gating, anti-template, refusal calibration, evaluation rubric, scratchpad, exemplar.

Core patterns

ItemDescriptionExample
Role + objectiveFirst line of system prompt names the role; second line names the win condition.You are a senior security engineer. Goal: spot every credential leak in the diff.
Structured outputForce JSON or labelled fields. Use response_format or json_schema.{"verdict":"...", "issues":[...]}
Step-backAsk the model to articulate the question category before answering.Before answering, classify the question as factual / opinion / advice.
Output gatingTell the model to answer 'INSUFFICIENT' when context is too thin instead of guessing.If the document doesn't contain the answer, return INSUFFICIENT.

Steering patterns

ItemDescriptionExample
Persona conditioningDefine audience, not just role. 'For a junior dev' produces different output than 'for a CTO'.Write for a junior dev who has never used Docker.
Anti-templateTell the model what NOT to do. Beats vague positive instructions.Do not write 'In conclusion'. Do not use the word 'leverage'.
Refusal calibrationAllow the model to refuse with a structured reason.If the request is unsafe, reply {"refuse":true, "reason":"..."}.

Evaluation patterns

ItemDescriptionExample
Rubric in promptInclude the scoring rubric in the prompt for evals.Score 1-5 on: accuracy, completeness, tone. Return JSON.
ScratchpadReserve <scratch>...</scratch> for chain of thought; instruct the model to put only the final answer in <answer>.Use <scratch> for reasoning. Final reply in <answer>.
Exemplar pinningPin a single high-quality exemplar with rationale at the top of the user turn.Example of a great output: ... Why it's great: it follows the rubric exactly.

FAQ

Do I need few-shot examples for GPT-4o?

Often no for common tasks. For strict format or domain-specific tone, yes — 2-5 well-chosen examples beat any prose instruction.

Should I tell GPT-4o to 'think step by step'?

For GPT-4o and GPT-5 non-reasoning, yes — it measurably improves multi-step tasks. For o-series reasoning models, no — they think internally.

Is JSON mode reliable in 2026?

Yes when paired with json_schema. Without a schema, JSON mode guarantees syntax but not field semantics.

Last updated: 2026-06-01.