How to write better prompts
A prompt is the message you send to a chatbot. Better prompts do not need secret formulas. They need the same thing a helpful colleague needs: to know what you want and why.
Why your message matters so much
The model continues from the text it is given. The Hugging Face course describes it as giving a prompt that the model then auto-completes. So a vague start tends to get a vague continuation, and a clear start pulls the answer toward your point.
Say it clearly and give context
Anthropic’s help centre gives these principles: explain your ask simply and clearly, include as much context as possible, imagine you are briefing someone with no background, and break complex requests into steps. Their prompting guide uses a picture many people find useful: treat the model as a brilliant new employee who knows nothing about your norms. If a colleague with no context would be confused by your message, so is the model.
Name the output you want
Be specific about format and limits: who it is for, how long, what tone, what to include. If you want more than the bare task, ask for it explicitly. Do not expect the model to guess.
Treat the first answer as a draft
A first answer can be too stiff, too vague or miss a detail. That is normal. Anthropic suggests giving feedback with follow-up instructions, clarifications or a request to rewrite. You do not have to start over: each reply is written with the earlier conversation in view.
Edit, do not rewrite
When you ask for edits to your own text, say what may change: “Fix only grammar. Keep the numbers and names.” Then compare both versions. An edit can bring in errors you did not ask for, such as a changed date, and your name still sits under the text.
Put standing rules in your first message
Chat apps place a hidden start before your message to turn a text continuer into a chat partner. You can add your own rule at the start of a conversation, for example “Always answer briefly and without jargon.” Because the earlier conversation is part of what the model reads each time, the rule stays in view as long as the chat fits into the context window.
Break big requests into steps
Complex requests work better in parts. Anthropic advises breaking them into substeps and giving instructions as a sequence. Ask for an outline first, check it, then ask for the full text. Each step gets a clear target, and you can correct course early.
Give it a role
A single sentence can steer the tone and behaviour of the answer. The Claude documentation says a role in the system prompt focuses behaviour and tone, and even one sentence makes a difference. In a chat you can try the same at the start: “You are a patient teacher. Explain it to a beginner.”
Example
The better version names the reader, the reason, the wish and the tone. The follow-up shapes the draft step by step.
- Weak: “Write a refusal.”
- Better: “Write a short, friendly email to the plumber. Thursday’s appointment does not suit me. I would like a new one next week. Informal tone.”
- Follow-up: “Shorter, and add a thank-you.”
Sources
What this page rests on. Open the links to read the originals.
- Hugging Face LLM course: How text generation works – a prompt is auto-completed
- Anthropic Help: My prompt isn’t giving me a helpful answer – clear instructions, context, breaking into steps, follow-ups
- Anthropic: Prompting best practices – be clear and direct, new-employee picture, specify format
- Anthropic Help: Get started with Claude – be specific, iterate with follow-ups
- Anthropic: Context windows – earlier conversation is part of each turn’s input
- Anthropic Help: Claude is providing incorrect or misleading responses – responses can be incorrect, so check edits
- Hugging Face: Chat templates – hidden start before your message
The 18 free levels
The free levels behind this guide let you try it hands-on.
- Level 4: Say what you need
- Level 13: Edit, don't rewrite
- Level 14: A draft in three steps
- Level 18: The start you never typed
