What you'll learn
Strong prompts don't look random — they're assembled from the same handful of parts, over and over. Once you can spot the six building blocks, writing a good prompt becomes less like guessing and more like filling in a form: role, instruction, context, input data, examples, and output format.
By the end of this module you'll be able to:
- Name the six building blocks of a prompt and what each contributes
- Tell apart the system, user, and assistant roles
- Read a real, complete prompt and identify every part inside it
- Assemble your own prompts from a reusable template
The six building blocks
Not every prompt needs all six — a quick question might be one line — but the more a task matters, the more of these you'll want to include. Think of them as dials: add the ones that remove uncertainty for your task.
Role
Who the model should be — its expertise and point of view.
e.g. You are a senior copy editor.
Instruction
The task itself: the single most important line.
e.g. Fix grammar and tighten the wording.
Context
Background and rules the model needs to do it well.
e.g. Audience is busy executives. Keep the meaning.
Input data
The specific content to act on, clearly separated.
e.g. The paragraph to edit (in quotes).
Examples
One or more demonstrations of the task done right.
e.g. before → after pair (optional).
Output format
Exactly how the answer should be shaped.
e.g. Return only the edited paragraph.
Key idea
System, user & assistant
Modern chat models don't receive one blob of text — they receive a list of messages, each tagged with a role. Understanding the three roles explains where each building block belongs.
| Role | Who it is | What goes here |
|---|---|---|
| system | The developer / you, setting the stage | Persistent role, rules, and context that apply to the whole conversation |
| user | The person talking to the model | The actual request or question, plus the input data for this turn |
| assistant | The model's own replies | Previous answers — kept so the model remembers the conversation |
Note
Assembling a complete prompt
Let's put every block together in one realistic prompt. Read it top to bottom and notice how each labeled section maps to a building block — and how delimiters (the headings and the triple quotes) keep the model's instructions cleanly separated from the data. Press See response to reveal a typical result.
# ROLE
You are a senior customer-support specialist for TaskFlow, a project-management app.
# INSTRUCTION
Classify the customer message by urgency, then draft a one-sentence reply.
# CONTEXT
- Support hours are 9am-5pm ET, Monday to Friday.
- Billing and refunds are handled at billing@taskflow.app.
- Never promise a specific refund amount.
# EXAMPLE
Message: "I was charged twice this month!"
Output: {"urgency": "high", "reply": "So sorry about the double charge - I've flagged it to our billing team at billing@taskflow.app, who will make it right."}
# CUSTOMER MESSAGE
"""
Hi, I can't log in since the update this morning and I have a client demo in an hour. Help!
"""
# OUTPUT FORMAT
Return only JSON: {"urgency": "low" | "medium" | "high", "reply": string}Because the prompt fixed the role, rules, example, and output shape, the reply is immediately usable by software — valid JSON, correct urgency, and an on-brand message. Compare that with the shortcut version most people actually type:
Prompt
help with this support message: can't log in and I have a demo in an hour
Response
Prompt
[the full role + instruction + context + example + data + output-format prompt above]
Response
Tip
Recap & quick check
Key takeaways
- Strong prompts are built from six blocks: role, instruction, context, input data, examples, and output format.
- You don't always need all six — add the blocks that remove uncertainty for your task.
- Chat models read a list of messages tagged system, user, or assistant.
- The system message sets persistent role, rules, and context; the user message carries this turn's request and data.
- Delimiters (headings, quotes, tags) separate instructions from data and keep the prompt unambiguous.
Quick check
1. Which pair is the 'backbone' every prompt should almost always include?
2. In the messages format, what belongs in the SYSTEM message?
3. Why did the assembled support prompt return clean JSON while the one-liner returned a wall of text?
4. What is the main job of delimiters like headings or triple quotes in a prompt?
That completes the foundations: you know what prompting is, how the model works, how tokens and the window constrain it, and the anatomy of a prompt. Now the real craft begins. Next up: Phase 2, Module 5 — Writing Clear Instructions.