12 Types of Prompting Methods Explained (With Examples)
· updated

Most people prompt a language model the way they’d ask a colleague: type the question, hope for the best. That works surprisingly often and fails in predictable ways: the output is the wrong shape, the reasoning skipped a step, the model didn’t know a fact, or it needed to do something rather than say something. Each failure has a prompting method that fixes it. This page covers the twelve that matter, in five families, with an example of each, and a guide to picking the right one for the failure in front of you.
The short answer: Prompting methods are techniques for shaping what a model does. The twelve worth knowing:
- Zero-shot: just the task.
- Few-shot: with examples.
- Chain of thought: ask for step-by-step reasoning.
- Self-consistency: sample several reasonings and take the majority.
- Tree of thoughts: explore and evaluate branches.
- Role prompting: assign a persona.
- Structured output: demand a schema.
- Prompt chaining: split into sequential prompts.
- Retrieval-augmented prompting: put the relevant documents in the prompt.
- ReAct: reason, call a tool, observe, repeat.
- System prompts and constraints: standing rules and negatives.
- Meta-prompting: have the model improve the prompt.
Start zero-shot with a clear task and format; add methods as specific failures appear.
Before the methods: the three things every prompt needs
Every method below sits on top of a prompt that already does three things. If yours doesn’t, fix that first.
- State the task precisely. What, for whom, to what end. “Summarise this contract for a non-lawyer, focusing on obligations and deadlines” rather than “summarise this”.
- Specify the output. Length, format, structure, language. “Five bullet points, each under 20 words.”
- Give the necessary context. The document, the data, the constraints, the audience. The model only knows what’s in the window. Context engineering vs prompt engineering is about what happens when this third item gets big.
Family 1: examples
1. Zero-shot prompting
The task, with no examples. Relies on the model’s training to know what a good answer looks like.
Classify the following customer review as positive, negative or mixed. Reply with one word.
Review: “Delivery was fast but the packaging was crushed and one item was missing.”
Use when: the task is common and well-defined, and the output format is simple. Fails when: the output needs a specific format or judgement the model doesn’t infer.
2. One-shot and few-shot prompting
The task, preceded by one (one-shot) or several (few-shot) worked examples. The model copies the pattern.
Extract the product, the issue and the requested action from each review.
Review: “The headphones stopped charging after a week. I want a replacement.” Product: headphones | Issue: stopped charging after a week | Action: replacement
Review: “Great blender, but the lid cracked. Can I get a new lid?” Product: blender | Issue: lid cracked | Action: new lid
Review: “The jacket’s zip broke on day two. Refund please.” Product:
Use when: the output format is specific, the classification is subjective, or zero-shot results are inconsistent. Three to five examples is usually enough; choose them to cover the edge cases, not just the easy ones. Fails when: the examples bias the model toward their content rather than their pattern; vary the examples’ subject matter.
Family 2: reasoning
3. Chain-of-thought prompting
Ask the model to reason step by step before answering. The simplest version adds one sentence; the stronger version shows reasoning in few-shot examples.
A shop sells notebooks at ₹45 each and pens at ₹12 each. Priya buys 4 notebooks and some pens and pays ₹252. How many pens did she buy? Think through this step by step, then give the final answer on its own line.
The model writes out 4 × 45 = 180, 252 − 180 = 72, 72 ÷ 12 = 6, then answers 6. Without the instruction, models skip steps and get arithmetic wrong more often.
Use when: maths, logic, multi-step planning, anything where the answer depends on intermediate results. Fails when: the task is a simple lookup or classification; it adds length and sometimes talks itself into errors. Note that newer models with built-in reasoning modes do this internally; the instruction still helps with formatting and on models without that mode.
4. Self-consistency
Run the same chain-of-thought prompt several times (with some randomness), collect the answers, and take the majority. Reasoning paths that reach the same answer are more likely to be right than any single path.
[The same step-by-step prompt, sampled five times.] Answers: 6, 6, 5, 6, 6 → final answer 6.
Use when: accuracy matters more than cost and the answer is a single checkable value. Fails when: the task has many valid answers, or the budget is one call.
5. Tree of thoughts
Instead of one reasoning chain, have the model generate several candidate next steps, evaluate them, and expand the promising ones, like a search over a tree of partial solutions.
You are solving a scheduling puzzle. At each step, propose three possible next moves, rate each as “promising”, “possible” or “dead end” with one line of reasoning, then continue only from the promising ones.
Use when: puzzles, planning, creative tasks with many paths, anything where early choices constrain later ones. Fails when: the task is linear; it’s expensive and slow for simple problems. Usually implemented as a program orchestrating several calls rather than a single prompt.
Family 3: structure
6. Role prompting
Assign a persona, expertise or perspective. It shifts vocabulary, assumptions, and what the model treats as relevant.
You are a senior tax accountant advising a small business owner in India. Explain, in plain language, whether the following expense is deductible and what records they should keep.
Use when: the task needs a particular level of expertise, tone or audience awareness. Fails when: the role is used as a substitute for real information (“you are an expert” doesn’t make the model know your company’s policy) or contradicts the format you want.
7. Structured output prompting
Demand a specific schema: JSON with named fields, a table with fixed columns, a fixed section order. Most model APIs now support enforced schemas; in a plain prompt, describe the schema and give an example.
Extract the following from the job listing and return valid JSON only, with these keys: “title” (string), “location” (string), “remote” (true/false), “required_skills” (array of strings), “salary_range” (string or null). Do not include any text outside the JSON.
Use when: the output feeds code, a database, or another prompt. Fails when: the schema is under-specified (say what to do with missing values) or the model is asked to be creative inside a rigid structure.
8. Prompt chaining and decomposition
Split a complex task into a sequence of prompts, each doing one thing, with the output of one feeding the next. Extract, then classify, then draft, then check.
Prompt 1: “List every claim of fact in this article as a numbered list.” Prompt 2: “For each claim below, say whether it’s verifiable from the sources provided, and cite the source.” Prompt 3: “Rewrite the article keeping only the verified claims.”
Use when: the task has stages, when a single prompt produces muddled output, or when you want to inspect and test each step. Fails when: the overhead of several calls isn’t worth it for a simple task. This is the pattern most production pipelines are built from.
Family 4: grounding
9. Retrieval-augmented prompting
Put the documents the model needs in the prompt, retrieved for this specific question, and instruct it to answer from them. The prompt-side half of retrieval-augmented generation (RAG).
Answer the question using only the policy excerpts below. If the excerpts don’t contain the answer, say “The policy doesn’t cover this” rather than guessing. Cite the section number for every statement.
[Excerpt 1: section 4.2 …] [Excerpt 2: section 7.1 …]
Question: Can I claim a hotel above the standard rate if the conference hotel is more expensive?
Use when: the model needs facts it wasn’t trained on: your documents, current data, private information. Fails when: retrieval returns the wrong excerpts (the prompt can’t fix that), or the instruction to stay within the excerpts is missing and the model fills gaps from training.
10. ReAct: reason and act
ReAct is the loop behind most AI agents; what is an AI agent explains how they work.
Interleave reasoning with tool calls. The model thinks about what it needs, calls a tool, reads the result, thinks again, and repeats until it can answer. The basic loop behind agents.
You can use these tools: search(query), get_order(order_id), calculator(expression). For each step, write “Thought:” with your reasoning, then “Action:” with one tool call, then wait for “Observation:”. When you have enough, write “Answer:”.
Question: Has order 48213 shipped, and if it’s late, what refund does the policy give?
The model reasons (“I need the order status first”), calls get_order(48213), reads the observation, reasons (“shipped four days late; now I need the late-delivery policy”), calls search("late delivery refund policy"), and answers.
Use when: the task needs actions or live data, or several dependent lookups. Fails when: tools are poorly described, when the loop has no step limit, or when tool results contain instructions the model follows (treat all tool output as data). Modern APIs implement this via native tool calling, so you define tools and the loop rather than writing “Thought/Action” text, but the prompting discipline is identical.
Family 5: control
11. System prompts, constraints and negatives
Standing instructions that apply to every turn: identity, scope, rules, tone, what to refuse, what to do when uncertain. Plus explicit constraints (“under 100 words”, “no marketing language”) and negatives (“do not invent statistics”), which work best when paired with what to do instead.
System: You are the support assistant for Acme’s expense tool. Answer only questions about expenses and the tool. If a question is outside that, say so and suggest contacting HR. Never state a number you can’t find in the provided policy; say “I don’t have that figure” instead. Keep answers under 120 words unless the user asks for detail.
Use when: always, in any deployed application. Fails when: the rules are vague (“be helpful”), contradictory, or too long to be followed consistently; when negatives lack an alternative (“don’t guess” works better as “if you don’t know, say X”).
12. Meta-prompting
Use the model to write or improve the prompt: describe the task and ask for a prompt, or show a prompt and its bad outputs and ask what to change. Also covers asking the model to critique its own answer before finalising.
Here is a prompt and three outputs it produced that were too vague. Rewrite the prompt so the outputs are specific, cite sources, and follow the JSON schema. Explain each change in one line.
Use when: iterating on a prompt, generating variants to test, or adding a self-review step. Fails when: it’s used instead of an evaluation; the model’s opinion of a prompt isn’t evidence that it works. Test on real cases.
Which method for which failure
| What’s going wrong | Try |
|---|---|
| Output is the wrong shape or inconsistent | Structured output; few-shot examples |
| Reasoning skips steps or gets arithmetic wrong | Chain of thought; self-consistency for high stakes |
| The model doesn’t know the facts | Retrieval-augmented prompting |
| The model needs to look something up or take an action | ReAct / tool calling |
| The task is really three tasks | Prompt chaining |
| Tone or expertise level is off | Role prompting |
| It does things it shouldn’t, or guesses | System prompt with constraints and alternatives |
| Early choices are locking in bad paths | Tree of thoughts |
| You’re not sure what to change | Meta-prompting, then evaluate |
Start with a clear zero-shot prompt with a specified format. Add one method at a time in response to a specific failure, and check the result on real examples, not the one that happened to be in front of you.
Mistakes
- Stacking every method at once. A prompt with a role, five examples, step-by-step reasoning, a schema and twelve rules is slower, costlier and often worse than a clear task with a format.
- Examples that don’t cover the edge cases. Few-shot teaches the pattern of the examples; if they’re all easy, the hard cases are unguided.
- Chain of thought on lookups. Longer, not better.
- Negatives without alternatives. “Don’t guess” leaves the model nowhere to go; “if unsure, say you don’t know” tells it what to do.
- Treating tool results as trusted instructions. Anything retrieved or returned from a tool is data. Say so in the system prompt.
- Judging by one output. Prompts are evaluated on a set of cases, with a metric. Anything else is anecdote.
What this means for AI careers
Every AI engineering listing assumes these methods; none of them hires for these alone. The skill that gets hired is applying them inside a system: retrieval, tools, evaluation, and the context pipeline around the prompt. Context engineering vs prompt engineering explains that shift, and what does an AI engineer do covers the role and how to get into it.
Where Tailr fits
The job listings for roles that use these skills name them specifically: “prompt design”, “RAG”, “tool use”, “structured outputs”, “evals”, “agents”. Tailr tailors your resume to the specific listing you’re viewing, so the methods and systems that role asks for are the ones your resume leads with, phrased the way the listing phrases them, and generates a matching cover letter. Try Tailr on the next AI role you open.
Conclusion
Twelve methods, five families, one rule: state the task, specify the format, give the context, and add a method only in response to a failure you can see. Examples fix inconsistent output, chain of thought fixes skipped reasoning, retrieval fixes missing facts, tools fix the need to act, chaining fixes tangled tasks, and a good system prompt fixes behaviour. Learn them in a few days, then spend the months on what surrounds them: the retrieval, the tools and the evaluation that turn a good prompt into a working system.
Frequently asked questions
01What are the main types of prompting?
The methods most people use fall into five families: giving examples (zero-shot, one-shot, few-shot), eliciting reasoning (chain of thought, self-consistency, tree of thoughts), structuring the task (role prompting, structured output, prompt chaining, decomposition), grounding the model in data and actions (retrieval-augmented prompting, ReAct with tools), and controlling behaviour (system prompts, constraints and negatives, meta-prompting). Most real prompts combine two or three.
02What is zero-shot vs few-shot prompting?
Zero-shot prompting gives the model a task with no examples: 'Classify this review as positive or negative.' Few-shot prompting includes a handful of worked examples before the task so the model copies the pattern, format and level of detail. Zero-shot works for common, well-defined tasks; few-shot is the fastest fix when the output format or judgement is inconsistent.
03What is chain of thought prompting?
Asking the model to reason through a problem step by step before giving the answer, either by showing worked reasoning in examples or simply adding 'think through this step by step'. It measurably improves accuracy on maths, logic, multi-step and planning tasks, because the intermediate steps are written down rather than skipped. On simple lookups it adds length without adding accuracy.
04What is ReAct prompting?
ReAct (reason and act) interleaves reasoning with actions: the model thinks about what it needs, calls a tool (a search, a calculator, an API), reads the result, reasons again, and repeats until it can answer. It's the basic pattern behind AI agents. Modern models support it natively through tool calling, so you rarely write the loop by hand, but the prompting principle, reason then act then observe, is the same.
05Which prompting method is best?
There's no single best. Start zero-shot with a clear task and a specified format; add few-shot examples if the output is inconsistent; add chain of thought if the task needs multi-step reasoning; add retrieval if the model needs facts it doesn't have; add tools if it needs to act; chain prompts if the task is really several tasks. The method follows the failure you're seeing.
06Is prompt engineering still relevant in 2026?
Yes, as a foundation rather than the whole job. Models are more robust to phrasing than they were, and much of the work has shifted to context engineering: retrieval, tools, memory and evaluation. But every one of those systems still contains prompts, and knowing these methods is what lets you write the instruction, the examples and the tool descriptions well. It's a days-long skill that everything else builds on.