CCalclabhub

Work

How To Write ChatGPT Prompts

A prompt is a specification rather than a question. The model cannot ask what you meant, so anything left out of it is something it will decide for you.

Quick Answer

prompt = role + task + context + tone + format + constraints + a final-answer instruction

role
Who the model should be, in one phrase
task
What it should do, as a verb and an object
context
The situation the task happens in
L
Length of the assembled prompt in characters

The default prompt is 323 characters, about 55 words and roughly 81 tokens, and it scores 7 of 7 on the checklist: a role, a task, context, a tone, a format, at least one constraint and a sane length.

What Is How To Write ChatGPT Prompts?

A prompt is a specification, not a question. The model cannot ask what you meant, so anything left out of the prompt is something it will decide for you and you will not notice until the output is wrong.

The five sections that carry almost all the weight are role, task, context, tone and output format. Leave one out and the model fills it with the average of everything it has seen, which is rarely what you wanted.

A role sets the vocabulary and the standards the answer is judged against. A senior copy editor and a helpful assistant produce different sentences from identical instructions, because the role selects which register counts as correct.

The task should be a verb and an object. Rewrite this product description is a task, while help me with this listing is a mood and leaves the model to guess the rest.

Context is where most prompts are weakest. The situation, the audience and the constraints of the medium are all invisible to the model unless they are stated, and that difference is usually the whole difference.

Tone is a one-line instruction that changes the vocabulary, the sentence length and the level of hedging. It costs a handful of tokens and changes the output more than any other single line.

Output format is the most under-used section. Asking for numbered steps, a table, a single paragraph or valid JSON turns an answer into something you can use without reformatting it first.

Constraints are the guards. A word ceiling, short sentences, two examples, no jargon, a spelling convention and a demand for sources each prevent a specific common failure, and each costs a line.

Every extra sentence of instruction is another thing the model has to hold on to while it works. Longer is not better, and a prompt that grows past a couple of hundred words starts to dilute the sections that mattered.

A character count is a poor proxy for a token count but a fine one for planning. English runs near four characters per token, so a 323-character prompt is roughly 81 tokens, which is nothing against a context window and a lot against a tight budget.

The chain-of-thought instruction is the cheapest quality gain available. Asking the model to work through the problem before giving the final answer on its own line costs nothing and reliably separates the reasoning from the result.

The generator assembles the sections in a fixed order, turns each choice into a labelled line, and runs a seven-point checklist over the finished prompt. A prompt that scores seven is not guaranteed to be good, but one that scores five usually has an obvious hole.

None of this is specific to one model. The section structure predates all of them and will outlive any single one, which is the reason to learn it as a shape rather than as a syntax.

Formula

role, then task and context, then tone and format, then constraints, then the final-answer instruction

The order is not cosmetic. A model reads a prompt as a whole and weights the opening heavily, so the role goes first because it frames everything after it, and the closing instruction goes last because it is the final thing before generation starts.

SymbolMeaning
rRole
tTask
cContext
fTone and format
kConstraints
aClosing instruction

tokens = characters / 4, rounded up, for English text

Four characters per token is the usual English average. It is close enough for planning a budget and nowhere near accurate enough for billing, which is why the figure is labelled an estimate.

SymbolMeaning
LCharacters
n_tokRough tokens

score = the number of the seven checks that pass

Six of the checks ask whether a section is present, and the seventh asks whether the length is sane. A score below seven tells you exactly which section is missing rather than merely that something is.

SymbolMeaning
c_iCheck i
SScore

How To Calculate How To Write ChatGPT Prompts

  1. 1

    Name the role

    One phrase, and the more specific the better. A role is a frame rather than a decoration: it tells the model which register and which standards its output will be measured against.

  2. 2

    State the task as a verb and an object

    One sentence with something to do to something. If the task needs two sentences, it is probably two tasks and should be split or numbered.

  3. 3

    Add the situation

    What the task is about, who the result is for, and anything the model cannot see. This is the section that most often turns a generic answer into a usable one.

  4. 4

    Choose the tone and the output format

    Two dropdowns and two lines of text. They cost almost nothing and they change the result more than any amount of extra instruction elsewhere.

  5. 5

    Add constraints and the closing instruction

    Tick the guards that prevent the failures you have actually seen, then keep the closing instruction that asks for the work first and the final answer on its own line.

Examples

Example 1: A prompt for a product listing rewrite

Role
a senior copy editor
Task
rewrite this product description
Context
a listing for a handmade ceramic mug
Tone
Friendly
Output format
Bullet list
Constraints
Use short sentences; Give two examples
StepCalculationResult
Sections assembledrole, task, context, tone, format, constraints, closing line7
Charactersthe assembled prompt323
Wordsthe assembled prompt55
Rough tokens323 / 4, rounded up81
Checks passed7 checks, all present7

Result: The assembled prompt opens with 'You are a senior copy editor.', followed by a Task line, a Context line, a Tone line, an Output format line, two constraints, and the closing instruction to work through it step by step and give the final answer on its own line. It runs to 323 characters and about 55 words, which is roughly 81 tokens, and it passes all 7 checks on the quality list.

Example 2: The same prompt with three sections removed

Role
Task
summarise this
Context
Tone
Neutral
Output format
One paragraph
Constraints
none
StepCalculationResult
Checks passedrole, context and constraints are all absent4
Checks failed7 - 43
Charactersthe assembled prompt199
Wordsthe assembled prompt35
Rough tokens199 / 4, rounded up50

Result: With the role, the context and the constraints removed, only 4 of the 7 checks pass. The prompt still assembles — with no role named it falls back to 'You are a helpful assistant.' — and comes to 199 characters, 35 words and roughly 50 tokens. The three failures are the ones that matter: with no role the register is generic, with no context the answer cannot be specific, and with no constraints nothing stops it running long.

Calculator

Prefer a full-width tool? Open the How To Write ChatGPT Prompts calculator page.

Common Mistakes

  • Leaving the role out to save space

    A missing role does not produce a neutral answer, it produces an average one. The role is the cheapest line in the prompt and it changes the register of everything that follows.

  • Writing the task as a feeling rather than an instruction

    Help me with this listing gives the model nothing to do. A verb and an object, such as rewrite this product description, is the difference between an instruction and a hope.

  • Skipping the context because the task seems obvious

    What is obvious to you is invisible to the model. The situation, the audience and the medium are the three things it cannot guess and the three that change the answer most.

  • Piling on constraints until the prompt contradicts itself

    Under 200 words, give two examples, be concise and be thorough cannot all be satisfied at once. Each constraint should prevent a failure you have actually seen rather than one you imagine.

  • Asking for a format after the task instead of with it

    Output format threads through the whole answer, so stating it at the end forces a rewrite of work already done. Put it in the section block where the model can use it from the start.

  • Sending a paragraph where a line would do

    Every extra sentence is something the model has to hold on to. A long prompt dilutes the sections that mattered rather than reinforcing them, so cut before you add.

  • Treating the token estimate as a bill

    Four characters per token is an English average, not a measurement. It is right for planning a budget and wrong for reconciling an invoice, so never use it for the latter.

FAQ

What makes a good ChatGPT prompt?

Six labelled sections that do not contradict each other. The structure matters more than the length, and a prompt that names the role, the task, the context, the tone and the format beats a longer one that does not.

How long should a prompt be?

Long enough to name the role, the task, the context, the tone and the format, and no longer. Most good prompts sit between 200 and 600 characters, which is roughly 50 to 150 tokens.

Does asking the model to think step by step help?

Yes, and it is the cheapest quality gain available. Asking for the work first and the final answer on its own line separates the reasoning from the result at no extra cost.

Should I say please and thank you?

It costs tokens and changes nothing measurable. Politeness is not neutral though: a courteous prompt reliably produces a courteous answer, so it is a tone choice rather than a wasted line.

What is a token, roughly?

About four characters of English, or three quarters of a word. It is the unit models are priced and measured in, which is why a character count is a reasonable proxy for a budget.

Why does the same prompt give different answers?

Sampling introduces variation, and small wording changes shift the whole distribution. If you need stability, fix the format and the constraints so the variation has less room to move.

Can a prompt be too specific?

It can. Over-specifying the wording of the answer leaves the model no room to be better than your first guess, so specify the outcome and the shape and leave the words alone.

References

  1. [1]OpenAI Help Center, Prompting guide — https://help.openai.com/en/collections/3675942-prompting
  2. [2]Anthropic Documentation, Best practices for prompt engineering — https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering
  3. [3]Google for Developers, Prompt design strategies — https://ai.google.dev/gemini-api/docs/prompting-strategies