technique

Chain-of-thought prompting

Chain-of-thought (CoT) prompting tells a language model to write its reasoning steps before its final answer, increasing accuracy on multi-step problems.

Chain-of-thought (CoT) is a prompting technique introduced by Wei et al. (2022) where the model is instructed to expose intermediate reasoning before delivering a final answer. The two most common forms are zero-shot CoT ("Let's think step by step.") and few-shot CoT (showing 2–5 worked examples in the prompt). CoT measurably improves performance on arithmetic, commonsense reasoning, and symbolic tasks, but it costs extra output tokens and slows latency. Modern reasoning models like o1, Claude with extended thinking, and Gemini 2 Thinking effectively run CoT internally, so manual CoT is most valuable on smaller or non-reasoning models.

When to use chain-of-thought prompting

When not to use chain-of-thought prompting

Example

Input: If a shirt is $20 and on 25% off, what's the final price? Think step by step.
Output: Step 1: 25% of $20 = $5. Step 2: $20 - $5 = $15. Final price: $15.

Common mistakes

FAQ

What is chain-of-thought prompting?

Chain-of-thought (CoT) prompting tells a language model to write its reasoning steps before its final answer, increasing accuracy on multi-step problems.

When should I use chain-of-thought prompting?

Math, logic, and multi-step planning prompts. Smaller models (8B–70B) where reasoning capability is weaker. When you can afford 2–10× output tokens.

What are the most common mistakes with chain-of-thought prompting?

Using CoT on reasoning models — it often degrades quality. Forgetting to mark the final answer (e.g. 'Answer:') so it's parseable. Pairing CoT with high temperature, which makes reasoning incoherent.

Sources

Last updated: 2026-06-01. Raw markdown: https://promtable.com/glossary/chain-of-thought.md.