Techniques
Frameworks decide what goes in a prompt. Techniques decide how it behaves. These are the ones the providers actually document — with a note on which have quietly stopped being useful.
Few-shot examples
Show two to five worked examples instead of describing what you want.
Examples control format, tone and structure more reliably than any adjective. Anthropic recommends three to five, wrapped in tags so the model can tell them apart from instructions, and warns that they must be varied — a set of near-identical examples teaches an accidental pattern. Google builds the same idea into TCREI as the References step. If your output keeps drifting in shape, this is almost always the fix.
Reach for it when: Repeated tasks, house style, structured extraction.
Sources and grounding
Delimiters and tags
Separate instructions, context, examples and data so the model never confuses one for another.
The most common cause of a model "ignoring" an instruction is that the instruction was sitting inside a block of pasted text. Anthropic recommends XML tags and documents that Claude parses them unusually well. Google says XML-style tags or Markdown headings both work for Gemini 3. OpenAI’s current guidance leans on Markdown sections. The principle is identical across all three; only the syntax differs, which is exactly what this site’s builder handles for you.
Reach for it when: Any prompt containing pasted content.
Sources and grounding
System versus user message
Durable rules go in the system message; the actual request goes in the user message.
If you use an API or a custom assistant, this split is free structure. Role, house style, forbidden behaviours and output contracts belong in the system message, where they persist across turns. The specific task and its data belong in the user message. Meta recommends exactly this arrangement for Llama. In a plain chat window you do not get the split — which is why chat prompts have to repeat context that an API prompt states once.
Reach for it when: API use, custom GPTs, agents, any reusable assistant.
Sources and grounding
Structured output
Ask for JSON with named keys — and on an API, enforce it with a schema rather than a request.
Naming the exact keys you expect turns a prose answer into something you can process. In a chat window, spell out the shape and add "return only the JSON, no preamble". Through an API, use the provider’s structured-output or schema feature, which constrains generation instead of merely asking for cooperation. Meta calls the chat-window version "limiting extraneous tokens" and lists it as a named technique, because open models are especially prone to wrapping output in commentary.
Reach for it when: Anything a script, spreadsheet or database will read.
Sources and grounding
Chain of thought
The classic "think step by step" — now largely obsolete on frontier models, and still useful on small ones.
Chain-of-thought prompting was the single biggest technique of the 2022–2024 era. It is now the technique most often applied where it no longer helps. Current frontier models reason internally by default, and a Wharton study found the accuracy gain from asking for step-by-step reasoning on such models to be marginal while costing 20–80% more time. Google explicitly advises simplifying the prompt and raising thinking_level instead. It still earns its keep on small and open models — see the reasoning guide for the full picture.
Reach for it when: Small or open models; multi-step arithmetic and symbolic work.
Sources and grounding
- 1Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsWei et al., 2022 (arXiv)
- 2The Decreasing Value of Chain of Thought in PromptingWharton Generative AI Labs
- 3Gemini 3 developer guideGoogle
Prompt chaining
Split one complicated request into a sequence of small ones, each checking the last.
A prompt asking for four things at once usually returns four mediocre things. Chaining does them in order — outline, then draft, then critique, then revise — with you inspecting each handover. It costs more calls and gives you far more control, and it makes failures legible: you can see which step went wrong instead of re-rolling the whole answer. Anthropic documents chaining as a named technique for complex prompts.
Reach for it when: Long deliverables, multi-stage analysis, anything with a review step.
Sources and grounding
Self-consistency
Run the same prompt several times and take the answer that recurs.
Where an answer is either right or wrong — a classification, a number, a yes/no — sampling the same prompt three or five times and taking the majority answer measurably reduces one-off errors. Meta lists it among its official Llama techniques. It is a poor fit for open-ended writing, where there is no majority to take, and it multiplies your cost by the number of runs.
Reach for it when: Classification, extraction, numeric answers, high-stakes single facts.
Sources and grounding
Grounding and retrieval
Give the model the source text rather than trusting its memory.
Every model has a training cutoff and none of them knows your organisation. Pasting the relevant document, or pointing a tool at it, converts a recall problem into a reading problem — which models are far better at. This is why GCSE gives Source its own slot and why retrieval-augmented generation is on Meta’s official technique list. Pair it with a rule: "if the answer is not in the material above, say so".
Reach for it when: Facts, policies, figures, anything about your own organisation.
Sources and grounding
Negative constraints
Say what must not happen — but say it once, and say why.
Exclusions are genuinely useful: no bullet points, no legal citations, do not mention the competitor. Two rules make them work. First, give the reason — Anthropic documents that an explained constraint generalises to cases you did not list. Second, do not repeat it: OpenAI explicitly warns that repeating instructions like "ask first" or "do not mutate" causes the model to over-apply them.
Reach for it when: House style rules, compliance limits, scope control.
Sources and grounding
Meta-prompting
Ask the model to improve your prompt before you ask it to do the work.
Paste your draft prompt and ask what is ambiguous, what is missing, and what it would need to produce an excellent answer. OpenAI notes that its current models are skilled at improving their own prompts as you iterate. Anthropic suggests a related move: ask the model to judge whether your examples are relevant and diverse. It is the cheapest possible quality step, and it works best before you have burned three runs on a vague brief.
Reach for it when: Before committing to a prompt you will reuse.
Sources and grounding
- 1A practical guide to building with AIOpenAI
- 2Prompting best practicesAnthropic