Contact, if you are interested in this website/domain name/Sponsorship/Advertisement/Partnership — web.works/contact
AiTrain
Prompt Craft9 min readUpdated October 2026

The five-part prompt: a framework that works on any AI assistant

Role, context, task, constraints and format — a repeatable prompt structure with before-and-after examples you can use with any AI assistant.

By the AiTrain editorial team · Reviewed under our editorial standards

Most disappointing AI answers come from instructions that leave the model guessing. The five-part prompt removes the guesswork. It works on every major assistant because it mirrors how you would brief a capable human colleague.

Key takeaways

  • Good prompts answer five questions: who should the AI be, what background matters, what should it do, what rules apply, and what shape should the answer take.
  • You do not need all five every time; add parts until the output is right.
  • Format instructions are the cheapest way to get output you can use immediately.

The five parts

Part Question it answers Example
Role Who is doing the work? "Act as an experienced customer-support lead."
Context What does it need to know? "Our customers are small bakeries; the delivery was two days late because of a supplier issue."
Task What exactly should it produce? "Write a reply to the complaint below."
Constraints What rules apply? "Under 120 words. Offer a 10% credit. Don't blame the supplier by name."
Format What should the output look like? "Subject line, then the email body. No sign-off; I'll add mine."

Before and after

Before:

Write a reply to this angry customer.

The result is generic, probably too long, and may promise things you cannot deliver.

After:

You are an experienced customer-support lead for a wholesale flour supplier. Our customers are small independent bakeries. This customer's delivery arrived two days late because a supplier missed a shipment; that has been fixed. Write a reply to the complaint below. Keep it under 120 words, apologise once (not repeatedly), offer a 10% credit on the next order, and do not name the supplier. Use a warm, direct tone. Format: a subject line, then the email body. No sign-off. Complaint: [paste]

The second prompt takes 40 seconds longer to write and usually saves several rounds of editing.

Part by part

Role

A role sets vocabulary, priorities and level of detail. "Explain this as a tax accountant" and "explain this as a primary-school teacher" give very different answers. Keep roles realistic and relevant.

Context

This is where most of the value is. The model knows nothing about your audience, history or goals. Two or three sentences of context typically beat any amount of clever wording. If you have source material, paste it and say so: "Use the policy text below."

Task

Use a clear verb: draft, summarise, compare, rewrite, extract, classify, critique. One main task per prompt works best; for bigger jobs see prompt chaining.

Constraints

Length, tone, things to include, things to avoid, reading level, legal or brand rules. Positive instructions ("use plain English") tend to work better than only negative ones ("don't be complicated").

Format

Ask for exactly the shape you need: a table with named columns, a numbered checklist, three options labelled A/B/C, headings matching your template, or structured data. You will paste the result faster and spot gaps sooner.

A reusable template

Role: You are a [role] helping [who].
Context: [2–4 sentences of background]. Source material is below if relevant.
Task: [verb] [what] for [audience/purpose].
Constraints: [length], [tone], include [x], avoid [y].
Format: [exact structure].
If anything important is missing, ask me up to 3 questions before answering.

That last line is surprisingly powerful: it lets the model surface gaps instead of guessing.

Practise it

Take three prompts you used this week and rewrite each with all five parts. Run both versions and compare. Then save the best ones to a shared prompt library — or start from our prompt library, which uses this structure throughout.