Prompt Academy 36 min read Last updated 30 sources

The Complete Guide to Writing Great Prompts

A practical, research-backed guide to writing prompts that work: structure, clarity, examples, reasoning, output formats, chaining, grounding, evaluation, safety, and worked before-and-after examples.

On this page
  1. 1. What a prompt is (and is not)
  2. 2. The anatomy of a strong prompt
  3. Try these prompts: building blocks
  4. 3. Clarity and specificity
  5. Try these prompts: clarity and constraints
  6. 4. Delimiters and structure
  7. Where to put things in a long prompt
  8. Try these prompts: long documents and structure
  9. 5. Step-by-step prompting, reasoning, and when not to use it
  10. Try these prompts: reasoning and decomposition
  11. 6. System messages versus user messages
  12. Try these prompts: system prompts and custom instructions
  13. 7. Examples: zero-shot, one-shot, few-shot
  14. Try these prompts: examples and style matching
  15. 8. Controlling the output: tables, JSON, Markdown, length
  16. Try these prompts: output formats
  17. 9. Iteration and refinement loops
  18. Try these prompts: iteration and critique
  19. 10. Prompt chaining and decomposition
  20. Try these prompts: chaining and workflows
  21. 11. Grounding: using sources you paste, and handling uncertainty
  22. Try these prompts: grounding and uncertainty
  23. 12. Evaluating prompts: rubrics, test sets, and regression checks
  24. Try these prompts: evaluation
  25. 13. A map of prompt patterns
  26. Try these prompts: patterns by task
  27. 14. Model differences: why one prompt does not fit all
  28. 15. Safety, privacy, and trust
  29. Try these prompts: safety and governance
  30. 16. Templates and worked before/after examples
  31. Template 1: general-purpose
  32. Template 2: analyse a document
  33. Template 3: interview first
  34. Before and after 1: a vague request
  35. Before and after 2: a messy analysis request
  36. Before and after 3: a risky factual request
  37. Try these prompts: general templates
  38. 17. Common mistakes
  39. 18. Checklist before you press send
  40. 19. Quick-start cheat sheet
  41. 20. Glossary
  42. Where to go next
  43. Sources

TL;DR

  • A good prompt tells the model who it is working for, what to do, what to use, what limits apply, what the answer should look like, and how you will judge it.
  • Be specific, put the task first, separate instructions from pasted material, show one or two examples, and say what to do when the answer is not in the material.
  • Treat the first answer as a draft. Iterate: change one thing, compare, keep what works.
  • Ask for step-by-step reasoning on non-reasoning models when a task is multi-step. Do not bolt it onto reasoning models; check your model's own documentation.
  • For anything important, ground the answer in text you provide, ask for quotes or citations, and verify the result yourself.
  • Never paste passwords, keys, or other people's private data into a prompt you would not want stored.

Last checked against the sources below on 2026-10-17. Model behaviour changes quickly, so treat model-specific advice as "as of" that date.

1. What a prompt is (and is not) #

A prompt is everything you give a model before it answers: your instruction, any pasted text, examples, rules, and in chat tools the earlier conversation. Language models work by producing the most plausible continuation of what they are given. Microsoft's documentation makes this point directly: the model is not running a separate question-answering routine, it is continuing text in a way that fits the input, and a question tends to be followed by an answer simply because that is what usually follows [14].

Three consequences matter for everyday writing:

  1. The model cannot see what is in your head. Anything you leave out, it fills with a typical guess. Vague in, generic out.
  2. Wording, order and format all steer the result. Small changes can change answers, and what works on one model may not on another [14][24].
  3. A prompt is a draft of a specification. Anthropic's guidance starts from the idea that you should know what success looks like and have a way to test it before you tune wording [1].

A useful mental picture from Anthropic: treat the model like a capable new colleague who knows nothing about your situation. If a person with no background would be confused by your message, the model probably will be too [2].

Prompt versus other things people confuse it with

TermWhat it isTypical use
PromptThe input you send for one taskChat and API calls
System / developer messageStanding rules set by the app builder or by you in settingsPersona, boundaries, format
Custom instructionsStanding preferences saved in a chat productTone, audience, defaults
Prompt templateA prompt with blanks to fill inRepeated tasks
Agent instructionsA prompt plus tools and a loopMulti-step work (see the Agents guide)

2. The anatomy of a strong prompt #

Vendors describe the same building blocks under different names. Microsoft lists instructions, primary content, examples, cues, and supporting content [14]. Microsoft Copilot's own guidance uses goal, context, source, and expectations, and says only the goal is required [15]. OpenAI suggests an order of identity, instructions, examples, then context [8]. Combining these gives seven parts you can use as a checklist:

PartQuestion it answersExample
Role / audienceWho is this for, and from whose viewpoint?"I run a three-person bakery. Write for busy local customers."
ContextWhat background changes the answer?"We raised prices 8 percent in March."
TaskWhat exactly should be done?"Draft a short email explaining the change."
ConstraintsWhat limits apply?"Under 120 words, no apology, no discount offer."
FormatWhat shape should the output take?"Subject line, then two short paragraphs."
ExamplesWhat does good look like?One past email you liked, in a labelled block
Success criteriaHow will you judge it?"A customer should know the new price and the date in 10 seconds."

You do not need every part every time. A quick question may need only a task. A reusable workplace prompt usually benefits from all seven.

text
ROLE AND AUDIENCE
I run a three-person bakery. The reader is a regular customer.

CONTEXT
Prices rise 8 percent on 1 April because of flour costs.

TASK
Write a customer email announcing the change.

CONSTRAINTS
Under 120 words. Plain, warm tone. Do not apologise or offer discounts.

FORMAT
A subject line, then two short paragraphs.

SUCCESS CRITERIA
A reader knows what changes, when, and why after one read.

The role line deserves a note. Role prompts such as "you are a tax accountant" can help set tone and focus, but current guidance from Anthropic says heavy role-play is less necessary than clear context about the task and audience [3]. Prefer "who is the reader and what do they need" over a grand job title.

Try these prompts: building blocks #

  • create-ai-prompt-writing-0001: Vague Request to Strong Prompt Rewrite
  • create-ai-prompt-writing-0002: Make the AI Ask Questions First
  • create-ai-prompt-writing-0003: Role Context Task Format Prompt Builder
  • create-ai-prompt-writing-0006: Output Format Specification Writer
  • create-ai-prompt-writing-0007: Constraint Writer for Length Tone and Banned Phrases
  • create-ai-prompt-writing-0008: When to Use a Role in a Prompt Decision Tree
  • create-ai-prompt-writing-0017: Negative Instructions to Positive Instructions Rewrite
  • create-ai-custom-instructions-assistants-0011: Reusable Prompt Template System With Variables
  • create-ai-custom-instructions-assistants-0001: Custom Instructions for a Writing Assistant
  • create-ai-prompt-patterns-by-task-0011: Constraint-Led Writing: Word Caps and Format Rules

3. Clarity and specificity #

Almost every vendor guide opens with the same advice: say exactly what you want [2][3][8][13][14]. Practical ways to do it:

  • Name the deliverable. "A one-page brief" beats "help with the project."
  • State the purpose. Explaining why a rule exists lets the model apply it sensibly. Anthropic's example: a text-to-speech app should avoid ellipses because the engine cannot pronounce them, which generalises better than a bare "never use ellipses" [2].
  • Say what to do, not only what to avoid. Positive instructions tend to be easier to follow than lists of prohibitions [3].
  • Give numbers. Length, count of options, reading level, deadline.
  • Define loose words. "Professional," "short," "simple" mean different things to different people. Replace them with an example or a measure.
  • Order the steps with a numbered list when sequence matters [2].
  • Do not shout. Capital letters and threats can make some models rigid and over-literal [10].
VagueSpecific
"Summarise this.""Summarise this meeting transcript in 5 bullets for a manager who missed it. Put decisions first, then open questions."
"Make it better.""Edit for clarity: cut 20 percent of the words, keep my numbers, keep the first-person voice."
"Ideas for a talk.""Give 8 titles for a 20-minute talk to school governors on data privacy, each under 10 words, mixing practical and provocative."

Try these prompts: clarity and constraints #

  • create-ai-prompt-writing-0001: Vague Request to Strong Prompt Rewrite
  • create-ai-prompt-writing-0007: Constraint Writer for Length Tone and Banned Phrases
  • create-ai-prompt-writing-0009: Summarization Prompt With Audience and Length Control
  • create-ai-prompt-writing-0017: Negative Instructions to Positive Instructions Rewrite
  • create-ai-prompt-patterns-by-task-0001: Plain-Language Rewrite With a Banned-Phrase List
  • create-ai-prompt-patterns-by-task-0004: Turn Rough Notes Into a Clean Draft Without Adding Facts
  • create-ai-prompt-patterns-by-task-0011: Constraint-Led Writing: Word Caps and Format Rules
  • create-ai-prompt-patterns-by-task-0012: Critique My Draft Without Flattery
  • create-ai-prompt-patterns-by-task-0002: ELI5 Explainer With a Check Question
  • create-ai-prompt-patterns-by-task-0005: Jargonize and De-Jargonize Pair

4. Delimiters and structure #

When a prompt mixes instructions with pasted material, mark where each begins and ends. Microsoft recommends clear syntax such as separators and headings, and notes that models have seen a lot of Markdown and XML [14]. OpenAI advises Markdown headings and lists for sections and XML-style tags to wrap supplied data [8]. Google's Gemini guidance says to pick consistent delimiters and stick to one style [13].

text
Summarise the email thread below for a busy manager.

<thread>
...pasted emails...
</thread>

Return: 3 bullets of what happened, 1 line on what I must decide.

Rules of thumb:

  • Use one delimiter style per prompt.
  • Label each pasted block (<contract>, <notes>, <style_sample>).
  • Wrap examples separately from data so the model does not mistake them for the input.
  • With multiple documents, give each a name or number so you can ask for references later.

Where to put things in a long prompt #

For long inputs, order matters. Anthropic recommends putting long documents first and your question or instructions at the end, reporting better results in its tests [2]. Google's Gemini 3 guidance says the same thing: supply all the context first, then the question [13]. OpenAI's older GPT-4.1 guide suggests repeating key instructions before and after long material, and putting them above if you can only do one [10]. Research on long inputs found that models use information at the start and end more reliably than the middle [19], and Microsoft notes recency bias, where text near the end can weigh more [14]. Practical takeaway: keep critical instructions near an edge, and repeat a one-line reminder at the end of long prompts.

Try these prompts: long documents and structure #

  • create-ai-prompt-writing-0018: Long Document Prompt Layout
  • create-ai-prompt-writing-0010: Information Extraction From Messy Text Prompt
  • create-ai-prompt-writing-0009: Summarization Prompt With Audience and Length Control
  • create-ai-prompt-writing-0006: Output Format Specification Writer
  • create-ai-prompt-patterns-by-task-0003: TL;DR Summary With Key Decisions and Open Questions
  • create-ai-prompt-patterns-by-task-0004: Turn Rough Notes Into a Clean Draft Without Adding Facts
  • create-ai-prompt-testing-improvement-0009: Prompt Compression Before and After
  • create-ai-custom-instructions-assistants-0004: Knowledge Base Answer-Only-From-Sources Instructions

5. Step-by-step prompting, reasoning, and when not to use it #

What the research found. In 2022, Google researchers showed that giving worked examples with intermediate steps ("chain-of-thought") improved large models on arithmetic and reasoning tasks [16]. Another team found that even a plain "think step by step" cue helped without any examples [18]. Follow-up ideas include sampling several reasoning paths and keeping the most common answer [17], and splitting a hard problem into easier sub-questions answered in order [22].

Why it matters less now. Many current models do their own reasoning before replying. OpenAI's reasoning guide advises keeping prompts short and not asking for step-by-step explanations, because the model reasons internally and the request can add nothing or even hurt [9]. Microsoft's page likewise warns that its step-by-step techniques are not recommended for reasoning models [14]. For non-reasoning models, OpenAI says step-by-step prompting can still improve results at the cost of more words and delay [10].

SituationUse step-by-step wording?Better move
Multi-step arithmetic or logic on a standard chat modelYes"Work through this in numbered steps, then give the final answer on its own line."
Same task on a model that has a built-in reasoning modeUsually noState constraints and success criteria; turn on reasoning if the product has the option
Simple lookup, rewrite, or classificationNoDirect instruction; extra reasoning wastes time
You need to audit the logicYesAsk for the assumptions and checks, not a stream of thoughts
Hard task, wrong answers keep appearingMaybeDecompose into sub-steps or chain prompts (section 10)

Two cautions. First, written reasoning can sound confident and still be wrong [24]. Second, some providers do not want users extracting hidden reasoning by prompt tricks; Microsoft's page says to use the supported reasoning-summary option instead [14]. Ask for justification of the answer (evidence, assumptions, checks), which is useful to you either way.

text
Task: decide which of the three suppliers is cheapest over 2 years.
Steps: (1) list each supplier's yearly cost, (2) add setup fees,
(3) total for 24 months, (4) state the cheapest and the margin.
Show the arithmetic in a table, then the answer in one sentence.

Try these prompts: reasoning and decomposition #

  • create-ai-prompt-patterns-by-task-0007: Step-by-Step Reasoning Request With Visible Checks
  • create-ai-prompt-writing-0005: Prompt Chain Planner for Complex Tasks
  • create-ai-prompt-writing-0013: Analysis Prompt That Requires Evidence
  • create-ai-prompt-writing-0016: Prompts That Cite Sources and Admit Uncertainty
  • create-ai-prompt-testing-improvement-0008: Consistency Check Across Repeated Runs
  • create-ai-prompt-patterns-by-task-0012: Critique My Draft Without Flattery
  • create-ai-workflow-design-0002: Choose Between a Script, a No-Code Flow and an AI Agent
  • create-ai-agent-prompts-tools-0007: Planner and Executor Prompt Pair
  • create-ai-agent-prompts-tools-0019: Planner and Executor Prompts for a Multi-Step Task

6. System messages versus user messages #

In an API or a configurable assistant, instructions are split into layers. OpenAI describes developer messages as the application's rules and user messages as the inputs, a bit like a function definition and its arguments, and says developer messages take priority [8]. Microsoft describes the system message as the place for persona and rules, with few-shot examples added as example user and assistant turns [14].

In everyday chat tools the same idea appears as custom instructions, projects, or assistants. Put things there that stay true across tasks and keep the task-specific part in the message.

Put in the standing instructionsPut in each message
Who you are and who you write forThe specific task
Tone, reading level, spelling variantThe pasted material
Things never to do (privacy, tone)The deadline and length for this piece
Default output formatAny one-off example

Keep standing instructions short and test them; contradictory standing rules are a common cause of strange answers. Anthropic suggests moving persistent guidance into configuration files or skills rather than repeating it in every prompt [3].

Try these prompts: system prompts and custom instructions #

  • create-ai-custom-instructions-assistants-0001: Custom Instructions for a Writing Assistant
  • create-ai-custom-instructions-assistants-0002: Customer Support Assistant System Prompt With Guardrails
  • create-ai-custom-instructions-assistants-0003: Assistant Persona Guide and Boundaries
  • create-ai-custom-instructions-assistants-0004: Knowledge Base Answer-Only-From-Sources Instructions
  • create-ai-custom-instructions-assistants-0009: Escalation and Refusal Rules for an Assistant
  • create-ai-custom-instructions-assistants-0012: Company AI Output Style Guide
  • create-ai-custom-instructions-assistants-0013: Assistant Memory and Privacy Rules
  • create-ai-agent-prompts-tools-0001: System Prompt for a Single-Purpose Assistant
  • create-ai-agent-prompts-tools-0023: Persona and Boundary Prompt for a Customer-Facing Assistant
  • create-ai-custom-instructions-assistants-0005: Socratic Tutor Assistant Instructions

7. Examples: zero-shot, one-shot, few-shot #

A prompt with no examples is zero-shot. Adding one or more input-and-output pairs is one-shot or few-shot. The examples do not retrain the model; they condition the current response [14]. Anthropic calls examples one of the most reliable ways to steer format, tone, and structure and recommends relevant, varied, clearly labelled ones, with three to five for best results on harder cases [2]. Google adds two cautions: keep formatting consistent across examples, and avoid so many that the model copies them too closely [13]. Research on prompting also finds that which examples you choose and their order can swing results [24].

Design rules

  1. Use real or realistic examples of your task.
  2. Make them different from each other (short and long, easy and awkward) so the model does not learn a quirk.
  3. Show the exact output format you want, including punctuation.
  4. Label them, and mark where your real input starts.
  5. Include one edge case, such as "not enough information," if that is a legal answer.
  6. If outputs come back too similar to the examples, change or remove one.
text
Classify each support message as BILLING, BUG, or OTHER. Reply with the label only.

<example>
Message: "I was charged twice in May."
Label: BILLING
</example>
<example>
Message: "The export button does nothing on Safari."
Label: BUG
</example>
<example>
Message: "Do you have a student discount?"
Label: OTHER
</example>

Message: "{{message}}"
Label:

For reasoning models, OpenAI suggests trying without examples first and adding a few only if needed [9].

Try these prompts: examples and style matching #

  • create-ai-prompt-writing-0004: Few-Shot Example Designer for a Classification Task
  • create-ai-prompt-writing-0011: Rewrite in a Target Voice With Examples Prompt
  • create-ai-prompt-patterns-by-task-0010: Few-Shot Style Matching From My Samples
  • create-ai-prompt-patterns-by-task-0004: Turn Rough Notes Into a Clean Draft Without Adding Facts
  • create-ai-prompt-patterns-by-task-0001: Plain-Language Rewrite With a Banned-Phrase List
  • create-ai-prompt-writing-0010: Information Extraction From Messy Text Prompt
  • create-ai-prompt-testing-improvement-0002: Prompt Test Set Builder
  • create-ai-evaluation-testing-0015: Golden Examples Set: Collecting and Maintaining Reference Answers

8. Controlling the output: tables, JSON, Markdown, length #

Say the format explicitly and, when machines will read the output, show the exact shape. Microsoft suggests asking for output in a defined structure and notes that tables are an efficient way to hand data to a model [14]. Google lists format, length, and structure among the main levers [13]. A short opening phrase that begins the answer in the right form (a "cue") also helps; Microsoft calls this priming the output [14].

FormatAsk like thisWatch for
Bullets"5 bullets, each under 15 words"Fragments that lose meaning
Table"Columns: option, cost, risk, next step"Missing cells; ask to mark unknown as "n/a"
Markdown"Use H2 headings and short paragraphs"Chat apps may render differently
JSON"Return valid JSON with keys a, b, c and nothing else"Extra prose around the JSON; invented keys
Email / memo"Subject line, 3 short paragraphs, sign-off"Filler openers
Word count"About 150 words"Models approximate counts; check

For software, prefer features that enforce structure. OpenAI's Structured Outputs constrain a reply to a JSON Schema you supply, whereas basic JSON mode only guarantees well-formed JSON, not that your keys are present [11]. In a chat window you cannot enforce a schema, so state it and validate the result.

text
Extract the invoice details as JSON with exactly these keys:
vendor (string), date (YYYY-MM-DD), total (number), currency (3 letters).
If a value is missing, use null. Return only the JSON.

Try these prompts: output formats #

  • create-ai-prompt-writing-0006: Output Format Specification Writer
  • create-ai-prompt-writing-0010: Information Extraction From Messy Text Prompt
  • create-ai-prompt-writing-0009: Summarization Prompt With Audience and Length Control
  • create-ai-agent-prompts-tools-0024: Output Format Contracts: Make Agent Responses Machine-Safe
  • create-ai-prompt-patterns-by-task-0003: TL;DR Summary With Key Decisions and Open Questions
  • create-ai-prompt-patterns-by-task-0011: Constraint-Led Writing: Word Caps and Format Rules
  • create-ai-custom-instructions-assistants-0012: Company AI Output Style Guide
  • create-ai-prompt-writing-0014: Code Generation Prompt With Tests

9. Iteration and refinement loops #

Every guide treats prompting as iterative [13][2]. A simple loop:

  1. Write a first prompt with task, context, and format.
  2. Run it on two or three realistic inputs, not just your favourite.
  3. Look for the specific gap (too long, wrong tone, missing step, invented fact).
  4. Change one thing and note it.
  5. Compare against the previous version.
  6. Save the version that wins, with a note about what it is good for.

Useful follow-ups in a chat:

  • "Keep what you have, but cut it by a third and put the decision first."
  • "Which of my instructions did you find ambiguous? Ask me about them."
  • "List three weaknesses of this draft, then fix the two most serious."

The last form is a critique loop. A research paper on self-refinement found that having a model draft, critique its own output, and revise improved results by about 20 percentage points on average across tasks in its tests, with no extra training [20]. Anthropic describes the same pattern as the most common chain: draft, review against criteria, refine, with each step logged separately so you can inspect it [2]. Models still miss their own mistakes, so give the critique specific criteria rather than "make it better."

Interview-first is another good loop: "Before you answer, ask me up to five questions that would most change your answer." It surfaces missing context and reduces guessing.

Try these prompts: iteration and critique #

  • create-ai-prompt-writing-0002: Make the AI Ask Questions First
  • create-ai-prompt-testing-improvement-0001: Prompt Debugging Interview
  • create-ai-prompt-testing-improvement-0003: Prompt A/B Comparison Plan
  • create-ai-prompt-testing-improvement-0013: Prompt Version Log and Changelog Template
  • create-ai-prompt-testing-improvement-0016: Skeptical Colleague Prompt Review Role-Play
  • create-ai-prompt-patterns-by-task-0012: Critique My Draft Without Flattery
  • create-ai-prompt-testing-improvement-0009: Prompt Compression Before and After
  • create-ai-prompt-testing-improvement-0006: Prompt Regression Test Checklist
  • create-ai-evaluation-testing-0016: Regression Log for Prompt Changes
  • create-ai-prompt-testing-improvement-0004: Rubric for Grading AI Outputs

10. Prompt chaining and decomposition #

When one prompt tries to do too much, split it. Microsoft observes that models often do better when the task is broken into smaller steps, for example first extracting claims, then generating checks [14]. Google's guide also describes chaining and parallel prompts for complex tasks [13]. Anthropic notes that explicit chaining is still useful when you want to inspect intermediate results or enforce a fixed pipeline, even though newer models handle many multi-step tasks internally [2].

A typical chain for turning a long report into a briefing:

text
Step 1  Extract: list every number and date in the report with its page.
Step 2  Cluster: group the facts into themes; flag anything contradictory.
Step 3  Draft: write a one-page briefing for a non-expert using only the themes.
Step 4  Check: compare the briefing to the Step 1 list; mark unsupported lines.

Why chains help: each step is smaller, so errors are easier to see; you can swap a step; and you can check the output of one step before it feeds the next. The cost is time, and errors can still pass from step to step, so add a check step.

Try these prompts: chaining and workflows #

  • create-ai-prompt-writing-0005: Prompt Chain Planner for Complex Tasks
  • create-ai-workflow-design-0001: Map a Repetitive Task Into an Automation Spec
  • create-ai-workflow-design-0002: Choose Between a Script, a No-Code Flow and an AI Agent
  • create-ai-workflow-design-0004: Meeting-to-Tasks Pipeline
  • create-ai-workflow-design-0007: Content Repurposing Workflow
  • create-ai-workflow-design-0008: Weekly Report Compilation Flow
  • create-ai-agent-prompts-tools-0007: Planner and Executor Prompt Pair
  • create-ai-agent-prompts-tools-0014: Agent Handoff Note Between Two Tools
  • create-ai-workflow-design-0018: Weekly Report Agent: From Raw Updates to a One-Page Summary
  • create-ai-workflow-design-0023: Content Repurposing Agent: One Source, Many Formats

11. Grounding: using sources you paste, and handling uncertainty #

Models can state false things fluently. This is usually called hallucination. You cannot prompt it away completely, and Anthropic's documentation says so plainly, but several habits cut the risk [5]:

  1. Provide the source text and say to answer only from it. Microsoft calls this grounding and notes that the closer your source is to the form of the answer you want, the less the model has to invent [14].
  2. Give an exit. Tell the model what to say when the answer is not there, such as "Not in the document." Both Anthropic and Microsoft recommend giving the model an "out" [5][14].
  3. Quote first. For long documents, ask for relevant word-for-word quotes before the analysis, and base the analysis only on those quotes [5].
  4. Cite inline. Microsoft argues that citations placed beside the claim they support are a stronger guard than citations at the end, because the model must produce a source for each statement as it writes [14].
  5. Verify. Ask the model to find a supporting quote for each claim and remove claims with none [5]; run the question several times and treat disagreement as a warning sign [5]; and check the important facts yourself.
  6. Restrict outside knowledge when you need it: "Use only the attached text, not what you already know" [5].
text
Answer using only the text in <policy>. For each answer, give the exact sentence
you relied on in quotation marks, then your answer. If the policy does not say,
write: "The policy does not say." Do not guess.

<policy>
...paste...
</policy>

Question: Can a part-time employee carry over unused leave?

Remember what grounding cannot do: it does not make the pasted source correct, and it does not stop a model from misreading it. Microsoft's own guidance reminds users to validate outputs even with a well-built prompt [14], and Microsoft Copilot's support page says to check answers against trusted sources [15].

Try these prompts: grounding and uncertainty #

  • create-ai-prompt-writing-0016: Prompts That Cite Sources and Admit Uncertainty
  • create-ai-custom-instructions-assistants-0004: Knowledge Base Answer-Only-From-Sources Instructions
  • create-ai-custom-instructions-assistants-0008: Research Assistant Instructions With Citations
  • create-ai-evaluation-testing-0004: Hallucination Check for Summaries
  • create-ai-prompt-testing-improvement-0007: Hallucination Reduction Checklist for a Prompt
  • create-ai-prompt-testing-improvement-0012: Summary Faithfulness Evaluation
  • create-ai-agent-prompts-tools-0003: Research Agent Instructions With Source Rules
  • create-ai-agent-prompts-tools-0020: Retrieval Instructions: How an Agent Should Use Search Results
  • create-ai-prompt-writing-0013: Analysis Prompt That Requires Evidence
  • create-ai-prompt-testing-improvement-0008: Consistency Check Across Repeated Runs

12. Evaluating prompts: rubrics, test sets, and regression checks #

If you reuse a prompt, test it. Anthropic and OpenAI both say to define success first, then build evaluations from realistic inputs [4][12]. Good success criteria are specific and measurable ("at least 9 of 10 summaries include the deadline"), not "good" [4].

A minimal evaluation kit

  1. Test set: 10 to 30 real inputs including easy, awkward and adversarial ones [12].
  2. Rubric: 4 to 6 criteria scored 1 to 5 (accuracy, completeness, tone, format, safety), each with a one-line description.
  3. Pass line: what score counts as good enough.
  4. Run log: prompt version, date, model, scores, notes.
  5. Regression check: re-run the test set whenever you change the prompt or the model [8][12].

OpenAI recommends pinning production use to specific model snapshots and using tests to catch behaviour changes [8]. Hamel Husain describes three levels of checking: cheap assertions, human review of logged outputs, and A/B tests, and stresses reading real outputs rather than relying on spot-checks [28]. If you use another model as a judge, compare it to human ratings and watch for bias toward longer answers [12].

MethodGood forWeak at
Exact-match checksLabels, extraction, formatsOpen writing
Rubric by a humanQuality, toneCost, consistency
Model-graded rubricScaleNeeds calibration against humans [12]
Repeat-run comparisonSpotting instability [5]Does not prove correctness

Try these prompts: evaluation #

  • create-ai-evaluation-rubrics-0001: Rubric Builder for Any Written Deliverable
  • create-ai-evaluation-rubrics-0002: Rubric for Chatbot Reply Quality
  • create-ai-prompt-testing-improvement-0002: Prompt Test Set Builder
  • create-ai-prompt-testing-improvement-0003: Prompt A/B Comparison Plan
  • create-ai-prompt-testing-improvement-0004: Rubric for Grading AI Outputs
  • create-ai-prompt-testing-improvement-0006: Prompt Regression Test Checklist
  • create-ai-prompt-testing-improvement-0013: Prompt Version Log and Changelog Template
  • create-ai-prompt-testing-improvement-0014: Adversarial Input Generator for Testing
  • create-ai-evaluation-testing-0003: Regression Check Before Changing a Prompt
  • create-ai-evaluation-testing-0009: Compare Two Models on My Own Tasks
  • create-ai-evaluation-testing-0015: Golden Examples Set: Collecting and Maintaining Reference Answers
  • audit-ai-evaluation-0002: Prompt Change Impact Audit: Before and After Comparison

13. A map of prompt patterns #

Researchers have catalogued dozens of prompting techniques and tried to standardise the vocabulary [21]. For everyday use, a dozen patterns cover most needs.

PatternWhat it doesPrompt skeleton
InstructionDirect request"Do X for Y in format Z."
Role / audienceSets viewpoint and register"Write as a school bursar to parents."
Zero-shotNo examplesPlain instruction
Few-shotShows the patternTwo or three labelled examples, then the new input
Structured outputFixed fields"Return JSON with keys..."
Critique / self-reviewDraft, then improve"List 3 flaws, then fix them."
Interview-firstMissing context"Ask me up to five questions before answering."
DecompositionBreak the task"First list the sub-questions; then answer each."
TransformationChange form, keep content"Turn these notes into an agenda. Add no new facts."
ComparisonWeigh options"Compare A, B, C on cost, risk, effort in a table."
BrainstormingGenerate range"10 options, at least 3 unusual, each in one line."
AnalysisFind patterns, causes"Identify the three biggest drivers; cite evidence from the data."
PlanningOrder actions"Build a 4-week plan with weekly goals and risks."
Red team / devil's advocateTest an idea"Argue against this plan as a sceptical finance director."

Combine them. A strong analysis prompt is often role + structured output + evidence requirement + exit for uncertainty.

Try these prompts: patterns by task #

  • create-ai-prompt-patterns-by-task-0001: Plain-Language Rewrite With a Banned-Phrase List
  • create-ai-prompt-patterns-by-task-0002: ELI5 Explainer With a Check Question
  • create-ai-prompt-patterns-by-task-0003: TL;DR Summary With Key Decisions and Open Questions
  • create-ai-prompt-patterns-by-task-0004: Turn Rough Notes Into a Clean Draft Without Adding Facts
  • create-ai-prompt-patterns-by-task-0005: Jargonize and De-Jargonize Pair
  • create-ai-prompt-patterns-by-task-0007: Step-by-Step Reasoning Request With Visible Checks
  • create-ai-prompt-patterns-by-task-0009: Role-Play a Difficult Stakeholder for Practice
  • create-ai-prompt-patterns-by-task-0010: Few-Shot Style Matching From My Samples
  • create-ai-prompt-patterns-by-task-0011: Constraint-Led Writing: Word Caps and Format Rules
  • create-ai-prompt-patterns-by-task-0012: Critique My Draft Without Flattery
  • create-ai-prompt-writing-0012: Brainstorming Prompt With Constraints
  • create-ai-prompt-writing-0013: Analysis Prompt That Requires Evidence
  • create-ai-prompt-writing-0009: Summarization Prompt With Audience and Length Control

14. Model differences: why one prompt does not fit all #

Vendors say plainly that behaviour varies by model [14][24]. As of 2026-10-17, the official documents I read point to these differences:

  • Reasoning versus standard models. OpenAI says reasoning models do well with high-level goals and short prompts, while smaller or non-reasoning GPT models are faster and cheaper but need more explicit instructions [8][9]. Microsoft says its older step-by-step techniques are not recommended for reasoning models [14].
  • Literalness. OpenAI's GPT-4.1 guide describes a model that follows instructions literally and rewards a clear, firm sentence over repeated shouting [10]. Anthropic reports that its models respond to explicit instructions and that "go beyond" behaviour must be asked for [2].
  • Structure preferences. OpenAI found Markdown a good default for structuring prompts and XML also strong, while JSON did poorly for large document sets in its tests [10]. Anthropic recommends XML-style tags for separating content types, though its newer blog notes they are often unnecessary on modern models [2][3]. Google suggests any consistent delimiter [13].
  • Settings. Temperature and similar settings alter randomness. Microsoft advises changing one at a time, and Google's page says to keep temperature settings at their defaults for some Gemini 3 models [13][14]; read your model's page for the current recommendation.
  • Product wrappers. A chat product may add its own hidden instructions, memory, and tools, so the same text can behave differently in the app than through an API.

Portable habit: keep a "core" prompt with task, context, constraints, format; add a small model-specific tail if tests show a need. [VERIFY] model names and features on the vendor's page on the day you read this; they change often.

15. Safety, privacy, and trust #

Do not paste secrets. Passwords, API keys, one-time codes, full card numbers, and other people's sensitive data do not belong in a prompt unless your organisation has approved the tool for that purpose. Check the product's data settings and the provider's privacy policy; settings differ by product and plan and change over time. [VERIFY] before relying on any retention claim.

Redact first. Replace names, account numbers, and addresses with placeholders such as [CLIENT_A], then restore them yourself.

Treat pasted content as untrusted. If you paste an email, web page, or file, hidden text inside it can try to give the model new instructions. This is called prompt injection. OWASP lists it as a top risk, says there is no foolproof prevention, and recommends least privilege, labelling untrusted content, validating outputs, and human approval before risky actions [26]. Simon Willison's explanation stresses that the danger rises sharply once a model can act through tools, such as sending email [27].

Verify before you rely. For legal, medical, financial, or safety decisions, use the output as a draft for a qualified person to review. NIST's AI Risk Management Framework frames this as an ongoing risk process (govern, map, measure, manage) rather than a one-time check [30].

Disclose where required. Some workplaces, publishers, and schools require you to say when AI helped. Check the rules where you work.

Try these prompts: safety and governance #

  • create-ai-governance-safety-0004: Data Handling Rules for Prompts
  • create-ai-governance-safety-0001: AI Use Policy for a Small Team
  • create-ai-governance-safety-0016: Data Handling Rules for Assistants: What Goes In, What Stays Out
  • create-ai-governance-safety-0005: Model Output Disclosure Wording
  • create-ai-prompt-testing-improvement-0010: Prompt Injection Risk Review
  • create-ai-evaluation-testing-0005: Prompt Injection Test Cases for My Assistant
  • create-ai-prompt-testing-improvement-0011: Bias and Fairness Check for a Prompt
  • create-ai-custom-instructions-assistants-0015: Safe AI Use Training Outline for Staff
  • create-ai-custom-instructions-assistants-0013: Assistant Memory and Privacy Rules
  • audit-ai-safety-0001: Prompt Injection Exposure Audit for Your Own Assistant (Defensive)
  • audit-ai-safety-0003: Human-in-the-Loop Design Audit: Where Approvals Add Safety and Where They Add Noise
  • create-ai-governance-safety-0003: Human-in-the-Loop Approval Design

16. Templates and worked before/after examples #

Template 1: general-purpose #

text
I am [ROLE/SITUATION]. The reader is [AUDIENCE].
Background: [CONTEXT].
Task: [WHAT TO PRODUCE].
Use only: [SOURCES, or "my notes below"].
Limits: [LENGTH, TONE, THINGS TO AVOID].
Format: [STRUCTURE].
If something is missing or uncertain, say so and ask me; do not guess.

Template 2: analyse a document #

text
<document>
[PASTE]
</document>

Task: identify the 3 main risks to [WHO] in this document.
For each risk: quote the exact sentence, explain it in one plain-English line,
and rate severity high/medium/low with a reason.
If the document does not contain enough to judge, say "insufficient evidence."

Template 3: interview first #

text
I want to [GOAL]. Before you draft anything, ask me up to 5 questions, one at a
time, that would most improve the result. After my answers, produce the draft.

Before and after 1: a vague request #

Before

text
Write something about our new returns policy.

Problems: no audience, no length, no format, no facts.

After

text
I run customer service at an online shoe shop. Write a short notice for our
website explaining the new 30-day returns policy (previously 14 days; items must
be unworn; we pay return postage for faulty items only). Audience: existing
customers. Tone: friendly, plain. Length: under 120 words. Format: a headline
and two short paragraphs. Do not promise anything not listed above.

Before and after 2: a messy analysis request #

Before

text
Look at this feedback and tell me what's wrong.

After

text
Here are 40 customer comments from our survey (below, between <comments> tags).
Group them into themes. For each theme give: a name, the number of comments, two
short example quotes, and one suggested action. Put the themes in a table sorted
by number of comments. If a comment fits two themes, count it once under the main
one. Flag any comment that mentions safety.

Before and after 3: a risky factual request #

Before

text
What does the law say about my deposit?

After

text
I rent a flat in [REGION]. My landlord kept part of my deposit. I am not asking
for legal advice. Please list the questions I should ask a local tenant advice
service or read on my government's official tenancy page, in priority order, and
explain any terms I might not know. Say clearly where rules depend on location,
and do not state specific deadlines or amounts as facts.

Try these prompts: general templates #

  • create-ai-prompt-writing-0001: Vague Request to Strong Prompt Rewrite
  • create-ai-prompt-writing-0003: Role Context Task Format Prompt Builder
  • create-ai-prompt-writing-0002: Make the AI Ask Questions First
  • create-ai-custom-instructions-assistants-0011: Reusable Prompt Template System With Variables
  • create-ai-prompt-patterns-by-task-0004: Turn Rough Notes Into a Clean Draft Without Adding Facts
  • create-ai-prompt-writing-0013: Analysis Prompt That Requires Evidence
  • create-ai-prompt-writing-0009: Summarization Prompt With Audience and Length Control
  • create-ai-prompt-writing-0012: Brainstorming Prompt With Constraints
  • create-ai-prompt-writing-0014: Code Generation Prompt With Tests
  • create-ai-prompt-writing-0015: Image Prompt Builder With Structure

17. Common mistakes #

MistakeWhy it hurtsFix
Asking for "something good"No standard to aim atState audience, purpose, format, success test
Packing five tasks into one promptQuality drops; hard to debugChain or number the tasks
Mixing data and instructions without markersModel may follow text inside the dataUse labelled delimiters
Leaving out the "not found" pathInvites invented answersGive an exit phrase
Copying a prompt that worked on another modelBehaviour differs [14][24]Test on your own model
Telling the model what NOT to do onlyHard to applyAdd the positive version [3]
Shouting in capitalsOver-literal behaviour [10]One clear sentence with the reason
Piling on every techniqueLonger is not better; Anthropic advises starting simple and testing each addition [3]Add one element at a time
Judging by one runOutputs vary [15]Run several; use a test set
Trusting facts and citations blindlyFluent errors [5]Verify against sources
Pasting private dataRetention and exposure riskRedact; check settings
Ignoring the system layerStanding rules conflict with your requestReview custom instructions

18. Checklist before you press send #

  • [ ] Is the task the first or last thing, and stated in one sentence?
  • [ ] Have I said who the reader is and why this matters?
  • [ ] Are length, tone, and format specific?
  • [ ] Is pasted material fenced and labelled?
  • [ ] Did I give an example if format or style matters?
  • [ ] Did I say what to do when the answer is not in the material?
  • [ ] Do I need sources or quotes, and did I ask for them?
  • [ ] Have I removed private or secret data?
  • [ ] Do I know how I will check the answer?
  • [ ] If this is reusable, have I saved it with a version note and a test?

19. Quick-start cheat sheet #

text
1. Goal in one sentence.
2. Audience + purpose.
3. Paste material in <tags>.
4. Limits: length, tone, do/do not.
5. Format: bullets / table / JSON / email.
6. Example if style matters.
7. Exit: "If not in the text, say so."
8. Review: ask for flaws, then revise.
If you need...Try this phrase
Fewer wrong facts"Use only the text below. Quote the sentence you relied on."
Less waffle"Maximum 100 words. Lead with the answer."
Better ideas"Give 10 options, 3 unusual, one line each, then pick 2 and say why."
Stronger drafts"List the 3 biggest weaknesses of this draft, then rewrite fixing them."
Clearer thinking"State your assumptions first, then give the answer."
Missing context found"Ask me up to 5 questions before you start."

20. Glossary #

  • Prompt: the full input the model receives for a task.
  • System / developer message: standing instructions that frame later user messages.
  • Zero-shot / one-shot / few-shot: prompts with no, one, or several examples.
  • Chain-of-thought: prompting that elicits intermediate reasoning steps before an answer.
  • Self-consistency: sampling several reasoning paths and picking the most common answer.
  • Decomposition: splitting a task into smaller sub-tasks.
  • Prompt chaining: running several prompts in sequence, each using the previous output.
  • Delimiter: a marker (tag, heading, fence) separating parts of a prompt.
  • Grounding: supplying source text so the answer rests on it.
  • Hallucination: a confident output that is false or unsupported.
  • Context window: the amount of text a model can consider at once.
  • Token: a chunk of text (part of a word) that models count; limits are in tokens.
  • Temperature: a setting that changes how varied outputs are.
  • Structured output: output that follows a fixed format such as a JSON schema.
  • Eval (evaluation): a repeatable test of output quality against criteria.
  • Rubric: scored criteria for judging an output.
  • Regression test: a re-run of old tests to check that a change did not break something.
  • Prompt injection: hidden or malicious instructions in content that try to override your intent.
  • Context engineering: deciding everything that enters the model's context, not just the prompt wording [6].
  • Agent: a model that plans and uses tools in a loop (see the Agents guide).

Where to go next #

  • Hands-on practice: Anthropic's nine-chapter interactive tutorial walks through structure, clarity, roles, separating data, formats, step-by-step reasoning, examples and hallucinations with exercises [7]. Its authors note it was written for older models, so check current best practices where they differ [1].
  • A short neutral primer on zero-shot, few-shot, and prompt elements is in the DAIR.AI guide [25].
  • One research team proposed 26 phrasing principles and tested them on several models [23]; treat them as ideas to try, not rules.
  • For building products, Eugene Yan groups evals, guardrails, caching and feedback loops as separate patterns [29]; the Agents guide in this Academy continues from there.

Sources #

All sources accessed 2026-10-17. Dates are the publication or "updated" date shown on the page, or "none shown" when the page gave none. Numbers match the bracketed citations above.

  1. Prompt engineering overview. Anthropic. https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/overview (no date shown)
  2. Prompting best practices. Anthropic. https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices (no date shown)
  3. Best practices for prompt engineering for 2026. Anthropic. https://claude.com/blog/best-practices-for-prompt-engineering (2025-11-10)
  4. Define success criteria and build evaluations. Anthropic. https://platform.claude.com/docs/en/test-and-evaluate/develop-tests (no date shown)
  5. Reduce hallucinations. Anthropic. https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/reduce-hallucinations (no date shown)
  6. Effective context engineering for AI agents. Anthropic Engineering. https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents (2025-09-29)
  7. Prompt Engineering Interactive Tutorial. Anthropic (GitHub). https://github.com/anthropics/prompt-eng-interactive-tutorial (no date shown)
  8. Prompt engineering. OpenAI. https://developers.openai.com/api/docs/guides/prompt-engineering (no date shown)
  9. Reasoning best practices. OpenAI. https://developers.openai.com/api/docs/guides/reasoning-best-practices (no date shown)
  10. GPT-4.1 Prompting Guide (archived). OpenAI Cookbook. https://developers.openai.com/cookbook/examples/gpt4-1_prompting_guide (no date shown)
  11. Structured model outputs. OpenAI. https://developers.openai.com/api/docs/guides/structured-outputs (no date shown)
  12. Designing reliable evals for LLM applications. OpenAI. https://developers.openai.com/api/docs/guides/evaluation-best-practices (no date shown)
  13. Prompt design strategies. Google AI for Developers. https://ai.google.dev/gemini-api/docs/prompting-strategies (last updated 2026-10-13)
  14. Prompt engineering techniques. Microsoft Learn. https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/prompt-engineering (updated 2026-06-05)
  15. Get started writing prompts in Microsoft Copilot. Microsoft Support. https://support.microsoft.com/en-us/topic/learn-about-copilot-prompts-f6c3b467-f07c-4db1-ae54-ffac96184dd5 (updated September 2026)
  16. Wei et al. Chain-of-Thought Prompting Elicits Reasoning in Large Language Models. arXiv. https://arxiv.org/abs/2201.11903 (2022; v6 2023)
  17. Wang et al. Self-Consistency Improves Chain of Thought Reasoning in Language Models. arXiv. https://arxiv.org/abs/2203.11171 (2022; rev. 2023)
  18. Kojima et al. Large Language Models are Zero-Shot Reasoners. arXiv. https://arxiv.org/abs/2205.11916 (2022; rev. 2023)
  19. Liu et al. Lost in the Middle: How Language Models Use Long Contexts. arXiv. https://arxiv.org/abs/2307.03172 (2023)
  20. Madaan et al. Self-Refine: Iterative Refinement with Self-Feedback. arXiv. https://arxiv.org/abs/2303.17651 (2023)
  21. Schulhoff et al. The Prompt Report: A Systematic Survey of Prompt Engineering Techniques. arXiv. https://arxiv.org/abs/2406.06608 (2024; v6 2025)
  22. Zhou et al. Least-to-Most Prompting Enables Complex Reasoning in Large Language Models. arXiv. https://arxiv.org/abs/2205.10625 (2022; rev. 2023)
  23. Bsharat et al. Principled Instructions Are All You Need for Questioning LLaMA-1/2, GPT-3.5/4. arXiv. https://arxiv.org/abs/2312.16171 (2023)
  24. Weng, L. Prompt Engineering. Lil'Log. https://lilianweng.github.io/posts/2023-03-15-prompt-engineering/ (2023-03-15)
  25. Basics of Prompting. DAIR.AI Prompt Engineering Guide. https://www.promptingguide.ai/introduction/basics (no date shown)
  26. LLM01:2025 Prompt Injection. OWASP Gen AI Security Project. https://genai.owasp.org/llmrisk/llm01-prompt-injection/ (2025)
  27. Willison, S. Prompt injection: What's the worst that can happen? https://simonwillison.net/2023/Apr/14/worst-that-can-happen/ (2023-04-14)
  28. Husain, H. Your AI Product Needs Evals. https://hamel.dev/blog/posts/evals/ (2024-03-29)
  29. Yan, E. Patterns for Building LLM-based Systems & Products. https://eugeneyan.com/writing/llm-patterns/ (about 2023, no date shown)
  30. AI Risk Management Framework. NIST. https://www.nist.gov/itl/ai-risk-management-framework (released 2023-01-26)

Last updated: 2026-10-17