Tutorials
Prompt Engineering Guide: 5 Patterns That Fix Bad AI Output
Bad AI output is usually a bad prompt in disguise. This prompt engineering guide gives you 5 patterns — a clear job, few-shot examples, structure, step-by-step reasoning, and chaining — drawn from OpenAI, Anthropic, and Google's own guidance.
By AIFreshSignal Team · Published November 4, 2026 · prompt engineering, ChatGPT, Claude, Gemini, tutorial, productivity
Prompt Engineering Guide: 5 Patterns That Fix Bad AI Output
A vague prompt being rewritten into a structured prompt template on a laptop — the 5 patterns from this prompt engineering guide
Most bad AI output is not a model problem. It is a prompt problem: a vague request, no context, no example of what good looks like, and no format to follow. The model fills every gap with an average guess, and the average guess is what you then have to rewrite.
This prompt engineering guide fixes that with 5 patterns. They are not tricks or secret phrases. They are the same habits OpenAI, Anthropic, and Google publish in their own documentation — translated into a workflow anyone using ChatGPT, Claude, or Gemini can run today. Facts below were checked against those official guides in November 2026.
Why prompts fail before the model answers
OpenAI's prompt engineering guide defines the work plainly: writing effective instructions so a model consistently generates content that meets your requirements. It also notes the output is non-deterministic — the same prompt will not always return the same answer — which is why technique matters more than luck.
Google's prompting documentation makes the same point in two parts: a prompt works because of its content and its structure. Content is whether the model has all the information the task needs. Structure is whether it can parse that information — ordering, labels, and delimiters included. Most failed prompts are missing one of the two.
Anthropic gives the simplest test: treat the model like an intern on their first day. Provide clear, explicit instructions with all the necessary detail, then test and iterate like a scientist. The 5 patterns below are that advice, organized.
Pattern 1: Give the job, the context, and the limits
A usable prompt answers four questions before the model has to guess any of them: What is the job? Who is it for? What facts must it use? What does finished look like?
Weak prompt: "Write something about our new service."
Working prompt: "Write a 150-word announcement for existing customers about our Saturday pickup service. Use only these facts: [your list]. Audience: busy parents who already order from us. Tone: warm and direct. End with one clear next step and the pickup address."
Three details do the heavy lifting here:
- Measurable limits beat vague ones. Google's prompt health checklist gives the exact example: replace "write a brief summary" with "write a summary of 3 sentences or less." "Brief," "good," and "professional" are not instructions a model can check itself against.
- Say what to do, not only what to avoid. A positive instruction — the length, format, and ending you want — gives the model a target. A list of don'ts alone leaves it to invent the rest.
- Supply the facts. OpenAI calls adding relevant context to a request a core technique, including proprietary or source material the model was never trained on. If a date, price, or name is not in your prompt, do not be surprised when the model invents one. Give it the source, and tell it to use only that source.
If you already use assistants for everyday work, 10 ChatGPT Workflows That Actually Save You Time covers the setup habits that make a prompt like this reusable instead of a one-off.
Pattern 2: Show, don't tell — few-shot examples
All three official guides agree on this one: examples steer a model more reliably than adjectives. OpenAI calls it few-shot learning — including a handful of input and output examples in the prompt so the model picks up the pattern instead of being fine-tuned for the task. It recommends showing a diverse range of inputs with the outputs you want.
Anthropic makes the same recommendation for Claude, with one addition worth copying: include challenging examples and edge cases, not just the easy ones. The edge case is where your real preference shows — how formal is too formal, what gets cut, what never gets changed.
A practical few-shot block looks like this:
Example 1 — Input: [a rough, real request] / Output: [the version you approved] Example 2 — Input: [a harder or messier request] / Output: [the version you approved] Now do the same for: [today's input]
Two to five good examples are usually enough to lock in format, length, and tone. One example can be copied by accident; a small set shows the pattern underneath it. This is also the fastest fix for the robotic email problem — a real example of your own writing does more than the word "friendly" ever will, as How to Use AI to Write Emails Without Sounding Like a Robot shows in detail.
Pattern 3: Structure the prompt so the model can parse it
When a prompt gets long, its parts start to blur: instructions mixed into source material, source material mixed into examples. Structure is how you stop that.
OpenAI recommends using Markdown formatting and XML tags to help the model understand the logical boundaries of a prompt. Its suggested order for a developer message is a useful template for any long prompt:
| Section | What goes in it | |---|---| | Identity | The role and high-level goal — who the assistant is acting as, and for whom | | Instructions | The rules: what to do, what to never do, and in what order | | Examples | Input/output pairs showing the pattern (Pattern 2) | | Context | The source material, facts, and documents for this specific request — usually near the end |
Google's sample template uses the same idea with labeled blocks for objective, instructions, constraints, context, output format, few-shot examples, and a recap at the end that repeats the key constraints and format. That recap is cheap insurance against the model drifting back to a default shape.
Keep one rule while you structure: check for conflicts. Google's checklist flags conflicting instructions and examples, redundant instructions, and irrelevant instructions as common causes of poor performance. If one line says "be concise" and an example runs four paragraphs, the model has to choose — and it will not always choose the way you wanted.
Pattern 4: Make it reason before it answers
For anything with steps, trade-offs, or a right answer hidden in source material, ask for the reasoning first and the answer second.
Anthropic's first business tip is deliberately simple: Claude often responds more accurately if you tell it to think step by step after the instruction. In its Fortune 500 case study, its engineers went further — telling the model to use a scratchpad to pull relevant quotes first, providing few-shot examples, and directing it to use the workflow its subject-matter experts recommended. Anthropic reports that combination improved the assistant's accuracy by 20%.
Google lists reasoning steps as a standard prompt component — telling the model to explain its reasoning — and adds a verification habit worth stealing: ask the model to verify its sources, review its reasoning, and check its final answer before it finishes.
Use this pattern in the form that fits the task:
- Analysis: "First list the facts from the source that matter. Then weigh them. Then recommend."
- Checking: "Draft the answer, then re-read it against these three criteria and fix anything that fails."
- Math or logic: "Work through it step by step, then give the final answer on its own line."
Do not use it for everything. OpenAI notes reasoning models are generally slower and more expensive than standard models, and a one-line rewrite does not need a page of deliberation. Save step-by-step for work where a wrong step compounds.
Pattern 5: Split the job, then iterate — prompt chaining
The most common overloaded prompt tries to do research, analysis, drafting, and editing in a single pass. Google's checklist is direct about the result: a prompt asking for several distinct actions at once is likely trying to accomplish too much, and the fix is to break the requests into separate prompts.
Anthropic calls that workflow prompt chaining: break a complex task into multiple prompts, one per step, with each new prompt building on the previous prompt and response. A content job chains naturally:
- Extract: "Pull the 5 strongest claims and the evidence for each from this source. Nothing else."
- Outline: "Turn those claims into an outline for [audience], in this order."
- Draft: "Draft section one from the outline, in the voice of this example."
- Edit: "Cut anything not supported by the source in step 1. Keep it under [limit]."
Each step is easy to check, and a mistake in step 1 costs one short prompt instead of a full rewrite. OpenAI recommends building tests and evaluation suites that measure prompt behavior as you iterate and when models change — for everyday use, the lightweight version is keeping the prompt version that worked and changing one thing at a time when it stops working.
This is also how a single idea becomes a week of material without one giant, unreliable prompt — the chaining habit behind AI for Content Creation: How to Repurpose One Idea Into a Week of Content.
A reusable prompt template
Put the 5 patterns together and most tasks fit this shape:
Role and job: You are [role]. Your job is [one specific outcome] for [audience]. Facts — use only these: [your bullets, source text, or document] Examples: [2–5 input/output pairs, including one hard case] Steps: 1) [first step] 2) [second step] 3) [check against the criteria] Format: [length, structure, tone, and how it must end] Do not: invent facts not in the list above. If information is missing, say what is missing instead of guessing.
Save the templates that work. A prompt that produced a good result once is an asset — reuse its structure, swap in new facts, and keep its examples. That library is worth more than any list of clever phrases.
What not to put in a prompt
Good patterns do not make a prompt a safe place for everything. Do not paste passwords, payment details, private customer data, or confidential material from someone else's thread just to give the model more context. The pattern is "supply the facts the task needs" — not your records. Use the tool your organization provides for work material where one exists, and strip names and figures the draft does not need.
Bottom line
This prompt engineering guide comes down to a short discipline: give the job with measurable limits, show examples instead of describing taste, structure the parts so they cannot blur, let the model reason before it answers on hard tasks, and split big jobs into a chain you can check. None of it requires a new tool — because, as all three official guides land on in different words, the model can only be as clear as the instructions you handed it.
AIFreshSignal Daily
Join thousands of readers getting practical AI news every morning.