The Art of the Prompt
Keep this open

The prompt cheat sheet

The whole method on one page: the structure of a strong prompt, reusable templates, and every term in plain language. Bookmark it. When you are ready to actually get good, take the free class.

Universal prompt skeleton

You are a {{role}}. Task: {{the single clear objective}} Context: - Audience: {{who reads this}} - Why it matters: {{motivation}} - Source material: {{wrapped in tags}} Constraints: - {{hard limits, length, scope, tone}} - Do X (state positively, not "don't do Y") Output format: - {{exact shape, prose / JSON schema / sections}} Before finishing, verify the result against: {{named criteria}}

Decision quick-reference

  • Simple task → zero-shot, Task + Format only.
  • Specific format/tone → add a few clean examples (fewer on reasoning models).
  • Hard reasoning, capable model → goal + constraints, raise effort, test before adding CoT.
  • Must be correct → named verification step (and self-consistency if critical).
  • Output feeds a system → structured output / schema.
  • Tools / multi-step → lean system prompt, autonomy default, safety rails.
  • Untrusted content → injection-defence wrapper (the Safety module).

When a prompt fails, in order

  1. Is the task unambiguous? Add the missing component.
  2. Did you give the why?
  3. Is the key instruction first or last, not buried?
  4. On a reasoner, try removing scaffolding, not adding it.
  5. Still failing? Iterate against a test set, one change at a time.

Three reusable templates, copy or launch

Minimal reasoning-model
Task: [single objective]

Constraints:
- [scope, tone, exclusions]
- [success criteria]

Output:
[exact sections / schema]

Before finishing, check the result against [named criteria].
Retrieval-grounded
<documents>
[paste your source text here]
</documents>

Question: [your question]

1. Extract the quotes relevant to the question.
2. Answer using only those quotes.
3. Cite each source inline.
4. If the evidence is thin or missing, say so plainly.
Prompt-evaluation
Grade the prompt below from 1-4 on: objective clarity, context sufficiency, output contract, robustness to ambiguity, and safety + evidence.

Return JSON: {"scores": {...}, "highest_risk": "...", "one_best_improvement": "..."}

Prompt to grade:
"""
[paste the prompt you want graded]
"""
Reference

Glossary

Acronyms are defined on first use in the modules; this is the quick reference.

Zero-shotPrompting with instructions only, no examples.
Few-shotProviding example input→output pairs to steer behavior.
CoT (Chain-of-Thought)Eliciting step-by-step reasoning before the final answer.
Self-consistencySampling multiple reasoning paths; taking the majority answer.
ReActReason→Act→Observe loop; the basis of tool-using agents.
ToT (Tree-of-Thoughts)Branching, scoring and pruning multiple reasoning paths.
Context engineeringCurating the useful set of tokens across a task.
Structured outputsConstrained decoding that yields schema-valid output.
Effort / thinking budgetA control for how much a model reasons before answering.
System / developer messageThe authoritative instruction defining role and rules.
RAG (Retrieval-Augmented Generation)Grounding answers in fetched documents.
Prompt injectionUntrusted content trying to hijack the model's instructions.
LLM-as-judgeUsing a model to score outputs against criteria at scale.