Home › Guides › Core skill

The 5-part prompt formula for better AI answers

A simple, memorable prompt formula (role, task, context, format, and tone) that works in ChatGPT and Claude, with fill-in-the-blank templates and examples.

By Learn2Prompt · Updated October 25, 2026 · 6 min read

Most weak prompts have the same problem: they leave out information the AI needs and then hope it guesses right. A formula fixes that by giving you a quick checklist to run through before you hit enter. You won't need every part every time, but knowing the five parts means you'll rarely forget the one that matters.

Here's the formula we use as the backbone of nearly every prompt on Learn2Prompt:

  1. Role: who should the AI act as?
  2. Task: what exactly do you want done?
  3. Context: what's the situation, and who is it for?
  4. Format: what shape should the answer take?
  5. Tone: how should it sound?

The full template

Copy this, swap the bracketed parts, and delete any line you don't need.

Copy-ready prompt

The 5-part template

Act as [role, e.g. an experienced career coach]. I need you to [task, e.g. help me prepare for a job interview]. Here's the context: [situation, audience, constraints, what you've tried]. Give me the answer as [format, e.g. a numbered list of 10 likely questions with a short sample answer for each]. Keep the tone [tone, e.g. encouraging and practical].
Fill in the [blanks], then paste into Claude or ChatGPT (free account). Leave out account numbers and addresses.

Now let's look at each part, why it helps, and what it looks like in practice.

1. Role: give the AI a point of view

Telling the AI to "act as" a certain kind of expert nudges it toward the vocabulary, priorities, and level of detail that person would bring. "Act as a patient math tutor" produces something very different from "act as a university math professor", even for the same question.

The role should match the help you want, not just the topic. If you're asking about a car noise, "an experienced mechanic explaining things to a customer with no car knowledge" is more useful than "a mechanic". We go deeper on this in our guide to role prompting.

2. Task: use a clear action verb

The task is the heart of the prompt. Start it with a specific verb: write, summarize, compare, explain, plan, rewrite, brainstorm, check, translate, outline. Then say what the output is for.

Weaker prompt

Something about my garden.

Stronger prompt

Plan a simple vegetable garden for a beginner, including what to plant first and when.
Why it works"Something about" forces the AI to guess what you want. A verb plus a clear outcome gives it a target.

If you have more than one task, number them. "First do this, then this" is easier for the AI to follow than a long paragraph with requests buried inside it.

3. Context: the part most people skip

Context is everything the AI can't know unless you tell it: who the audience is, what your constraints are, what's already happened, and what "good" looks like to you. It's usually the part that makes the biggest difference, and it's the part beginners leave out most.

Useful context often includes:

Two or three sentences of context is often enough to move an answer from generic to genuinely useful.

4. Format: describe the answer you want to receive

If you don't specify a format, the AI picks one, and it's often a long block of text with headings you didn't need. Say what you want instead: a bulleted list, a table, a step-by-step plan, a short email, three options to choose from, under 150 words.

Weaker prompt

Tell me about budgeting apps.

Stronger prompt

Compare 3 common types of budgeting approaches for a beginner in a table with columns for how it works, who it suits, and the main downside. Keep it under 200 words.
Why it worksThe second version controls length and structure, so you get something you can scan in 30 seconds instead of a wall of text.

5. Tone: decide how it should sound

Tone matters most when the output will be read by other people. "Professional" is a start, but you'll get closer with combinations like "warm but brief", "firm but polite", "plain English, no jargon", or "upbeat, like a friendly neighbor". If you have an example of writing you like, paste it and ask the AI to match its style; see our guide on giving AI examples.

Putting it all together

Here's the formula used on a common real-world task.

Weaker prompt

write a message to my landlord

Stronger prompt

Act as a tenant who wants to stay on good terms with their landlord. Write a message to my landlord asking them to repair a leaking kitchen faucet that's been dripping for two weeks. I've already reported it once by phone. Keep it under 120 words, include a request for a repair date, and make the tone polite but clear that it needs fixing soon.
Why it worksEvery part of the formula is there: role, task, context (two weeks, already reported), format (under 120 words, ask for a date), and tone (polite but clear).

And here's a second example for something personal rather than practical:

Copy-ready prompt

Formula example: planning a celebration

Act as a thoughtful party planner who works with small budgets. Help me plan a surprise 60th birthday dinner for my mother. About 12 guests, mostly family, at my house, budget around [amount]. She loves [her interests]. Give me a simple timeline for the two weeks before, a menu idea, and a checklist for the day itself. Keep the tone practical and calm.
Fill in the [blanks], then paste into Claude or ChatGPT (free account). Leave out account numbers and addresses.

You don't need all five every time

For a quick fact or a simple request, the formula would be overkill. "What's a good substitute for buttermilk in pancakes?" works fine as it is. Use the formula when the answer matters, when it involves other people, or when your first attempt came back generic.

A good habit: if an answer disappoints you, look at the formula and ask which part you left out. Nine times out of ten, it's context or format. Add it in a follow-up message and you'll usually see the improvement immediately.

A quick memory trick

If five parts feels like a lot, shrink it to one question before you send: "Would a smart stranger know exactly what I want from this message?" If the answer is no, add whatever's missing. That's really all the formula is.

Frequently asked questions

Does the order of the five parts matter?

Not much. The order in the template is easy to remember and reads naturally, but the AI will understand the parts in any order. What matters is that the information is there.

Is "act as" really necessary?

No, it's optional. It's useful when you want a certain kind of expertise or perspective, but for many tasks a clear task plus good context does most of the work.

Does this formula work in both ChatGPT and Claude?

Yes. It's built on general principles of clear communication rather than features of a specific tool, so it works across the major AI chat assistants.

What's the most important part if I only add one?

Usually context. A clear task with no context gets a generic answer; adding who it's for and what your situation is tends to produce the biggest improvement.