Core Techniques 7 min read Updated Sep 14, 2026

Core Techniques: Zero-Shot, Few-Shot, and Chain-of-Thought

Almost every prompting problem you'll run into is solved by one of three techniques, in roughly this order of how often you'll reach for them: ask directly, show examples, or ask for reasoning first. Knowing which one fits a given problem - and knowing that stacking all three is often the right move - is most of what "core technique" means in prompt engineering.

Zero-shot: just ask, clearly

Zero-shot prompting means asking the model to do a task with no examples at all - just a clear instruction. It's the default starting point for a reason: modern models are trained on enough instruction-following data that a well-specified, direct ask handles most simple tasks - summarizing, rewriting, classifying, answering a factual question - without any extra scaffolding. The failure mode isn't that zero-shot is weak; it's that people write vague zero-shot prompts and blame the technique instead of the wording.

Example: "Summarize this support ticket in one sentence, focused on what the customer wants resolved" is a strong zero-shot prompt. "Summarize this" is a weak one. Same technique, very different result.

Few-shot: show, don't just tell

Few-shot prompting adds two or three examples of the exact input-output pattern you want before asking the model to do it again on new input. It earns its keep whenever the task has an implicit format, tone, or judgment call that's hard to fully spell out in words - labeling ambiguous support tickets by urgency, matching a specific writing voice, or extracting data into a slightly unusual structure. Showing three good examples is often faster and more reliable than trying to describe the pattern in prose.

Example 1: input → output Example 2: input → output New input → ? Model matches pattern Output in the same format

Few-shot works by pattern-matching, not explanation - the examples do the teaching that a written rule would struggle to capture.

Chain-of-thought: ask for the reasoning, not just the answer

Chain-of-thought prompting asks the model to work through its reasoning step by step before giving a final answer, typically with a simple instruction like "think through this step by step" or by structuring the prompt to request reasoning first, answer last. It earns its keep on tasks that involve multiple steps of logic, arithmetic, or a decision with several conditions to weigh - the kind of task where jumping straight to an answer skips the checking that would have caught a mistake.

Don't overuse it: chain-of-thought adds tokens, cost, and latency, and on genuinely simple tasks it can make output worse by inviting the model to overthink a question that had an obvious answer. Reach for it when the task actually has multiple reasoning steps, not as a default add-on to every prompt.

Combining them

These techniques aren't mutually exclusive, and the strongest prompts often use more than one at once: a few-shot prompt where the examples themselves demonstrate step-by-step reasoning is a common and effective combination for tasks like multi-step data extraction or applying a nuanced policy consistently. Start with the simplest technique that could plausibly work - zero-shot - and add few-shot examples or explicit reasoning only once you've seen zero-shot actually fall short on real inputs.

How to decide which one you need

A practical way to choose: if the task is simple and well-defined, start zero-shot. If the output needs to match a specific format or judgment call that's hard to describe in words, add two or three examples. If the task genuinely requires multi-step reasoning - math, multi-condition logic, weighing tradeoffs - ask for reasoning before the answer. If you're not sure, try zero-shot first; it's the cheapest test and it fails informatively.

Next up: the structural pieces - role, context, and output format - that make any of these three techniques more reliable.
Share this guide

Was this guide helpful?

Thanks for the feedback!

Want more hands-on AI builds like this?

APA Mastery runs live, practical sessions on working with modern AI tools - not just theory.

See What's On →