Writing Your First Good Prompt: Be Clear and Specific
A good prompt tells the model the task, the audience, the constraints and the form of the answer, in plain words. Models are quick but they cannot read your mind. Most bad outputs come from missing information, not from a lack of clever tricks.
Think of a brilliant new colleague
A useful mental model: imagine handing the task to a smart colleague who has just joined, knows nothing about your project and cannot ask questions. What would you need to tell them? The goal, why it matters, who will read the result, what good looks like, and what to avoid. If your prompt would leave that person confused, it will confuse the model too.
A vague prompt and a clear one
vague = "Write something about our new feature."
clear = """Write a 100-word announcement for our blog about the new "shared folders" feature in Acme Notes.
Audience: existing customers who are not technical.
Tone: friendly and direct, no hype words like "revolutionary".
Include: what it does, who can use it (Pro plan only), and one example use.
Output: plain text, one paragraph, no title.
"""
With the vague version the model must guess the length, the audience, the product, the format and the tone, and each guess may be wrong. With the clear version the space of correct answers is narrow, so the first result is much more likely to be usable.
The ingredients
- Task: start with the action. "Summarise", "classify", "rewrite", "extract".
- Input: provide the material to work on, clearly separated from the instructions.
- Audience and purpose: who reads it and what they will do with it.
- Constraints: length, language, things to include or leave out.
- Output format: plain text, bullet list, a table, JSON with named fields.
Run it and compare
import anthropic
client = anthropic.Anthropic()
def run(prompt):
reply = client.messages.create(
model="claude-sonnet-5-5",
max_tokens=500,
messages=[{"role": "user", "content": prompt}],
)
return reply.content[0].text
print("VAGUE:\n", run(vague))
print("CLEAR:\n", run(clear))
The vague prompt will produce generic text, possibly with headings and invented details. The clear prompt should give one tight paragraph of about 100 words. Count the words and check each constraint. If one is broken, add a sentence that targets it.
Say what you want, not only what you do not want
"Do not be verbose" gives the model less to work with than "Answer in two sentences". Positive, concrete instructions are easier to follow than a list of prohibitions. Use a prohibition when there is a specific thing to avoid, and pair it with an alternative.
Ask for what you actually need
If you need a quality bar, name it. "Make it impressive" is vague. "Include one concrete example and one common pitfall" is checkable. If you want the model to go beyond the basics, say so, because the default behaviour can be conservative.
Show the model what finished looks like
A strong habit is to describe the finished product before you describe the process. "The result should be a table with three columns: feature, benefit, and one-line example" is clearer than "analyse these features". If you can picture the result and the person who will use it, write that picture into the prompt. The model then works backwards from the target instead of inventing one.
Use plain words and complete sentences
There is no secret syntax. You do not need magic phrases, threats or capital letters. Short, direct sentences written the way you would brief a person work best. If you catch yourself writing a long, tangled instruction, split it into a numbered list so that each step is one action. The model handles ordered steps well, and so will the next developer who reads your prompt.
Iterate in small steps
- Run the prompt on three to five varied inputs, not only your favourite one.
- Read the failures and ask what information the model lacked.
- Change one thing per iteration so you know what helped.
- Keep the versions that worked in a file so you can go back.
Mistakes to avoid
- Hiding the real task at the end of a long, rambling prompt.
- Assuming the model knows your internal acronyms or project context.
- Mixing instructions and input so the model cannot tell them apart.
- Judging a prompt on a single lucky or unlucky run.
Comments
No comments yet. Have a question or a tip? Be the first to share it.