A good prompt
A good prompt tells the predictor what you want, who it's for, what it should look like, and what form it takes. Like explaining a task to a smart new colleague on their first day. Learn the four parts, and how to adjust when the answer isn't right.
First, what do you think?
Is there a secret phrase that makes a chatbot give better answers? Have a guess.
What is a good prompt?
The whole story in three sentences. A prompt is what you type to an AI tool. A good prompt says what you want, and gives the predictor what it can't guess. That comes down to four parts: goal, context, example and form.
Think of a smart new colleague, on their first day. They're quick and they can do a lot. But they don't know you, your customers or your habits. Anthropic uses this picture: explain it to them precisely, and the work gets better.
- Goal. What do you want? "Explain", "summarise", "write a letter".
- Context. Who is it for, and why? What does the predictor need to know?
- Example. Show what you mean. A sample sentence, a style you like.
- Form. How long? A list, a table, a short email?
You don't always need all four. A quick question can be one line. But the more it matters, the more parts you add.
What the predictor does
The predictor only has two things: your words, and what it learned in training. That's the rule.
It predicts the next word, again and again. Anything you leave out, it fills in with a guess. A vague question gives a guess at what people usually want. That's often not what you want.
Each part of a good prompt narrows the guess. Context tells it who the answer is for. An example shows the pattern to continue. Google and Anthropic both advise adding a few examples.
And a good prompt doesn't make the answer true. It makes it fit better. You still check it.
Explain it like you would to a smart new colleague: goal, context, example, form. Not right yet? Say it differently.
Try it yourself
Start from a vague question, and build a better prompt, part by part.
Everything runs in your browser. Nothing you type is sent anywhere.
Use the free version of any chatbot. Don't type anything personal.
Open an AI tool you may use. First ask the vague question: "Write something about the Romans." Then paste your new prompt.
What to expect. The second answer fits your goal, your reader and your form much better.
Watch out. Both answers can contain mistakes. A better prompt is not a check.
How do you write a good prompt?
Five steps. The first four are the parts, the fifth is adjusting.
Say your goal
Start with a verb. "Explain", "summarise", "compare", "write". Then say what about.
Give context
Who is it for? Why do you need it? What should it know? Anthropic's test: would a colleague with little context understand your prompt?
Show an example
Paste a sentence in the style you like. Or a sample of the result you want. A few examples work better than one.
Say the form
How long, and in what shape? "Five bullets." "A short email." "A table with two columns."
Adjust and try again
Not what you expected? Say it differently, or add what was missing. Google writes that a good prompt often takes a few tries.
In practice
Three people explain a task to their new colleague.
Case 1The talk about the Romans
Sanne (11) needs a three-minute talk about the Romans. She types: "Write something about the Romans."
Read the answer out loud as it is.
The predictor didn't know her age, the length or the topic. It guessed, and wrote a long, general text.
Add the parts. "Explain how Romans lived at home. For a class of 11-year-olds. Three minutes to read out loud. Short sentences."
The answer fits her class, her topic and her time.
Case 2The letter to the landlord
Mark (39) has a leak in his kitchen. He wants a letter to his landlord.
Type "letter about leak".
The predictor doesn't know what happened, or what tone he wants. The letter comes out stiff and vague.
Give the facts and the tone: "polite but firm". Paste a sentence from an earlier letter, as an example of his style.
The letter sounds like him, and says what matters.
Case 3The birthday cake
Fatma (67) bakes for 12 guests. One guest can't eat nuts. She asks for "a cake recipe".
Pick the first recipe in the answer.
The predictor didn't know about the guests or the nuts. The recipe may contain them.
Add the context: 12 people, no nuts. Ask for the form she needs: a shopping list and the steps.
She gets a recipe that fits her party. She still checks the ingredients herself.
When not to
- Not with personal details you don't needContext isn't everything about you.Leave out names and private data.
- Not ten tasks in one promptThe answer gets messy.Google advises one prompt per instruction.
- Not as a guaranteeA good prompt makes it fit, not true.Check the answer.
By situation
Say your level and your goal. For example: "Ask me questions, don't give the answer." Then you learn something.
Give the context a colleague would need: the reader, the purpose, the tone. Save prompts that work well, and use them again.
Recipes, letters, plans. Say what matters to you: who it's for, what to avoid, how long. Then adjust.
Myths and mistakes
| Claim | True? | Why |
|---|---|---|
| There's a secret phrase | No | Clear instructions, context and examples help. Not hidden tricks. |
| Longer is always better | No | Precise beats long. One task per prompt. |
| A good prompt works the first time | Not always | Google writes it often takes a few tries. |
| A good prompt makes the answer true | No | It makes it fit better. It's still a prediction. |
Related topics
Read first
- Choosing a toolfirst the right tool, then the right question.
Next
- Checking the answerwhat to do with what comes back.
Related
- The context windowwhy everything you type counts.
Sources
- documentationAnthropic. Prompting best practices.Think of the model as a brilliant but new employee who lacks context. The more precisely you explain what you want, the better the result. Test: would a colleague with little context understand your prompt? Explaining why helps. A few good examples are one of the most reliable ways to steer format and tone.
- documentationGoogle AI for Developers. Prompt design strategies.The model picks the next token with some chance, set by the 'temperature'. Low: more the same each time. High: more varied answers. Prompt advice: give clear and specific instructions, add context, include a few examples, say what format you want. Not the result you expected? Rephrase it; a good prompt often takes a few tries.
- explainerGoogle for Developers. LLMs: What's a large language model?.A language model predicts the next token, like a very large autocomplete. A token can be a word, part of a word or one character. Training needs a huge amount of text. Predictions often contain mistakes.
Test
You get 7 questions about the whole page. Get 5 right, and you've mastered the topic.
About the tools in this course. Every tool is described in the same way, in alphabetical order, without a recommendation. Names, prices and features change often: the maker's own site is always right. This site was built with the help of Claude, one of the tools described here.