The Anatomy of a Great Prompt – Role, Context, Task and Format

Learn the four parts of a great AI prompt: role, context, task and format. This detailed guide explains what each part does, shows weak and strong examples from Ghana, and ends with a template you can use today.

Anyone who has used an AI assistant for more than a few days has noticed something curious. The same tool can give a brilliant answer to one person and a bland, unusable answer to another, even when both are asking about the same subject. The difference is almost never the tool. It is the prompt, which is simply the message you type to the assistant. A prompt is not a magic spell or a piece of computer code. It is a briefing, much like the one you would give a capable new member of staff on their first morning. If you tell that person “do something about our social media”, you will get something, but probably not what you had in mind. If you tell them who the customers are, what the goal is, what to produce and how it should look, you will get something close to what you wanted on the first attempt.

Over time, people who use AI well have noticed that good prompts tend to contain four ingredients: a role, some context, a clear task and a requested format. These are not rules handed down by any company, and you will see them named slightly differently in different guides. They are a practical way of remembering what the assistant needs to know in order to help you properly. This article takes each ingredient in turn, explains what it does, shows what goes wrong when it is missing, and then shows how the four fit together into a single request that is easy to write and easy to improve.

Why prompts need structure at all

To understand why structure matters, it helps to picture what the assistant has to work with. It cannot see your shop, your classroom, your office or your face. It does not know that you are writing from Takoradi, that your customers are mostly students, or that your budget is GH¢500. Everything it knows about your situation is what you write in the conversation. When the message is thin, it fills the gaps with the most common assumptions, and the result is an answer that could have been written for anybody. That is why vague requests so often produce generic replies.

Structure solves this problem by making sure the important gaps are filled before the assistant begins. It also helps you. Writing a prompt in four parts forces you to think about what you really want, and many people discover that half the difficulty was that they had not yet decided. A prompt that you could hand to a human assistant without confusion is usually a prompt the AI can handle well.

Role: who the assistant should be

The role tells the assistant what kind of helper to be. You might write “You are an experienced primary school teacher”, “Act as a friendly customer care officer for a telecom company” or “Take the part of a careful accountant who explains things to people with no finance training”. The role is useful because the same facts can be explained very differently depending on who is doing the explaining. A teacher chooses simple words and examples. An accountant pays attention to numbers and risks. A seasoned editor looks for unclear sentences. By naming the role, you steer the vocabulary, the depth, the tone and even the type of questions the assistant raises.

It is worth being honest about the limits of this ingredient. A role does not give the assistant new knowledge or real qualifications. Telling it to act as a doctor does not turn it into one, and for health, legal and money matters you still need a qualified professional. What the role does is shape the style and the viewpoint of the answer. It is also not always necessary. For a simple factual question, such as the meaning of a word, a role adds nothing. The role earns its place when tone, perspective or level matters, for example when you want feedback on your writing from the point of view of a sceptical customer, or when you want a complicated topic explained as a patient teacher would explain it.

The best roles are specific and relevant, not grand. “You are a world famous genius” is a flattering phrase that tells the assistant nothing useful. “You are a Ghanaian small business adviser who has helped many market traders move from cash records to simple digital bookkeeping” is far better, because it points the answer toward a particular audience, a particular setting and a particular level of practicality. A helpful habit is to describe the role in terms of the person who would be most useful to you if they were sitting across the table. You can also describe the role of the reader instead of the writer, for instance by saying “Explain this to a customer who is angry and in a hurry”. That is not strictly a role for the assistant, but it does the same job of setting the tone.

Context: what the assistant cannot guess

Context is the background information that makes an answer fit your real situation, and it is the ingredient most often left out. It includes who you are, who the audience is, what has already happened, what you have tried, what limits you face, and what success looks like. If role sets the voice of the answer, context supplies its raw material.

Consider a teacher in Tamale who types, “Give me a lesson on fractions.” The assistant has no idea whether the class is in primary three or junior high school, whether there are ten pupils or sixty, whether there are textbooks, projectors or only a chalkboard, or how long the lesson is. The reply will be a generic lesson that may not fit any real classroom. Now imagine the teacher writes, “I teach primary five in a public school in Tamale. There are 55 pupils, we have chalk and a blackboard but no projector, and I have 40 minutes. Most pupils understand halves but struggle with comparing fractions such as three fifths and two thirds.” Every added detail removes a wrong guess, and the answer becomes something the teacher can walk into class and use.

Good context is relevant, not endless. You do not need to describe your entire life, only the facts that would change the answer. A useful test is to ask, “If a human expert had to do this task, what would they ask me first?” Those questions are the context to supply. Typical examples are the budget, the deadline, the location, the audience, the previous attempts that failed, the rules that must be respected and any strong preferences. Context also includes source material. If you want the assistant to summarise a notice, check a contract clause or rewrite a paragraph, you paste the text itself and say so, because it works far better from the material in front of it than from its memory. Be careful here about privacy. Do not paste passwords, mobile money details, national identity numbers or confidential documents unless you are sure how the service handles your data, and remove names and identifying details where you can.

There is another benefit to giving context that people often overlook. It tells the assistant what to avoid. If you mention that you tried offering a discount last month and it did not work, you will not be advised to offer a discount again. If you say that your customers are elderly and do not use smartphones, you will not be told to focus on an app. Context quietly rules out the unhelpful answers.

Task: what exactly you want done

The task is the actual request, and it is the heart of the prompt. It should say clearly what you want the assistant to do, using a strong action word such as write, rewrite, compare, explain, summarise, list, plan, critique, translate or calculate. The most common failure here is a task that is either too vague or too crowded. “Help me with my business” is vague, because it could mean a hundred different things. A message that asks for a logo idea, an explanation of tax, a price list and a poem all at once is crowded, and the assistant will spread its effort thinly across all of them.

A well written task is specific about the outcome. Compare “Tell me about marketing” with “Suggest five low cost ways to attract new customers to a hair salon in Madina during the next month”. The second names the action, the quantity, the business, the place and the time frame. It also hints at a constraint, low cost, which keeps the answer realistic. When a task is large, it is often better to break it into stages. You might first ask the assistant to produce an outline, review it, and then ask for each section in turn. This keeps the quality higher and lets you steer early, when changes are cheap, instead of discovering at the end that the whole direction was wrong.

Tasks also benefit from stating the standard of a good result. You can say “keep it to the facts I have given you”, “do not invent any prices”, “give the most important point first”, or “explain your reasoning before you give your recommendation”. For tasks that involve judgement, such as choosing between two laptops or two job offers, it helps to list your criteria and ask the assistant to compare the options against them, and to say what information it would need to be more certain. A final useful trick is to end the task by inviting questions, for example “Before you answer, ask me anything you need to know.” The assistant will often raise points you had not considered, such as your timeline or your audience, and your answers make the final reply far more suitable.

Format: the shape the answer should take

Format is the ingredient that people forget most often, and forgetting it is costly. The assistant will choose a shape for the answer if you do not, and its choice may not suit your purpose. You might want a short email, a table comparing three options, numbered steps you can follow at a workbench, a script to read aloud, a one page summary for your manager, or simple paragraphs for a letter. You can also set the length, the reading level and the tone, for example “in about 150 words”, “in simple English suitable for a Junior High School pupil”, or “polite but firm”.

Format matters for a practical reason: the answer is only useful if you can use it where you need it. If you plan to paste the reply into a WhatsApp status, a long essay is a nuisance. If you want to compare three suppliers, a table makes the comparison visible at a glance, while paragraphs hide it. If you are going to read the instructions while cooking or repairing something, numbered steps are easier than a block of text. Thinking about format also makes you think about the reader, which improves the content itself.

You can specify format in many ways. You can name the type of document, describe its sections, give a word limit, request headings or none, ask for a particular number of options, or provide a sample of the style you like. Showing an example is often the quickest method. If you paste a message that sounds the way you want and say “write in a similar style”, the assistant can pick up the sentence length, the warmth and the vocabulary far more accurately than any description would allow. A good example together with one line saying what makes it good, such as “short, polite and with one clear action”, teaches the assistant which features to copy.

Putting the four parts together

Seeing the ingredients combined makes the idea concrete. Imagine the owner of a small boutique in Osu who types, “Write a post about my new dresses.” That request has a task of sorts, but no role, no context and no format, so the reply will probably be a generic piece of advertising copy full of phrases that could describe any shop. Now imagine the same owner writes the following: “You are a friendly social media writer for small fashion businesses in Accra. I own a boutique in Osu selling affordable ready to wear dresses in African print for young working women. This week I received 12 new designs, prices range from GH¢180 to GH¢350, and customers can order on WhatsApp for delivery within Accra. Write an Instagram caption of about 60 words that makes customers curious, sounds warm and modern, mentions the WhatsApp ordering and delivery, and ends with a question to encourage comments. Give me three versions so I can choose.” Here the role sets the voice, the context supplies the business, the customers and the facts, the task is clear, and the format specifies length, tone, ending and number of options. The assistant now has almost nothing to guess.

Notice that the order is flexible. Many people like to put the role first, then the context, then the task, then the format, because it reads like a natural briefing. Others begin with the task and add the rest underneath. What matters is that the parts are present and clearly written, not that they appear in a fixed sequence. It also does not matter whether you separate them with labels or write them as flowing sentences. Labels can make long prompts easier to scan, but ordinary sentences work equally well.

Not every prompt needs all four parts at full strength. A quick question about the meaning of a word needs only a task. A request for a polite message to a landlord might need context and format but no special role. The skill lies in noticing which gaps would harm the answer and filling those. A useful rule of thumb is that the more the result matters, and the more it depends on your particular situation, the more of the four ingredients you should include. A thirty second question can be asked in a line. A report for your manager deserves a proper briefing.

Refining the answer and avoiding common mistakes

Even an excellent prompt rarely produces a perfect first reply, and that is no reason for disappointment. Treat the first answer as a draft and use the conversation to improve it. Give specific feedback, such as “the tone is too formal, the second paragraph repeats the first, and please mention the delivery fee”, instead of a general complaint such as “this is not good”. Ask for alternatives, ask the assistant to criticise its own work from the point of view of a sceptical reader, and then ask it to fix the weak points. If a long conversation becomes tangled with corrections, start a new chat with a single clear prompt that includes everything you learned.

Several mistakes recur among beginners and are easy to avoid. The first is vagueness, such as asking for help with a business without saying what kind, where or why. The second is overloading, which means putting several unrelated requests in one message. The third is hiding constraints that matter, for example a tight budget or a deadline, and then being unhappy with an answer that ignores them. The fourth is accepting a fluent answer without checking it. An assistant can state a wrong figure, date, law or reference with complete confidence, so anything that affects money, health, legal standing or your reputation should be verified with an official source or a qualified professional. The fifth is giving too much irrelevant detail, which buries the facts that count. The sixth is forgetting that the assistant does not remember earlier separate chats unless a memory feature is switched on, so important details should be restated in the current conversation.

It also helps to keep a small collection of your best prompts in a notes app on your phone. When a prompt works well, save it with the blanks marked, for example “You are [role]. I am [who you are] in [place]. I need [task] for [audience]. Important details: [facts and limits]. Please write it as [format], in about [length], and do not [things to avoid].” Next time you need something similar, you fill in the blanks in a minute. Over weeks, this personal library becomes one of your most valuable working tools, and it saves you from starting from nothing each time.

Refining-the-answer

Final thoughts

A great prompt is not a clever trick. It is clear communication, organised so that nothing important is left for the assistant to guess. The role tells it whose voice and viewpoint to adopt, the context gives it the facts of your situation, the task says exactly what you want done, and the format describes the shape in which you need the result. When these four are present and well written, the assistant stops producing average answers for an average person and starts producing answers for you, in your town, with your customers and your constraints.

Treat prompting as a skill that improves with practice. Start with ordinary tasks you already do, such as drafting a message, planning an event or explaining a topic, and notice which ingredient made the biggest difference each time. Check the facts that matter, protect your private information and keep your own judgement in charge of what you send and sign. Do this consistently and you will find that the quality of the answers you receive rises along with the quality of the questions you ask.

Gabby
Gabby

Inspiring readers to expound the possibilities of the unfolding World

Conversation

  • Share in the conversation!
No password needed - you'll confirm your email when you post.