Mahmoud Fasfos
العربية

AI12 min read

How to Write a Professional AI Prompt: A 5-Part Template

A five-part prompt template (role, context, task, constraints, format) with four before-and-after workday examples and a shared prompt library for teams.

Key takeaways

  • Template: role, context, task, constraints, output format, plus an optional example. One line per element.
  • The colleague test: if a colleague who knows little about the task would be confused by your prompt, so will the tool.
  • A role sets tone, not accuracy: a 2024 EMNLP Findings paper found no accuracy gain from adding a persona.
  • State the language and format of the answer, split compound requests, and phrase constraints as what you want.
  • Save what works as a shared card with bracketed variables, and re-test it whenever the tool changes.

You type: "Write a reply to an angry client." Back comes a polite, tidy answer that would suit any client on earth and doesn't suit yours. You try three more phrasings and get three versions of the same generic reply.

Then you watch a colleague use the very same tool and get a reply they send after changing two words. The difference isn't a magic phrase or a pricier plan. It is what was written inside the box.

This article gives you a five-part template for writing a prompt, the one I train teams on, four before-and-after examples from an ordinary workday, the mistakes that keep recurring when you prompt in Arabic or switch between languages, and a way to turn what works into a library your team shares. It is current as of October 2026, and every study and figure is sourced at the end.

Why does the same tool give you a weak answer and someone else an excellent one?

The tool doesn't know your client, your company, your manager's tone, or what happened yesterday. All it knows about your situation is what you typed. When information is missing, it tends to fill the gap with the average: the answer that suits everyone and serves nobody.

Anthropic's official guide describes the situation with a clear picture: treat the tool as a brilliant new employee who doesn't know your organisation's norms or ways of working. It also offers a simple golden rule: hand your prompt to a colleague who knows little about the task and ask them to carry it out. If the colleague would be confused, the tool will be too.

OpenAI reaches the same point from another side. Its guide likens a reasoning model, one that generates an internal chain of thought before it answers, to a senior co-worker you can give a goal and trust with the details, and a GPT model to a junior co-worker who performs best with explicit instructions for a specific output. That last part is my advice, not the guide's: if you are not sure which kind of tool you are talking to, write the way you would write for a junior, clearly.

Nor is it a matter of magic words. A paper presented at ICLR 2024 tested open-source models with different formats that don't change the meaning of the request, and found accuracy differences of up to 76 points with one model. Those were older models in few-shot setups, so don't expect a gap that large in your daily chats. But it is a reminder that wording and layout are not decoration.

The five-part template: role, context, task, constraints, output format

The template is simple: five lines, one per element. There is nothing to memorise except five questions to ask yourself before you press send.

Role: who is speaking, and to whom?

"You are an account manager at a software company, writing to a long-standing client." One sentence fixes the position and the tone. Anthropic and Google both place the role in the system instructions or at the start of the prompt, and Anthropic says even a single sentence can change the tool's behaviour and tone.

Keep your expectations realistic, though. A paper published in Findings of EMNLP 2024 tested 162 roles across four families of open-source models on 2,410 multiple-choice factual questions and concluded that adding a persona to the system prompt does not improve performance compared with having none. A role sets tone and perspective; it doesn't hand the tool knowledge it lacks. Writing "you are the world's greatest expert" and waiting for a miracle won't work.

Context: what you know and the tool doesn't

Who you are, who is on the other side, what happened, and what the goal is. Add the reason if you can: Anthropic says explaining the purpose behind an instruction helps the tool understand your goal and respond more precisely. Google warns against assuming the tool already has the information it needs; put it inside the request.

If the context is a long pasted text, put it first and write your instructions at the end. Anthropic and Google both recommend this for long inputs, and Anthropic reports that placing the question at the end can improve response quality by up to 30% in its tests, especially with complex, multi-document inputs, so don't expect the same gain in a three-line message.

Task: one clear verb

Write, summarise, classify, compare, rephrase. Choose one verb and name the end product: "an email reply," not "something about the client." If the job has several parts, split it, as the mistakes section below explains.

Constraints: what must not be crossed

Length, tone, what must be mentioned, what must not be invented. Google advises stating any constraints on how the prompt is read or the answer is written. Where you can, phrase a constraint as what you want: "write flowing prose paragraphs" works better than "don't use markdown," an example taken from Anthropic's own guide.

Output format: how you want it delivered

An email of three paragraphs, a table with three columns, or three bullets and one recommendation. Both Anthropic's and Google's guides advise specifying the format outright. Skip this element and you receive text that needs reformatting, which is exactly the time the template was meant to save.

There is an optional sixth element: an example. If you have a previous reply you liked, paste it and say "write in this style." Anthropic recommends three to five varied examples, OpenAI suggests they cover a diverse range of inputs, and Google warns that too many can make the answer lean on them too heavily. Start with one and add more only if needed.

Before and after: four examples from an ordinary workday

The "after" prompts are models I wrote for you to copy, not results I tried and pasted in. Take them, swap what is in the brackets, and judge for yourself.

One: replying to an angry client

Before: "Write a reply to an angry client about the delay."

After:

Role: You are an account manager at a software company, writing in a calm, professional tone.

Context: Client A complained that phase two was delivered two weeks late and said their trust is shaken. One week of the delay came from their late approval of the design, and one week was our team's. The new delivery date is Thursday.

Task: Write the email reply.

Constraints: Apologise once, without grovelling. State the cause of the delay in neutral facts, without blame. Promise nothing except Thursday. Stay within 120 words.

Format: A subject line, then three short paragraphs, ending with one question about a time for a call.

Now the tool knows who it is, who will read the email, what actually happened, and where to stop. Nothing here needs extra intelligence, only information.

Two: a monthly report summary

Before: "Summarise this report."

After:

Role: You are a business analyst writing for an executive who reads on a phone between meetings.

Context: This month's sales figures are pasted above these lines, compared with last month. The executive will decide from them whether to change the plan.

Task: Summarise the month's performance.

Constraints: Do not state a cause that doesn't appear in the data. If a figure is missing, write "not available" and do not estimate it.

Format: Three bullets: what improved, what declined, what you recommend doing. One line each.

Notice that the figures come first and the instructions last, as above. And notice the second constraint: invented explanations are the most dangerous failure in reports, because they sound reasonable.

Three: a meeting summary

Before: "Summarise the meeting."

After:

Role: You are a meticulous meeting secretary.

Context: The transcript of the product team's meeting is pasted above these lines. Five people attended, and the summary will be sent to those who were absent.

Task: Extract the decisions and action items.

Constraints: Do not add an action nobody mentioned. If the owner or the deadline wasn't stated, write "unassigned."

Format: A table with three columns: action, owner, deadline. Below it, one line titled "Open questions."

The word "unassigned" does more than summarise: it shows you what the meeting never settled. That is often the most valuable part of the table.

Four: a job ad

Before: "Write a job ad for a sales coordinator."

After:

Role: You are a hiring manager at a start-up, writing for candidates who have never heard of us.

Context: We are looking for a sales coordinator who manages orders and follows up with existing customers, based in [city], in a team of six, working hybrid.

Task: Write the text of the job ad.

Constraints: Five responsibilities and four requirements only. No vague phrases such as "dynamic" or "strong personality." Do not require a particular gender or age, and do not invent a salary or benefits.

Format: A title, a three-line intro, then responsibilities, requirements, and one line on how to apply.

The line "do not invent a salary" prevents the most common slip in job ads: the tool adding plausible details you never gave it.

Common mistakes when you write prompts in Arabic

These are observations from practice, not from one particular study, and most of them apply to any language. Treat them as checkpoints rather than laws.

  • Mixing dialect and Modern Standard Arabic without saying which the answer should use. You may write your request in your own dialect and want the reply in Standard Arabic, or the reverse, and leave the tool to guess. Write in whatever style is comfortable, but add an explicit line: "Write in simple Modern Standard Arabic suitable for business correspondence," or "in a neutral dialect everyone understands."
  • Two requests in one. "Summarise, then translate, then suggest a title, then write a tweet." Google advises splitting a complex task into smaller prompts that chain, so the output of each step becomes the input of the next. Ask for the first, check it, then move to the second.
  • No output format. You get a list with headings and symbols that can't be pasted into an email. Ask for "plain text with no symbols or headings, ready to paste into an email."
  • Constraints phrased only as prohibitions. "Don't be formal" doesn't say what you want. Say "write in a friendly, professional tone," and add the reason: "the client will read it on their phone, so keep it short."
  • Pasted text with no boundaries. When you paste the message and your instructions as one block, the tool may not know where the text ends and your request begins. Separate them with two labels such as "Text:" and "Request:". Google advises clear delimiters between the parts of a prompt, and Anthropic recommends XML tags for the same purpose.

Ask it to question you before it answers

Sometimes you don't know what is missing from your request. Then reverse the roles and add a line like this at the end:

Before you write, if you lack any information that affects the answer, ask me about it first, with a maximum of three questions. If the information is enough, write straight away.

The cap matters, or your request turns into an interrogation. And the clause "if the information is enough" sets the rule for when to ask and when to proceed.

An earlier paper supports it: "Eliciting Human Preferences with Language Models" (2023) found, in preregistered experiments with 388 participants, that models which ask users questions often drew out more informative input than the prompts those users wrote themselves, and the mental effort participants reported was comparable or lower. But its domains were checking the format of email addresses, recommending articles and moral reasoning, not drafting work messages, and the participants were English-speaking, so take it as support for the idea, not conclusive proof for your case.

Build a prompt library for your team

The best prompt you wrote this month will vanish into your chat history, and a colleague will reinvent it from scratch. A library stops that waste.

The idea is close to what chapter 1 of Istiqala min Nafsik ("Resigning from Yourself") calls an implementation intention: an "if... then..." plan written before the situation arrives, so it isn't improvised under pressure. The book talks about one person's habits; here I carry the idea over to a team: "If a client complaint arrives, we start from the ready-made reply card."

That shift from randomness to method is also the title of one of the themes in The Blind Manager, which deals with practical tools for building cohesive teams.

Bottom line: start with one prompt today

Don't build a whole library this week. Pick the task you write the vaguest prompts for, rewrite it with the five elements, and compare. If you don't feel the difference the first time, ask which element is missing; the answer is usually there.

And more important than the whole template is knowing what you actually want. Many vague prompts aren't the tool's fault but a decision nobody made in the writer's head. If you're curious how we settle what we want and then turn it into action, you'll find help in the book Istiqala min Nafsik ("Resigning from Yourself").

Frequently asked questions

What is the best way to structure a professional prompt?

Five elements on five lines: role, context, task, constraints and output format. Add an example if you have a past reply you liked. Most of these elements appear in Anthropic's, OpenAI's and Google's guides under different names and orders, so the template is a practical summary of them, not an official format from any of them.

Is it enough to start with 'You are an expert in X'?

No. A paper in Findings of EMNLP 2024 found that adding a persona to the system prompt doesn't improve performance on factual questions. A role helps with tone and perspective, so pair it with context and real information.

How many examples should I include?

Anthropic recommends three to five varied examples, while Google warns that too many can make the answer lean on them too heavily. Start with one good example, add more if needed, and vary the inputs.

How do I stop the tool inventing figures or details?

Write an explicit constraint such as 'Don't state anything that isn't in the text; if something is missing, write not available.' It doesn't guarantee the result, so check figures and facts yourself before sending.

Can I use the same template in every tool?

The principles are shared across the three guides: clear instructions, context and examples, and Anthropic and Google also advise defining the output format. Details differ, so test your template on the tool you actually use and adjust it to the results.

Sources

  1. Prompting best practicesAnthropic (Claude Platform Docs), 2026
  2. Prompt engineeringOpenAI (API docs), 2026
  3. Prompt design strategiesGoogle AI for Developers (Gemini API docs), 2026
  4. When "A Helpful Assistant" Is Not Really Helpful: Personas in System Prompts Do Not Improve Performances of Large Language ModelsarXiv (Findings of EMNLP 2024), 2024
  5. Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formattingarXiv (ICLR 2024), 2024
  6. Eliciting Human Preferences with Language ModelsarXiv, 2023
Mahmoud Fasfos

Mahmoud Fasfos

CTO & COO · Author

Technology leader with 15+ years across Saudi Arabia, Canada and Jordan, working on AI, cybersecurity and project delivery. Author of «The Blind Manager» and «Resigning from Yourself».