The anatomy of a good prompt
Course contents (20 lessons)
- Getting to know Meta AI and Llama
- What Meta AI is and where you can use it
- Meta AI versus Llama: the assistant and the models
- Your first chat with Meta AI
- Prompt basics that work
- The anatomy of a good prompt
- Context, tone, length and follow-ups
- Everyday uses
- Writing and replying to messages
- Captions, posts and bios
- Planning and study help
- Customer replies for a small business
- Images, groups and privacy
- Writing image generation prompts
- Group chats, etiquette and privacy
- Working with Llama models directly
- Running a Llama model on your own computer
- System prompts and chat templates
- Parameters: temperature, top_p and max tokens
- Few-shot examples and structured JSON output
- Advanced prompting
- Prompting Llama for code
- Retrieval-augmented prompting: answering from your own documents
- Evaluating and comparing answers
- Safety, limits and a final project
- Safety, limits and responsible use
- Final project: build a study buddy assistant
Four parts that do most of the work
I have read a lot of prompt advice, and most of it comes down to four parts. You do not need all four every time, but when an answer disappoints me, one of them is usually missing.
- Task: what you want done. Use a clear verb: write, rewrite, list, compare, explain, summarise.
- Context: what the assistant needs to know about the situation. Who is the reader? What happened before?
- Constraints: limits on the answer. Length, words to avoid, things to include, things to leave out.
- Format: the shape of the output. A table, bullet points, three short paragraphs, a single sentence.
A weak prompt and a better one
Weak:
Write a message about the meeting.
Better:
Write a WhatsApp message to my team (6 people, friendly relationship).
Task: tell them the Thursday meeting moves from 10:00 to 14:00 because the client is travelling.
Constraints: under 50 words, polite, ask them to reply with a thumbs-up if the new time works.
Format: plain text, no bullet points.
Why the better one works
The first version leaves the assistant to guess everything. Which meeting? Who is it for? Formal or friendly? Long or short? The second version answers each of those questions before they are asked. The labels (Task, Constraints, Format) are not magic. They just keep me honest about what I included.
You do not need labels every time
In casual use you can write one natural sentence that contains all four parts:
Write a friendly WhatsApp message to my 6-person team saying Thursday's meeting moves from 10:00 to 14:00 because the client is travelling. Under 50 words, and ask for a thumbs-up if it works.
It is the same prompt in a compact form. Use labels when the request is long or complicated, and plain sentences when it is short.
Show, do not only tell
If you have a style in mind, paste a short sample. Assistants copy style very well.
Here is how I usually write to customers:
"Hi Sara, thanks for waiting. Your order is packed and leaves today. I will send the tracking number tonight."
Write a similar message to Omar. His order is delayed by two days because of a supplier problem. Keep my tone and length.
Why it works
Words like "friendly" and "professional" mean different things to different people. A real sample is exact. The model does not have to guess what "my tone" means because it can see it.
Say what to do, not only what to avoid
Compare "Do not be boring" with "Open with one surprising fact, then give three tips". The second tells the assistant what to do. Negative rules are fine as an extra ("no jargon"), but they work best next to a positive instruction.
A quick checklist
| Question to ask yourself | If the answer is no |
|---|---|
| Did I name the task with a clear verb? | Start the prompt with that verb. |
| Does it know who the reader is? | Add the reader and the relationship. |
| Did I give a length? | Add "under 80 words" or "three bullets". |
| Did I say what shape I want? | Add the format. |
| Did I include the facts it needs? | Paste them in. It cannot look up your life. |
The common mistake
People either write too little or write a long, tangled paragraph with five tasks in it. If you ask for a plan, a poem, a table and a translation in one message, the quality of each drops. Split big requests into steps. One main task per message works better.
Try it yourself
Take a message you need to send soon. First write the weakest version of the prompt, one short line. Send it and save the answer. Now write the four-part version and send that. Put the two answers side by side and underline what the better prompt fixed. This small comparison teaches more than reading ten articles.
This course is free to read. Create a free account to enrol, save your progress and pick up where you left off.
Sign up free I already have an account