You are reading Chapter 13 of 36 in the AI Bootcamp, AI Central's free course for professionals who want to use AI in their own work. The chapters build on each other, so if this is your first one, Chapter 1 is the place to start. All of them sit on the AI Bootcamp page, and three more arrive every week.

An AI prompt is built from 5 parts: role, context, task, format and constraints. Most people write two or three of them without knowing which ones, which is why you can get useful work out of an assistant and still not be able to say why it worked on Tuesday and not on Thursday.

This guide names the 5 parts, builds one real instruction a part at a time so you can see what each one fixed, and shows which parts change the answer and which only change the voice.

It also opens AI 202, the second of the course's three tracks. AI 101 was picking a tool, setting it up, writing a clear instruction and using it safely at work. AI 202 is the framework behind every good instruction, and catching AI when it is wrong.

We publish AI systems like this for 300,000+ senior professionals at AI Central, and more of them live in the AI Central Library.

Why you cannot repeat a good answer on purpose

You can already get useful work out of an assistant. What you cannot yet do is say why one request landed and a similar one did not.

That gap costs you three things. You cannot repeat the good result on purpose, you cannot fix a bad one quickly, and you cannot hand the method to anyone else. Naming the parts is what lets you do all three.

You have had the parts in your hands since Chapter 5, which taught the plain-English version: a good ask contains the situation, the thing you want done, and the shape you want it back in. It used no jargon and it was right. If you want that version again before you go on, Chapter 5 writes an instruction it can actually follow. What changes here is that the parts get names, two more get added, and each one is judged on what it independently buys you.

Bring what you collected in Chapter 12, which closed AI 101: the recurring uses you named there, and the plain-English asks you have been writing since Chapter 5. You need real instructions of your own to take apart, not hypothetical ones.

5 parts, and what each one buys you

The 5 parts are role, context, task, format and constraints. Each one buys you something different, and it is worth being able to say what.

1. Role: who it should sound like

Who the answer should sound like, and who is going to read it. What it buys you is register.

2. Context: the situation, and the why

The situation, and just as importantly why you are asking. What it buys you is relevance.

3. Task: the one thing to do

The single thing you want done, stated as an action. What it buys you is direction.

4. Format: the shape you want back

Length, structure, medium. What it buys you is usability.

5. Constraints: the lines not to cross

What to leave out, what not to assume, where the answer must stop. What it buys you is less rewriting.

That is the order the parts are conventionally written down in. It is a filing order, not a ranking. Build a real instruction and the order of impact comes out close to reversed, which is the next section.

The vocabulary is not ours, and that matters more than it sounds. Google publishes Persona, Task, Context and Format as its framework for Gemini, and adds that you do not need all four every time. Microsoft publishes Goal, Context, Expectations and Source for Copilot, and says only the goal is required. Anthropic tells you to be explicit, to explain the motivation behind an instruction, and to be specific about format and constraints. OpenAI tells ChatGPT users to identify the task, give context, and set the tone and format they want back. Four companies with every commercial reason to differentiate, describing the same five parts in four vocabularies.

The reason to name the parts is not tidiness. An unnamed thing cannot be checked. Right now, when a reply comes back thin or off, your only move is to rewrite the whole request and hope. Once the parts have names, "that came back wrong" becomes "I never told it who this was for", which is a one-line fix rather than a fresh start.

None of this means every message needs all 5. Microsoft says it plainly in its own documentation: all that is required is a clear goal. Most of what you type will be two or three parts, typed in one breath, and that is correct. The framework is a 10-second mental checklist for the asks that matter, not a form to complete.

Before you read on, go and find one instruction you actually typed this week and count how many of the 5 it contained. Almost nobody scores above three, and the two that go missing are usually the same two.

Watch it improve, one part at a time

Here is the task. A company you already buy from has proposed a partnership. You want to say no to the partnership and keep the supplier relationship intact, and the person who sent it is someone you have met twice and will meet again. This is the kind of message that takes 20 minutes because you keep rewriting the second paragraph.

1. Task only

"Write a reply declining this partnership proposal." What comes back is competent and completely unusable. It is twice as long as you would ever send, it thanks them three times, it offers to revisit in the new year, and it has quietly invented a reason for the decline that is not your reason. None of that is a mistake by the assistant. It filled every gap you left, because you left them.

2. Add context

You are a 40-person software company, they are your hosting supplier and you want to stay their customer, the real reason is that the integration needs engineering time already committed elsewhere this year, and it has nothing to do with price. The invented reason disappears. The reply now argues your actual position instead of a plausible one. This single addition moves the output further than the other three combined, and it is the part most people skip because it feels like typing something the assistant should be able to work out.

3. Add format

An email, about 150 words, three short paragraphs, no bullet points, no subject line. The substance does not change. What you get back is now the shape of a thing you would send, rather than a document you have to compress first. Format almost never changes whether an answer is right. It changes whether the right answer is usable, which on a busy day is the same problem.

4. Add constraints

Do not propose a date to revisit, do not use budget as the reason, state that the decision is settled for this year. These are the three sentences you were going to delete by hand every single time. Writing them once as boundaries is the difference between editing an output and approving one.

5. Add role

Write as a founder who is direct, warm, and does not pad. The email now sounds like you. Read the two versions side by side and you will find that the facts, the structure, the length and the boundaries are identical. Only the voice moved.

Three things to take from that build. Context did most of it: one paragraph of situation stopped it guessing, and nothing else moved the answer nearly as far. Constraints save the edit: every line you would have deleted by hand is a constraint you could have written once. And length is approximate. Ask for about 150 words and you land near it, because no assistant can count its own words reliably while writing them.

Role is the part everyone overrates

The most repeated advice in prompting is to open by naming an expert. It has now been tested carefully, several times, and it does not do the thing people think it does.

In December 2025 a team at Wharton ran the experiment everyone had been asserting the answer to. They took 6 different models and two sets of graduate-level questions, and compared no persona at all against an expert persona matched to the subject, an expert persona deliberately mismatched to it, and a persona chosen to know nothing. Matched expert personas did not reliably beat having no persona. Mismatched ones sometimes made things worse. The low-knowledge personas usually did.

Separate work in 2026 found the same shape with a sharper edge. As the persona got more elaborate, accuracy on a standard knowledge benchmark fell, from roughly 72% with no persona to 68% with a light one to 66% with a detailed one, while tone, formatting and style all improved. The researchers read this as the model optimising for sounding like the expert rather than for being right. That reading is theirs and you do not have to accept it. The measurements stand on their own.

This is not a contrarian position, which is the part worth noticing. Anthropic's own published guidance now tells you not to over-constrain the role, and says that "you are a helpful assistant" is often better than "you are a world-renowned expert". Google still leads its framework with Persona and Anthropic still recommends setting a role, and both are entirely consistent with the research, because what they claim it changes is behaviour and tone. Neither of them ever claimed it makes the thing smarter. That claim came from the internet.

The same team tested the other famous shortcuts. They tried 9 variations on the same questions across 5 models, 25 runs each, including offering a $1,000 tip, offering $1 trillion, and several threats of the kind that circulate as insider technique. There was no meaningful overall improvement from any of them. An earlier report in the same series found that swapping "please" for a flat command swung results by as much as 60 percentage points on individual questions, in both directions, and cancelled to nothing across the full set.

That last finding explains why the stories keep circulating. Everyone who tried a trick once and got a better answer was telling the truth about what they saw. The swings are real. They are just not the trick, and averaged over a few hundred questions they vanish. Be polite to it because you would rather be a person who is polite, not because it improves the answer.

So: keep the role line, hold it to one clause, and point it at register rather than expertise. "For a non-technical board" earns its place. "You are a world-renowned McKinsey strategist" does not. Then take the sentence you were going to spend on the job title and spend it on context, which is the part the same body of evidence keeps pointing at.

For the wider catalogue of prompting techniques this sits inside, with before and after examples for each one, read the 26 principles of prompt engineering.

When it comes back wrong, name the missing part

The framework is most useful at the moment something fails, not at the moment you write it. A bad reply is not a mystery. It is a specific part you did not supply.

Read down this list until a line describes what you actually got back. The part named at the end of it is the one you left out.

It answered a different question. Add context.

Right content, wrong shape. Add format.

You deleted lines before sending. Add constraints.

Correct, but it does not sound like you. Add role.

Vague, generic, oddly cautious. Sharpen the task.

Then add that one part and ask again. Most people meet a bad answer by rewriting the whole request, which discards the parts that were working and teaches you nothing about which ones were.

Two things about constraints are worth getting right, because constraints are where most instructions are weakest. The first is that boundaries land better stated positively. Anthropic's own documentation makes the point with an example: instead of "never use ellipses", say that the reply will be read aloud by a text-to-speech engine, which cannot pronounce them. The second is why that works. A constraint with its reason attached extends itself to the cases you forgot to list, while a bare prohibition covers only the exact thing you banned.

Restraint matters too. Not every ask needs 5 parts, and over-specifying has a real cost: pin down the output shape too tightly on a question that needs judgement and you can lose the reasoning along with the untidy parts. If you want the thinking and the tidy version, ask for the thinking first and the shape second. And treat every number you give as a target rather than a contract. No assistant can reliably count its own words while writing them, so "about 150 words" is an instruction and "exactly 150 words" is a wish.

For another way to repair a prompt that is not landing, see our ChatGPT prompt optimizer guide.

Do these before Chapter 14

The chapter ends with 3 exercises and about 15 minutes of work.

Take one real instruction you sent an assistant this week and pull it apart, writing down the context you left out, the format you assumed it knew, and the limits you fixed by hand. Then rebuild that instruction with all 5 parts and send it, and write one sentence on what changed and one on what did not. Last, think of the last time an assistant handed you something you could not use, run it down the list above, and name the single part that was missing.

What actually changes

Before: you get useful work out of an assistant some of the time, and when a reply comes back wrong you rewrite the whole request and hope.

After: you can name the 5 parts an instruction is built from, build one deliberately on a real piece of your own work, and tell which parts change the answer from which only change the voice.

Two things carry into Chapter 14: the 5-part instruction you rebuilt, and one piece of finished work, by you or anyone, that is the standard you want matched. Chapter 14 adds the thing that moves an output further than any rewording of the instruction, which is showing it a finished example instead of describing one. Chapter 15 covers making it reason before it answers, Chapter 16 covers what to do when a job is too big for one instruction, and Chapter 17 turns the instructions you keep retyping into reusable ones. All four assume you can write the 5 parts without looking them up.

If you want a one-page reference to keep beside you while you work, start with our free AI cheat sheets, and the rest of the syllabus lives in the AI Central Library.

Frequently Asked Questions

What are the 5 parts of an AI prompt?

Role, context, task, format and constraints. Role is who the answer should sound like and who is going to read it. Context is the situation and why you are asking. Task is the single thing you want done, stated as an action. Format is the shape you want back: length, structure, medium. Constraints are what to leave out, what not to assume, and where the answer must stop.

Do I need all 5 parts in every prompt?

No. Microsoft says in its own Copilot documentation that all that is required is a clear goal, and Google says you do not need all four parts of its framework every time. Most of what you type will be two or three parts typed in one breath. Treat the 5 as a 10-second checklist for the asks that matter, not a form to complete.

Which part of a prompt matters most?

Context. In the worked example in this chapter, adding one paragraph of situation moved the output further than format, constraints and role combined, because it stopped the assistant inventing a reason of its own. It is also the part most people skip, because it feels like typing something the assistant should be able to work out.

Does telling AI it is an expert improve the answer?

Not for accuracy. A team at Wharton tested 6 models on two sets of graduate-level questions in December 2025 and found that matched expert personas did not reliably beat having no persona, while personas chosen to know nothing usually did worse. Separate 2026 work found accuracy falling from roughly 72% with no persona to 66% with a detailed one. The role line reliably changes voice, pitch and level of detail, not what the model knows.

Do tips, threats or saying please make AI perform better?

Not on average. Nine prompt variants across 5 models, 25 runs each, including a $1,000 tip and a $1 trillion one, produced no meaningful overall improvement. An earlier report in the same series found that swapping "please" for a flat command swung individual questions by as much as 60 percentage points in both directions and cancelled to nothing across the full set.

How do I fix a reply that came back wrong?

Name the missing part rather than rewriting everything. It answered a different question means you owe it context. Right content in the wrong shape means format. Lines you deleted by hand mean constraints. Correct but not in your voice means role. Vague and oddly cautious means the task was not sharp enough. Add the one part and ask again.