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.com is an independent third-party exam-prep platform for the Claude Certified Architect (CCA-F) certification. We are not affiliated with, endorsed by, or acting on behalf of Anthropic PBC.

Note: New premium upgrades are temporarily paused while we resolve an issue with our payment provider. Existing premium members retain full access.