Lesson 1 of 6 · 15 min · Concept content, does not go stale
Advanced prompting: roles, steps, examples and iterating
By the end of this lesson you will be able to:
- Give the AI a role and an audience to change the tone and level of its answer
- Show 1 or 2 examples of the result you want and ask for a specific format
- Ask the AI to critique its own answer and improve it part by part, without starting again
The fair poster, in three attempts
Graça is on the festivities committee of her freguesia (parish). In August there is a fair of local produce and she needs the text for the poster. She makes three attempts with the AI, each better than the one before.
Version 1. The request almost everyone writes:
Write a text for the parish fair poster.
Out comes "Come and celebrate our traditions with us!!!", with no date, no place and three exclamation marks.
Version 2. With the Level 1 formula (situation, what I want, who it is for, format):
The parish of [name] is holding its local produce fair on Saturday, [16 August], from 10am to 7pm, in the square in front of the church. There is cheese, crafts, livestock, food and drink, and music in the late afternoon. Write the text for an A3 poster: a short title, one sentence of invitation and the practical information. It is for everyone on the island, including older people. In plain English, without too many exclamation marks.
It already has everything that matters. But the title comes out dull and Graça has nothing to compare it with.
Version 3. With the pieces from this lesson:
You are a graphic designer who makes posters for village festivals. You know that a poster is read in 3 seconds, from inside a car.
[the same information as in version 2]
Do it like this:
1. First, ask me up to 3 questions about what you still need to know.
2. Then give me 3 different titles: a traditional one, a funny one and one of 4 words at most.
3. For each title, write the complete poster in a table with three columns: title, invitation sentence, practical information.
4. At the end, say which of the three reads best from a distance, and why.
Example of the tone I like, from an old poster: "Holy Spirit festival: soup, music and the whole village out in the street".
The AI asks whether there is parking and whether entry is free. Then it hands over three posters side by side. Graça picks the second and fine-tunes it. Let us look at the pieces one by one.
Giving a role
"You are an accountant explaining to a shopkeeper." This sentence changes the vocabulary, the level of detail and what the AI treats as important. It works better when you also say who it is talking to: the shopkeeper, the 9th-grade pupil, the neighbour who is 80.
Watch out
A role does not give competence. Writing "you are a lawyer" does not put a lawyer on the other side: it makes the AI speak like one, with more technical terms and more confidence. It can still invent an article of law. The role changes the tone, not the truth. Laws, numbers and dates are always checked, as in Level 1.
Asking for steps
The AI writes word by word. If it answers straight away, it tends to hold on to the first idea that occurs to it. When you ask for steps ("first ask questions, then answer"; "first list the problems, then suggest solutions"), it organises itself before writing. And you can correct things halfway, before the work is done.
Showing examples
Sometimes it is hard to describe what you want, but easy to show it. It is like telling the baker "I want a loaf like this one" instead of explaining the crust. One or two examples tell the AI the tone, the length and the shape all at once. This is called few-shot prompting: "a few examples".
Write short descriptions for the products in my shop, in the same style as these two examples:
Aged cheese: "Aged 4 months. Sharp at the end. Have it with cornbread and a glass of red."
Blackberry jam: "Blackberries picked by hand. Not much sugar. Good with fresh cheese."
Now write for: [salted butter], [massa sovada (sweet bread)], [araçá (strawberry guava) jam].
Tip
With only one example, the AI tends to copy it closely. Give two examples that are different from each other and say what you want it to follow: "the tone and the length, not the words".
Asking for the format
Say how you want to receive it: as a table, as a list, in two columns (Portuguese and English), with a maximum number of words. And ask for several versions. The AI's first idea is the most probable one, and the most probable one is almost always the dullest. With three versions in front of you, you choose.
Asking it to critique its own answer
After the answer, get the AI to review what it wrote, through the eyes of the person who will read it:
Read what you wrote as if you were a 70-year-old person driving past the poster. What is not clear? What is missing? Point out at least 3 problems and then fix them.
Self-critique catches confusing sentences, missing information and long titles. It does not catch invented facts: those are for you to check.
Tip
If the critique comes back full of praise, be firm: "I don't want praise. Only point out what is wrong."
Iterating: change one part, don't rewrite everything
When the answer is almost good, do not start again in a new conversation. Point to the part and say what stays:
Version 2 stays. Keep everything except the title: shorter, and without the word "tradition".
Saying what you keep stops the AI from spoiling what was already good. It is only worth starting again when the conversation has gone round many times and the AI begins to forget what you agreed. Then, ask for a summary and paste it into a new conversation (Level 1, lesson 3).
Tip
When a version 3 turns out well, save it in your notepad as a template. At the next fair, you only change the date.
Exercise
How I know it worked three answers, each better than the last. The last one brings three options in a table and a recommendation, and you end up with a text you would use today.
If it didn't work
- Did the AI skip the questions and write straight away? "Stop. Questions first, then you write."
- Are the three versions almost the same? "More different from each other: one serious, one funny, one of only 4 words."
- Did the table fall apart on your phone? Ask for a numbered list instead of the table.
- Did it copy your example word for word? Give a second, different example and say "only the tone".
Videos
Five practical prompting techniques (zero-shot, few-shot, role, contextual and chain-of-thought), plus specifying the output format, with simple examples.
A six-part formula for a good prompt (task, context, examples, persona, format and tone), comparing a weak and a good prompt. It is from 2023, but the structure of a good prompt still holds.