Prompt Writing Guide

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.

AI prompt writing tips checklist illustration
4.9 / 5 average ratingFree foreverNo account requiredWorks in ChatGPT, Claude, Gemini & more
The short version

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.

The framework

Six elements every great AI prompt has.

Apply them in this order; skip any and answer quality drops measurably.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 05Constraints

    Add what to avoid: jargon, marketing fluff, fabricated references, exceeding a token budget. Explicit negatives prevent the most common failure modes.

  6. 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.

Quick wins

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.

Apply the framework

From prompt to brief.

Before

review my code

After — enhanced

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.

Before

write a landing page

After — enhanced

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.

Before

help me prep for a job interview

After — enhanced

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.

How to Write Better AI Prompts FAQ

Common questions.

Specifying the audience and the output format. Together they explain about 60% of the variance in answer quality. Add explicit constraints (what to avoid) and you cover most failure modes before they happen.
As long as needed, no longer. Most great prompts are 80-250 words: 1-2 sentences of role/audience, 2-4 sentences of task and format, and 2-3 constraints. Going much longer rarely helps; going much shorter usually hurts.
Mostly yes. The role-audience-task-format-constraints framework works across every modern LLM. Claude responds slightly better to XML tags as delimiters; ChatGPT is happy with plain headings.
Usually, yes. Short prompts force the model to guess the audience, format and constraints — and it guesses defensively, which produces hedged, generic prose. Adding 50 words of structure can lift answer quality more than switching models.
Yes — that is exactly what AI Prompt Fixer does. It scores your prompt against the six dimensions, identifies which are weak, and rewrites the prompt to add the missing structure. Free and works in ChatGPT, Claude, Gemini and Perplexity.

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.