How to write better AI prompts — a practical guide.
A six-part framework you can apply to any prompt, in any LLM, in under 60 seconds. With real before/after examples and a free tool that does it for you automatically.
A great prompt is a brief, not a sentence.
Most people prompt the way they search Google: a few keywords and hope for the best. The single change that lifts AI output quality more than any other is treating the prompt as a brief — a short, structured request with role, audience, task, format, constraints and (ideally) examples.
This guide walks through the six dimensions every great prompt hits, with concrete examples you can copy. Apply it in ChatGPT, Claude, Gemini, Perplexity — the framework is model- agnostic.
Six elements every great AI prompt has.
Apply them in this order; skip any and answer quality drops measurably.
01Role
Tell the model who to be: "You are a senior backend engineer reviewing a junior PR." Naming the role primes vocabulary, depth and tone — for free.
02Audience
Who is the answer for? A CFO, a 10-year-old, a senior engineer? Audience is the highest-leverage dimension after format. State it explicitly, not by implication.
03Task
State the task as a verb-led instruction with scope. "Summarize", "rewrite", "compare", "critique" — be specific. Replace any ambiguous noun with a concrete one.
04Format
Specify the shape of the output: word count, bullet count, table columns, code language. Format dramatically reduces variance and stops the model from padding.
05Constraints
Add what to avoid: jargon, marketing fluff, fabricated references, exceeding a token budget. Explicit negatives prevent the most common failure modes.
06Examples
Provide one or two examples of the style/output you want (few-shot). On creative and code tasks, a single example beats ten adjectives describing the same style.
Six small changes that always lift quality.
If you can only remember one thing from this page, it should be these six.
Name the audience
"Explain X to a senior engineer" lands very differently than "explain X". The model adjusts depth automatically.
Specify length
"In 120 words" or "in exactly 5 bullets" cuts variance by ~70%. Models pad endlessly without a length cap.
Show one example
A single example of the style you want changes the output more than any adjective ever will.
Tell it what to avoid
Explicit negative constraints ("no marketing language", "no fabricated citations") prevent the most common failure modes.
Separate context from task
Use clear delimiters (---, ```, headings) between the data the model should read and the task it should perform.
Ask the model to plan first
Prefix complex tasks with "Think step by step before answering". Chain-of-thought reliably improves reasoning quality.
Demand structured output
JSON / XML / markdown table. Free-form prose is for humans; structured output is for everything else.
Use the model’s native delimiters
Claude prefers XML tags. ChatGPT is happy with plain headings. Match the tool.
From prompt to brief.
review my code
You are a senior TypeScript reviewer. Review the function below for a Next.js 15 App Router project. Flag runtime errors, type-safety issues, React 19 anti-patterns. Return a corrected version + a 1-line rationale per change. No style nitpicks.
write a landing page
Write hero copy for a landing page targeting solo founders evaluating AI prompt tools. Voice: confident, plain-spoken, slightly contrarian. Output: H1 (≤9 words), subhead (≤22 words), and one 4-word CTA. No emojis. No exclamation marks.
help me prep for a job interview
Generate 8 likely interview questions for a Senior Product Manager role at a Series B B2B SaaS company. For each: my best 90-second answer using the STAR method, plus one follow-up the interviewer is likely to ask. Tone: confident, specific, no clichés.
Common questions.
Let an AI write better prompts for you.
Paste any prompt and watch the free AI Prompt Fixer apply the six-part framework in one click — same structure, taught on this page.