DAILY BRIEF What changed in AI, dated and sourced. HUMANRANK.AI
HumanRank.ai Search models, tools, jobs⌘K Daily Brief Subscribe
BRIEF What changed in AI, dated and sourced.
HumanRank Brief
Guides/How to write better AI prompts
FIELD GUIDE

How to write better AI prompts

SHORT ANSWER

A good prompt states the goal, the audience, the context the model lacks, the exact output format and 2 to 5 worked examples, then gets tested on 10 or more real inputs before you trust it.

HumanRank editorial deskUPDATED 2026-12-02 · 6 MIN READ

Anthropic's test: if a colleague with minimal context would be confused by your prompt, the model will be too.

How to write a better AI promptTHE METHODHow to write a better AI prompt01Define successfirstWrite two or threepass rules02Say what andwhyDeliverable,reader and thereason for each03Show 2 to 5examplesVaried input andoutput pairs04Tag thematerialMarkdown or XMLbetweeninstructions and05Put thequestion lastLong documents goat the top06Test, then pin10 or more realinputs, then pinthe modelBased on the OpenAI, Anthropic and Google prompt engineering guides, checked 2 December 2026.How to write a better AI promptTHE METHODHow to write a better AIprompt01Define success firstWrite two or three pass rules02Say what and whyDeliverable, reader and the reasonfor each rule03Show 2 to 5 examplesVaried input and output pairs04Tag the materialMarkdown or XML between instructionsand data05Put the question lastLong documents go at the top06Test, then pin10 or more real inputs, then pin themodelBased on the OpenAI, Anthropic and Google promptengineering guides, checked 2 December 2026.

Prompt checklist

Element What to write Source
Goal One sentence on the task and what "done" looks like Anthropic: be clear and direct
Reason Why the constraint matters Anthropic: add context to improve performance
Audience Who reads the output and what they already know All three guides
Inputs The documents or data, labeled and separated OpenAI: Markdown and XML for boundaries
Examples 2 to 5 varied input and output pairs Google: always include few-shot examples
Format Length, structure, fields, tone All three guides
Order Long material first, the question last Anthropic and Google long-context advice
Test 10 or more real cases with a pass rule OpenAI and Anthropic evaluation guidance
AS LISTED BY EACH SOURCE · CHECKED 2 DEC 2026

Seven steps to a better prompt

  1. Define success before you write. Anthropic's prompt engineering overview assumes you already have "a clear definition of the success criteria" and a way to test against it. Write two or three pass rules, such as "names the refund amount" or "under 120 words."
  2. Say exactly what you want. Anthropic's prompting best practices describe the model as "a brilliant but new employee who lacks context on your norms." Name the deliverable, the reader and the bar.
  3. Explain the why. The same guide marks "Your response will be read aloud by a text-to-speech engine, so never use ellipses" as more effective than "NEVER use ellipses." Reasons let the model generalize the rule.
  4. Show, do not only tell. Google's prompting strategies guide says "We recommend to always include few-shot examples in your prompts," and that clear examples can replace some instructions. Vary them so the model copies the pattern, not one surface detail.
  5. Separate instructions from material. OpenAI's prompt engineering guide recommends Markdown headers and XML tags to mark "logical boundaries" between instructions and context data.
  6. Order long prompts carefully. Put documents at the top and the question at the end. Anthropic reports that queries at the end can improve response quality by up to 30% on complex multi-document inputs.
  7. Test, then pin. Run the prompt on at least 10 real inputs, score each against your pass rules and fix the worst failure first. OpenAI recommends pinning production apps to specific model snapshots, because different snapshots "could produce different results."

Google's Gemini prompting guide, checked 17 October 2026, recommends always including few-shot examples and says prompts without them are likely to be less effective.

Where the techniques came from

Two research papers explain why examples and step-by-step reasoning help.

  • Few-shot prompting. The GPT-3 paper (Brown and colleagues, 2020) showed a 175 billion parameter model could perform new tasks from demonstrations "specified purely via text interaction," with no fine-tuning.
  • Chain-of-thought prompting. Wei and colleagues (2022) found that giving a 540B-parameter model just eight worked examples with reasoning steps reached state-of-the-art accuracy on the GSM8K math benchmark at the time.

Many current models now reason internally. Claude Sonnet 5.5, GPT-6.1 Sol and Gemini 3.8 Flash all expose an effort or thinking setting, so on those models you usually raise the setting rather than write "think step by step." Ask for the reasoning in the output only when you need to audit it.

Worked example: a customer reply

Before:

Write a reply to this customer complaint.

The model has to guess the tone, the policy, the length and what the company can offer.

After:

You are drafting an email reply for a support agent at an online furniture store. The agent will edit and send it.

Goal: acknowledge the problem, state what we will do, and give one clear next step.

Policy: damaged items qualify for a free replacement or a full refund within 30 days of delivery. We cannot offer extra discounts.

Format: under 120 words, plain text, no bullet points, sign off as "The Support Team".

Why: customers read these on phones, and long replies get escalated.

Example input: "My lamp arrived with a cracked base." Example output: "Thank you for letting us know, and sorry your lamp arrived damaged. You can choose a free replacement or a full refund. Reply with your choice and a photo of the base, and we will arrange it today. The Support Team"

Customer email: <email>{customer_text}</email>

Write the reply.

Testing it: run 12 real complaints, including one outside the 30-day window and one asking for a discount. Pass rules: policy stated correctly, under 120 words, one next step. If the out-of-window case fails, add an example that shows the right refusal. To check claims in any factual answer, use our guide to verifying AI citations.

Common mistakes

MISTAKEVague goals.IN PRACTICE"Make it better" gives the model nothing to aim at.
MISTAKERules without reasons.IN PRACTICEBare capital-letter commands generalize poorly compared with a one-line explanation.
MISTAKEOne example only.IN PRACTICEA single example invites copying its length and wording; use two to five varied ones.
MISTAKEMixing data and instructions.IN PRACTICEUntagged pasted text can be read as new instructions.
MISTAKETesting on one input.IN PRACTICEA prompt that works once can fail on the fifth case.
MISTAKEChanging model without retesting.IN PRACTICEA new model version can change results; rerun your test set.
MISTAKEOverloading one prompt.IN PRACTICESplit long jobs into steps such as extract, then draft, then check.

If you are writing prompts for video models rather than chat assistants, read our AI video prompts guide. To prompt a chatbot to rewrite a draft in your own voice, see our ChatGPT humanizer prompts guide.

How we researched this

We read OpenAI's prompt engineering guide, Anthropic's prompt engineering overview and prompting best practices, Google's Gemini prompting strategies, and the GPT-3 and chain-of-thought papers on 17 October 2026. The checklist combines points the vendors document; the worked example is our illustration of those points. For choosing a model to prompt, see our AI chatbots ranking and the ChatGPT vs Claude comparison. If prompting is becoming your job, read the prompt engineer career guide, and for long documents, context windows explained.

Frequently asked questions

What is the most important part of a prompt? A clear goal with a testable definition of success. Without it, you cannot tell whether a change helped.

How many examples should a prompt include? Usually two to five varied examples. Google recommends always including few-shot examples, and variety stops the model copying one example's quirks.

Should I still write "think step by step"? Rarely on current reasoning models. Raise the model's effort or thinking setting instead, and ask for visible reasoning only when you need to check it.

Do prompts work the same across ChatGPT, Claude and Gemini? The core techniques transfer, but details differ. OpenAI notes even different snapshots of one model can respond differently, so retest when you switch.

Is it better to use capital letters for important rules? Explaining the reason usually works better. Anthropic's guide labels a rule with its reason as more effective than a bare "NEVER" instruction.

Where should the question go in a long prompt? At the end, after the documents. Anthropic and Google both recommend this order for long inputs.

How do I know if my prompt is good enough? Run it on 10 or more real cases and count passes against rules you wrote first. Fix the most common failure, then rerun.

REVIEW NOTEReviewed 2 December 2026 against the prompt engineering guides published by OpenAI, Anthropic and Google, and the research papers behind few-shot and chain-of-thought prompting.

Sources

[1] prompt engineering overview · platform.claude.com
[2] prompting best practices · platform.claude.com
[3] prompting strategies guide · ai.google.dev
[4] prompt engineering guide · developers.openai.com
[5] GPT-3 paper · arxiv.org
[6] Wei and colleagues · arxiv.org