Anatomy of a Prompt
Understand the structural components of any prompt and how each part influences output.
The Four Components of Every Prompt
Every prompt — whether simple or complex — has four structural components. Understanding them gives you precise control over AI output.
1. Context — Background information the model needs to understand the situation. Without context, the model fills in gaps with assumptions (often wrong ones).
2. Instruction — The specific task you want completed. This is the "do X" part of the prompt.
3. Input — The data the model should operate on. Separate input from instruction to avoid ambiguity.
4. Output format — How you want the response structured. Explicit format instructions dramatically improve output consistency.
The Anatomy in Practice
Weak prompt:
"Summarize this."
Strong prompt:
[Context] You are a technical writer summarizing API documentation for non-technical stakeholders. [Instruction] Summarize the following API endpoint documentation. [Input]
{paste docs}[Format] Return a 3-bullet summary: what it does, when to use it, and one example use case. Plain language only.
Why Format Instructions Matter
Without format guidance, models choose their own output structure. This creates inconsistency at scale. When you're chaining AI outputs into downstream systems, unpredictable formatting breaks pipelines.
Always specify: length, structure (bullets/paragraphs/JSON), tone, and what to exclude.
The Principle of Explicit Everything
AI models don't have your context. They don't know your company, your constraints, your audience, or your definition of "good." Assume they know nothing beyond what you tell them. Every assumption you leave implicit becomes a source of variance.
Start prompts as if writing for a capable but completely uninformed contractor on their first day.