B5 · Generative AI and Conversational Assistants

Writing Effective Prompts

An effective prompt tells the AI tool clearly what you want. It usually has five parts: a role for the tool to take, the context it needs, the task itself, the format of the answer, and any limits. Writing prompts well is a skill of clear communication.

12 min Beginner Jump to the activity

What you need: Nothing. This page starts from the beginning, with no programming and no formulas.

Definition

Two people ask the same chatbot for help with the same essay. One gets something useless and the other something excellent. What did the second person do differently?

An effective prompt tells the AI tool clearly what you want. It usually has five parts: a role for the tool to take, the context it needs, the task itself, the format of the answer, and any limits. Writing prompts well is a skill of clear communication.

In simple words

Suppose you send a new helper to the market with the words "buy vegetables". They may come back with anything. Say instead: "We are making sambar for six people tonight. Buy half a kilo of drumsticks, a quarter kilo of small onions and two tomatoes, and spend no more than a hundred rupees." Now they can do the job. A prompt works the same way. The tool cannot see your situation, so you have to put it into words.

Why it matters

The quality of what you get from a generative AI tool depends heavily on what you ask. A vague prompt gives a generic answer. A clear, specific one gives an answer that fits your need, and saves you several rounds of correction.

Key terms

Prompt
The instruction or question you give to an AI tool.
Role
Who you ask the tool to be, such as a patient tutor or a careful editor.
Context
The background the tool needs: who it is for, what the situation is, what you already know.
Format
The shape you want the answer in: a list, a table, three sentences, a letter.
Constraint
A limit on the answer, such as its length, level or what to leave out.
Example (in a prompt)
A sample of what you want, given so that the tool can follow the pattern.

Explained in detail

Why vague prompts fail

A language model produces the most likely response to the text it is given. If the text is "write about pollution", the most likely response is an average essay about pollution: general, middling in length, aimed at nobody in particular. The model has no way to know that you are preparing a two-minute speech for the morning assembly about plastic waste in your own town. Every detail you leave out is filled with an average guess. Prompting well mostly means removing the need to guess.

The five parts

PartQuestion it answersExample
RoleWho should the tool be?"Act as a friendly science tutor."
ContextWhat is the situation?"I am twelve and I have a test on the water cycle tomorrow. I understand evaporation but not condensation."
TaskWhat exactly should it do?"Explain condensation using an example from a kitchen."
FormatWhat should the answer look like?"Use four short sentences, then ask me two questions to check I understood."
LimitsWhat should it avoid?"Do not use difficult words, and do not give me the answers to the questions."

You do not need all five every time. A simple request may need only a task and a format. But when an answer disappoints, check which part was missing. It is usually the context.

Techniques that help

  • Give an example. Show one sample of the style you want, and ask for more like it.
  • Ask for steps. "Explain your reasoning step by step" often improves answers to problems.
  • Say who the audience is. "For my grandmother, who has never used a smartphone" changes everything.
  • Break a large job into parts. Ask for an outline first, then for each section.
  • Ask the tool to ask you. "Before answering, ask me any questions you need."
  • Say what you do not want. "No bullet points" or "do not invent statistics".

Prompts for pictures

Image prompts follow the same logic with different parts: the subject (what is in the picture), the setting (where and when), the style (photograph, watercolour, cartoon), the mood and lighting, and the framing (close-up, wide view). "A dog" gives a random dog. "A brown street dog asleep on warm temple steps at sunrise, soft golden light, watercolour style, wide view" gives the picture you had in mind.

What a good prompt cannot do

A prompt shapes the answer; it does not make the answer true. Telling a model "be accurate" or "do not make mistakes" has little effect, because the model has no separate way to check facts. Good prompting reduces vague and off-target answers. It does not remove the need to verify. And a prompt should never contain private information: write "my friend" instead of a full name, and leave out identity numbers, addresses and health details.

How it works

Weak promptStronger prompt
Tell me about the Mughals.I am revising for a history test. In a table, list the first six Mughal emperors, the years they ruled and one thing each is remembered for.
Write a letter.Write a polite letter of about 120 words to the municipal office asking for the street light outside our lane to be repaired. It has been broken for three weeks.
Help with maths.I keep making mistakes when adding fractions with different denominators. Show me one worked example, then give me three to try, and wait for my answers before correcting them.

Worked example

Homework question: why does the Moon seem to change shape during the month? Prompt 1, vague: 'Tell me about the Moon.' A typical answer lists the Moon's size, its distance from the Earth and the first landing in 1969. All of it may be true, yet none of it explains the changing shape. Ask the check question: what did this help me understand about my homework? Very little.

Prompt 2, with an example: 'I'm learning why the Moon looks different on different nights. Explain it in five short sentences, the way this example explains shadows: "A shadow forms when something blocks light." Use one everyday comparison.' A typical answer explains that the Sun always lights one half of the Moon, and as the Moon travels around the Earth we see different amounts of that lit half, like walking around a lamp while holding up a ball. Check question: now I understand why the shape changes, and that it is not caused by the Earth's shadow.

Prompt 3, the learner's own: the learner adds what they still find confusing, and asks for one common mistake to avoid and a quick question to test themselves. Comparing all three answers with the same check question shows which prompt actually helped with the homework, not which answer was the longest.

Try it yourself

Build a better prompt

Start with a plain request. Add the parts one by one, and watch how the reply changes.

Name the part of the prompt

Which of the five parts is each sentence?

  • "You are an experienced cricket coach."
  • "I am a left-arm spinner aged fourteen and I bowl too many wides."
  • "Suggest three practice drills to improve my accuracy."
  • "Give them as a numbered list with one line each."
  • "Do not suggest anything that needs special equipment."

Improve three weak prompts

Work on paper first. Then, if you have access to a chat assistant with an adult's permission, try both versions.

  1. Rewrite "Tell me about healthy food" for someone planning a week of school lunches.
  2. Rewrite "Write a story" so that it names the characters, the place, the length and the kind of ending.
  3. Rewrite "Explain photosynthesis" for a learner who knows what leaves are but has never heard the word chlorophyll.
  4. For each one, underline the context you added.

Think about it

  • Which of the five parts did you add most often?
  • Did writing the better prompt make you clearer about what you actually wanted?

One homework question, three prompts

Watch three prompts about the same homework judged by one question: what did this help me understand?

Your turn: three prompts, one check question

Use a chat assistant only with an adult's permission; otherwise a partner can answer as the assistant would.

  1. Pick one homework question you are working on.
  2. Write a vague prompt, then a prompt that adds your situation and an example of the kind of answer you want, then your own best prompt.
  3. Under each answer, finish the sentence: 'This helped me understand…'
  4. New case: repeat all three steps for a different question, 'Why do we have day and night?'

Think about it

  • Which prompt gave the most understanding, and what did it include that the others did not?

Common mistakes

  • Writing a few words and expecting the tool to know your situation.
  • Believing that a well-written prompt guarantees a true answer.
  • Putting names, addresses or other private details into a prompt.

Check yourself

Question 1

1. Which part of a prompt explains your situation?

Question 2

2. Which prompt is most likely to give a useful answer?

Question 3

3. What can a good prompt NOT do?

Summary

  • A strong prompt gives a role, context, a task, a format and limits.
  • Most weak answers come from missing context.
  • A good prompt improves relevance, not truth, and should contain no private information.

Finished reading?

Sources: UNESCO: Guidance for generative AI in education and research · AI4K12: Five Big Ideas in AI