Chain of Thought (CoT)
A reasoning technique that prompts or trains an LLM to generate intermediate reasoning steps before producing a final answer, dramatically improving accuracy on math, logic, and multi-step tasks
Table of Contents
Structure Diagram
What is Chain of Thought (CoT)?
A reasoning technique that prompts or trains an LLM to generate intermediate reasoning steps before producing a final answer, dramatically improving accuracy on math, logic, and multi-step tasks. It is a core concept in Training & Tuning within AI / ML.
Core Principles
A Transformer spends a fixed amount of compute per generated token. Asking it to jump straight to the final answer on a multi-step problem starves it of compute.
Chain of Thought (CoT) turns generated intermediate tokens into a working scratchpad, scaling test-time compute with problem difficulty. Modern reasoning models internalize CoT via reinforcement learning, allocating dedicated thinking tokens before answering.
Practical Takeaways
- Pair CoT with Structured Output: Place a
reasoningfield before theverdictkey in your JSON schema so the model computes its rationale before locking in the final label. - Spend thinking tokens selectively: CoT increases output token cost and latency—reserve it for multi-step logic, debugging, and compliance checks rather than simple formatting.
- Avoid redundant CoT prompts on native reasoning models: Models with built-in thinking modes manage their own scratchpad; tune their thinking budget parameter instead.
Notable Examples
- Policy & Compliance Auditing: Walks through each eligibility clause step by step before emitting an approve/reject decision.
- Root-Cause Code Debugging: Traces stack frames and variable states explicitly before proposing a patch.
- Self-Consistency: Samples multiple CoT reasoning paths and takes a majority vote on the final answer for hard benchmarks.