Header image

In the last article we landed on a simple truth: a better prompt is really just a clearer brief. That raises an obvious, practical question: what actually goes into a clear brief? What are the pieces?

Almost every good prompt is built from the same handful of building blocks. Once you know them, writing a strong prompt becomes less like fishing for the right words and more like filling in a reliable template. This article gives you that template, the anatomy of a prompt, so you have a practical way to improve hit-or-miss results.

The building blocks

A well-formed prompt usually contains some combination of five ingredients: a Role, a Task, some Context, a desired Format, and any Constraints. You won’t always need all five, but knowing the full set means you’ll never accidentally leave out the piece that would have made the difference. Figure 1 shows them stacked together.

The building blocks of a prompt Figure 1: The anatomy of a strong prompt: Role, Task, Context, Format, and Constraints. Not every prompt needs all five, but each one you add gives the model less to guess and more to work with.

Let me walk through each, with a running example: suppose I want help explaining compound interest to my teenage nephew.

Role: who the model should be. Telling the model what perspective to take sets the tone and level of everything that follows. “You are a patient tutor who explains money to teenagers” produces very different output from no role at all. The role is a quick way to dial in expertise and voice.

Task: the specific thing to do. This is the heart of the prompt, and it should be a clear, direct instruction. Not “compound interest” but “Explain how compound interest works.” A fuzzy task is the single most common reason for a disappointing answer.

Context: the information the model needs. This is where you supply the background that shapes a good response: who it’s for, what they already know, any relevant details or data. “He’s 15, good at maths but new to finance” tells the model exactly how to pitch the explanation.

Format: how you want the answer delivered. Length, structure, style. “Keep it under 150 words, use one everyday example, no bullet points.” Without this, the model guesses, and its guess about format is often not what you had in mind.

Constraints: the rules and limits. The guardrails: what to avoid, what to include, what to do in tricky cases. “Avoid jargon. Don’t use a bank example; use something from everyday life.”

Weak versus strong, side by side

Let me show you the difference these blocks make. Here’s a weak prompt with just a bare task:

“Explain compound interest.”

You’ll get something, but it’ll be generic: pitched at an unknown audience, any length, probably full of the standard textbook framing. Now here’s the same request with the building blocks in place:

Role: You are a patient tutor who explains money to teenagers. Task: Explain how compound interest works. Context: The reader is 15, good at maths but new to finance. Format: Under 150 words, with one everyday example. Plain paragraphs, no bullet points. Constraints: Avoid jargon. Don’t use a banking example; use something relatable to a teenager.

Figure 2 puts these two side by side so you can feel the difference.

A weak prompt versus a structured one Figure 2: The weak prompt gives a bare task and leaves everything else to chance. The structured prompt specifies the role, audience, length, format, and constraints, so the model produces a targeted answer instead of a generic one.

You don’t have to write prompts with literal “Role:” and “Task:” labels like that, though it’s a perfectly good habit, and it helps you check you haven’t skipped anything. In everyday use it can flow as normal prose:

“You’re a patient tutor explaining money to teenagers. Explain how compound interest works to a 15-year-old who’s good at maths but new to finance. Keep it under 150 words with one everyday, non-banking example, in plain paragraphs, and avoid jargon.”

Same building blocks, woven into a sentence. Here it is as a reusable template you can keep in a note and adapt:

You are [ROLE].
[TASK: the specific thing to do].
Context: [who it's for, what they know, any details/data].
Format: [length, structure, style].
Constraints: [what to avoid, rules, what to do if unsure].

How much structure do you actually need?

A fair question: isn’t all this overkill for a quick question? Sometimes, yes. For a casual “what’s a synonym for happy?”, a bare task is fine. The rule of thumb is simple and worth remembering: the more the output matters, the more structure it’s worth. For a throwaway query, just ask. For something you’ll actually use, such as a piece of writing, an analysis, or anything with a real audience or purpose, spend thirty seconds adding the role, context, format, and constraints. That small investment is often the difference between “close enough” and “what I needed.”

And notice what each block really is: another way of being clearer, exactly as we framed it last time. Role clarifies the voice. Context clarifies the situation. Format clarifies the shape. Constraints clarify the boundaries. Every block removes something the model would otherwise have to guess.

The foundation for everything else

This anatomy is the backbone of prompting, and nearly every technique in the rest of this series is really an enhancement to one of these blocks. Showing the model examples? That’s a way of clarifying the task. Asking it to reason step by step? A format instruction. Demanding clean JSON? Also format. Telling it what to do when unsure? A constraint.

So this template isn’t just one technique among many. It’s the frame the others hang on. Get comfortable filling it in, and you’re already most of the way to reliably good prompts.

Next, we’ll look at one of the most powerful clarifiers of all: instead of describing the task you want, simply showing the model a few examples of it.


Next in the series: Zero-Shot, Few-Shot & In-Context Learning: teaching the model a task just by showing it examples.