How to Write Better AI Prompts
5 rules that turn a mediocre AI answer into a great one. With copy-paste templates.
Last updated
The biggest factor in answer quality isn't the AI model - It's the prompt. The same model gives you garbage if you ask vaguely and gold if you ask precisely. Prompt engineering is the discipline of writing prompts that consistently produce useful answers.
Why does this work? An LLM predicts the most plausible continuation of your text. A vague prompt is compatible with thousands of mediocre answers, so you get the statistical average of all of them. A precise prompt collapses that space down to the one answer you actually wanted. Every rule below is a different way of collapsing that space.
This guide gives you the rules with concrete before/after examples, copy-paste templates, and a troubleshooting section for when a prompt still won't behave.
Step-by-step guide
Be specific about what you want
Vague prompts produce vague answers. Specific prompts produce useful answers.
- Weak: "Write a tweet about our new feature."
- Strong: "Write a 220-character tweet announcing our new pricing page. Tone: casual but professional. Include exactly one emoji. No hashtags."
The strong version names the format, length, tone, and constraints. The AI doesn't have to guess.
The expected difference in output is dramatic. The weak prompt typically returns something like "Exciting news! We've just launched an amazing new feature... #innovation #tech" - Generic, hashtag-littered, unusable. The strong prompt returns copy you could publish with one small edit. Common mistake here: people specify the topic but not the constraints. Length, tone, and "do not do X" rules are where most of the quality lives.
Give context
Tell the AI who you are, who the audience is, and what's already true. Front-load the context.
- Weak: "Write a sales email."
- Strong: "I'm a B2B SaaS founder writing to existing customers who haven't logged in for 30 days. Goal: re-engage them with our new dashboard. Tone: friendly, no pressure. Length: 80-120 words."
A useful mental test: could a freelancer who's never met you complete the task from your prompt alone? If they'd have to email you three clarifying questions, the AI needs those answers too - It just won't ask. It'll guess, and its guesses are bland. Mention the audience's knowledge level ("they're non-technical"), what's been tried before ("we already sent one reminder, no response"), and the action you want ("goal: they click the dashboard link").
Specify the output format
Ask explicitly for a numbered list, a markdown table, JSON, or 3 paragraphs. The AI will deliver a clean format you can copy-paste somewhere useful.
Example: "Return your answer as a markdown table with columns: Idea, Effort (1-5), Impact (1-5), Why. Sort by Impact descending."
Format instructions also quietly improve the content. Forcing an Effort and Impact score makes the model actually evaluate each idea instead of listing whatever comes to mind. Other formats worth stealing: "answer in exactly 3 sentences" (kills rambling), "give the answer first, then the reasoning" (stops the essay-before-the-point habit), and "output valid JSON only, no commentary" when feeding results into code.
Show one example
One good example of the desired output is worth a paragraph of instructions. This is called few-shot prompting (as opposed to zero-shot, where the model gets instructions only).
Example: "Convert dates from US format to ISO 8601. Input: Jan 5, 2024 → Output: 2024-01-05Input: Dec 31, 2025 → Output: 2025-12-31
Now convert: Input: March 8, 2026."
This matters most for fuzzy, taste-based tasks. Want product descriptions in your brand's style? Paste two real ones and say "match this style." That beats any adjective list - "witty but warm" means nothing precise to a model, but two examples of witty-but-warm define it exactly. Common mistake: giving an example that contains quirks you don't want copied. The model imitates everything, including the flaws.
Iterate in plain English
Don't expect the first answer to be perfect. Tell the AI what to fix:
- "Shorter and punchier."
- "More technical."
- "Add a counter-argument."
- "Less hedging - Pick a position."
- "Rewrite in plain English, no jargon."
The AI holds the conversation in memory, so it iterates much better than starting over each time. Two iteration habits separate power users from beginners. First, change one thing at a time - "shorter, funnier, and more formal" pulls in three directions and produces mush. Second, when an output is close, say what to keep: "Keep the first two paragraphs exactly as they are; rewrite only the ending." Without that, the model happily rewrites the parts you loved.
Set a role when expertise matters
Telling the model who to be changes which patterns it draws on. "You are a contracts attorney reviewing this clause for a small-business client" produces meaningfully different analysis than a bare "review this clause" - More caveats where they belong, terminology used correctly, risks framed for the right reader.
For repeat use, set the role once as a system prompt so every message in the conversation inherits it. AskAI.free's specialised pages like the AI lawyer and AI accountant are exactly this: a strong role prompt baked in, so you skip the setup.
Don't overdo it. "You are the world's greatest genius marketer" adds nothing. Roles work when they're specific ("a paediatric nurse explaining to a worried parent"), not when they're flattery.
Use a template for repeat tasks
If you find yourself rewriting the same prompt structure repeatedly, save it. A good template has blanks for the parts that change and locked-in wording for the parts that work:
"I'm a [role] writing to [audience]. Write a [format] about [topic]. Tone: [tone]. Length: [length]. Must include: [requirements]. Never: [exclusions]."
Browse our library of 31 curated prompt templates for writing, coding, thinking, learning and more - Or save your own with the Pro plan.
Worked example: a weak prompt rescued in three moves
Watch the rules combine. Dan starts with: "Write a job posting for a developer." The output is generic boilerplate - "rockstar developer," "fast-paced environment," 400 words of nothing.
Move 1, add context and specifics: "We're a 6-person fintech startup hiring our first senior backend engineer (Python/Postgres). Salary $140-160K, remote-first, equity included. Write a job posting." Better - Real details now appear.
Move 2, add format and constraints: "Structure: 2-sentence hook, What you'll do (5 bullets), What we need (4 bullets), What we offer (3 bullets). No clichés like 'rockstar' or 'fast-paced'. Under 250 words."
Move 3, iterate: "The hook is boring. Rewrite it around the fact that this hire owns the entire payments pipeline." Three moves, four minutes, and the posting is genuinely publishable. That's the loop for every prompt: context, constraints, iterate.
Good prompts compound. A saved template you reuse 50 times is a 50× return on the 5 minutes you spent writing it. Start with one prompt you use weekly, perfect it, save it, then move to the next.
If a prompt still misbehaves after all this, the usual culprits are: the conversation has drifted (start a fresh chat), the task needs to be split in two ("summarise, then critique" beats "summarise and critique"), or the model is wrong for the job - See how to compare AI models. For more techniques, see our prompt engineering glossary entry or jump straight to the prompt library.
Related tools and guides
Try the techniques above on AskAI.free - Your first question is free.
Start a free chat →FAQ
Are AI prompts the same for ChatGPT and Claude?
The same principles apply - Specificity, context, format, examples all transfer. But the models have different temperaments. Claude responds well to longer, more structured prompts and follows multi-part instructions more faithfully; ChatGPT is more forgiving of casual phrasing and better at running with a loose brief. If a carefully built prompt underperforms on one model, test it on the other before rewriting it - AskAI.free lets you switch models inside the same conversation.
How long should a prompt be?
Long enough to specify what you want - Usually 30-200 words for non-trivial tasks. Length itself isn't the goal; information density is. A 40-word prompt with audience, format and constraints beats a 300-word ramble. If you're regularly past 300 words, you're probably stuffing in reference material that belongs as a pasted attachment below the instructions, with the instructions kept short and clear at the top.
What's a system prompt?
A system prompt is an instruction sent before any user message that sets the AI's persona, tone or constraints for the whole conversation - Things like "You are a senior editor. Always answer in British English. Never use bullet points." It's how products bake in behaviour: AskAI.free's AI lawyer page is a normal model with a detailed legal system prompt. See our glossary entry on system prompts for how they differ from regular messages.
Does prompt engineering still matter as models get smarter?
Less for basic clarity, more for control. Modern models guess intent better than 2023 models did, so casual questions work fine. But the gap between a default answer and the answer in your voice, your format, your constraints hasn't closed - That's specification, not intelligence, and no model can read your mind. The skill is shifting from "tricks to make it behave" toward "clearly describing what good looks like."
Why does the AI ignore parts of my prompt?
Usually one of three reasons. The prompt buries instructions mid-paragraph where they get less attention - Pull rules into a list at the start or end. The instructions conflict ("be comprehensive" plus "keep it under 100 words") and the model silently picks one. Or the conversation is long and earlier instructions have effectively expired - Restate the rules or start fresh. If one instruction is critical, mark it: "Most important rule: never mention pricing."