PrepGenAICerts

Zero-Shot, Few-Shot & Chain-of-Thought Selection

Core

Apply prompt engineering techniques matched to the task · Difficulty 2/5

0%
prompting-techniqueszero-shotfew-shotchain-of-thought

Explanation

Matching Technique to Task

TechniqueWhat it isBest for
Zero-shotInstruction only, no examplesSimple, unambiguous tasks
Few-shotA handful of input/output examplesLocking in a specific format or edge-case behavior
Chain-of-thoughtPrompt the model to reason step by step (or use extended thinking)Multi-step reasoning, math, complex judgment

The technique choice is a design decision tied to the task's difficulty and ambiguity -- not a default setting applied uniformly.

  • Zero-shot is the right default for simple, well-specified tasks; adding examples or reasoning scaffolding to a trivial task adds cost without benefit.
  • Few-shot earns its token cost when prose instructions alone cannot pin down a specific, hard-to-describe format or edge-case behavior -- the examples show, rather than tell.
  • Chain-of-thought (explicit step-by-step prompting, or the model's Extended Thinking capability) earns its added latency when the task genuinely requires multi-step reasoning, math, or complex judgment.

Common exam traps

  • Adding few-shot examples or chain-of-thought reflexively, as if they were always an improvement. Examples cost tokens and can over-anchor the model to the example pattern; chain-of-thought/Extended Thinking adds latency. Use each technique only when the task's difficulty actually warrants it.

Key Takeaways

  • Zero-shot suits simple, unambiguous tasks; few-shot locks in format/edge-case behavior; chain-of-thought suits multi-step reasoning
  • Few-shot examples show the desired behavior rather than describing it in prose
  • Chain-of-thought and extended thinking are the same lever: reasoning depth traded for tokens/latency
  • Reflexively adding examples or CoT to a simple task adds cost without benefit

Glossary Terms

Related Concepts

PrepGenAICerts is an independent exam-prep site. It is not affiliated with, endorsed by, or sponsored by Anthropic, PBC. Claude and Anthropic are trademarks of Anthropic, PBC. Exam details are taken from publicly available Anthropic and Pearson documentation. About PrepGenAICerts.