How to Write Better AI Prompts: 8 Habits That Work
Get the answer you meant from ChatGPT, Claude or Gemini the first time: eight plain habits for clearer prompts, with before-and-after examples.
You don't need "prompt engineering" tricks to get good answers from ChatGPT, Claude or Gemini. Current models are very good at doing what you ask. The catch is that they do what you ask, not what you meant, and the gap between the two is usually a missing detail that was obvious to you and invisible to them.
These eight habits close that gap. They work for everyday tasks (messages, plans, explanations) and for work (emails, reports, code, data), in any AI chat app.
1. Lead with the task
Put what you want in the first sentence, as a plain instruction:
- "Write a short message to my landlord…"
- "Explain how DNS works…"
- "Fix the bug in this function…"
When the request is buried at the end of a paragraph of background, the model has to work out which part is the job. Background still matters (that's the next habit), but it should support the task, not hide it.
2. Give the context only you know
The model knows a lot about the world and nothing about your situation. Tell it what it can't guess:
- Who it's for: "for my manager, who isn't technical", "for a 10-year-old".
- Why you need it: "I'm presenting this on Thursday", "this goes in a public README".
- What you already tried: "restarting didn't help", "I don't want to use pandas".
Skip the things it can work out itself. "Python is a programming language" isn't context.
3. Keep the facts exact
Copy names, numbers, dates, prices, error messages and quotes exactly. "The error says something about encoding" gets a generic answer; pasting the actual error line gets a specific one.
The same goes for strength of feeling. "I'd prefer not to use a library" and "no libraries" lead to different code. Say which one you mean.
4. Say what the answer should look like
This is the habit that saves the most time and tokens. Without it, the model picks a format and length for you, and it tends to pick long.
| Instead of | Try |
|---|---|
| "Tell me about Docker volumes" | "Explain Docker volumes in 3 short paragraphs, with one example command" |
| "Help me with this function" | "Return only the corrected function, then one line saying what was wrong" |
| "Compare these laptops" | "Compare these 3 laptops in a table: price, weight, battery life, then a one-line recommendation" |
| "Write an email" | "Write a short, polite email of no more than 120 words" |
If you need data you'll use in code, ask for JSON with named fields, and check the result in a JSON formatter before you trust it.
5. Put long material first, then the question
When you paste a document, an email thread, logs or code, put the material at the top and your question at the end. Anthropic's guidance for Claude recommends exactly this for long inputs, and it helps other models too.
Wrapping the material in simple tags makes it unmistakable where it starts and ends:
<report>
[paste the report here]
</report>
Using the report above, list the three biggest risks it mentions, one line each,
with the page number where each appears.
Tags also help with safety. If the pasted text contains instructions ("ignore the above and…"), it's clearer to the model that they're part of the material, not part of your request. That isn't a complete defence, though: see Prompt injection explained.
6. Cut the filler and the magic words
Pleasantries, apologies and repetition cost tokens and add nothing. So do most "magic phrases" from old prompt guides:
- "You are a world-class expert…" A role helps only when it carries real context: "you're reviewing this for a beginner audience" changes the answer; "world-class" doesn't.
- "Think step by step" and "double-check your answer". Current models reason and check on their own, especially the ones with a thinking mode. If a task needs visible working, ask for it directly: "show the calculation".
- ALL CAPS and "VERY IMPORTANT". Newer models follow instructions closely, and shouting can make them over-apply a rule. Calm and specific works better.
Politeness is fine, of course. It just isn't what makes the answer good.
7. Say what to do, not only what to avoid
"Don't be too formal" leaves the model guessing what you do want. "Write in a friendly, plain style, like a message to a colleague" gives it a target. The same goes for format: "don't use bullet points" is weaker than "write it as two short paragraphs".
Positive instructions are also easier to check: you can look at the answer and see whether it did the thing.
8. Let it ask, and make it show its guesses
For anything that matters, end with one of these:
- "If something essential is missing, ask me one question before you start."
- "List any assumptions you made at the end."
The first stops the model from confidently answering the wrong question. The second puts its guesses where you can see them. Both are much cheaper than discovering the problem three messages later.
Putting it together
A rough prompt:
hey so can you help me write a text to my plumber, the boiler has been making a banging noise since tuesday and i need someone out before the weekend, keep it brief pls thanks!!
The same request with the habits applied:
Write a brief text to my plumber: the boiler has been making a banging noise
since Tuesday, and I need someone to come out before the weekend.
Shorter, and every fact is still there: the task leads, the details are exact, and "keep it brief" became part of the instruction.
For bigger tasks, a simple template covers most cases:
Task: [what you want, in one sentence]
Context: [who it's for, why, what you've tried]
Constraints: [must-haves: tools, length, tone, deadlines]
Output: [the format: a table, a code block, 3 bullets, under 200 words]
You won't always need every line. Leave out the ones with nothing to say.
Iterate the smart way
- Follow-ups are cheap. "Shorter", "more formal", "use the second option" are perfectly good prompts once the first answer is close.
- Edit instead of piling on corrections. If the first answer went wrong because the prompt was unclear, edit your original message (most chat apps allow it) rather than adding corrections. The model then works from one clear request, not a tangle of messages.
- Start a new chat for a new topic. Long conversations carry all their history into every reply, which costs more and can drag old details into new answers. AI tokens explained covers why.
- Check anything you'll run. AI-written regex, cron schedules and SQL often look right and aren't. Paste them into the regex tester, the cron explainer or the SQL formatter before they reach production.
Let a tool do the tidying
If you'd rather not think about any of this mid-task, Prompt Maid is a free skill I built that applies these habits for you. Start a message with maid: and it rewrites your rough prompt (lead with the task, keep facts exact, set the format and length, cut the filler) and shows you the result before it runs.
Summary
- Lead with the task.
- Give the context only you know.
- Keep facts exact.
- Say what the answer should look like.
- Put long material first, in tags.
- Cut the filler and the magic words.
- Say what to do, not only what to avoid.
- Let it ask, and make it show its guesses.
None of these are tricks. They're the same things you'd tell a smart new colleague who has never seen your project, and that's exactly what an AI model is, every time you start a chat.