Chain-of-Thought Prompting

What It Is

A prompting technique that encourages LLMs to generate intermediate reasoning steps before producing a final answer, rather than jumping directly to conclusions.

Why It Matters

Chain-of-Thought (CoT) exploits a core LLM capability: decomposing complex problems into sequential steps. By making the model “think out loud,” CoT surfaces the reasoning process where errors can be identified and corrected. Research shows improvements of up to 39% on mathematical problem solving and 26% on commonsense reasoning compared to direct prompting.

The technique was foundational, virtually every advanced prompting method builds on or extends this insight.

How It Works

Instead of prompting:

“Q: Roger has 5 tennis balls. He buys 2 more cans of 3. How many does he have now? A:”

Provide exemplars showing step-by-step reasoning:

“Q: Roger has 5 tennis balls. He buys 2 more cans of 3 tennis balls each. How many tennis balls does he have now? A: Roger started with 5 balls. 2 cans of 3 balls each is 6 balls. 5 + 6 = 11. The answer is 11.”

The model learns to generate similar reasoning chains for new problems.

Variants and Extensions

  • Self-Consistency: Sample multiple reasoning paths, select answer by majority vote (+11% average gain)
  • Auto-CoT: Automatically generate diverse exemplars rather than hand-crafting them
  • Complex-CoT: Select exemplars with longer, more detailed reasoning chains
  • Tree-of-Thoughts: Explore reasoning as a branching tree with backtracking capability

Limitations

CoT is most effective when the task genuinely benefits from explicit reasoning steps. For simple factual retrieval or classification tasks, it may add unnecessary overhead. More critically, while CoT improves the reasoning process, arithmetic errors in the execution phase remain common, addressed by methods like Program-of-Thoughts that offload computation.

Related: 05-molecule—tool-delegation-pattern, 05-molecule—metacognitive-prompting, 05-atom—task-specificity-of-prompting