Skip to main content
AI / MLTraining & TuningDiagramBeginner

Chain of Thought (CoT)

KO: 사고의 사슬 (CoT)·EN: Chain of Thought (CoT)·JA: 思考の連鎖(CoT)·Chain of Thought

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

Chain of Thought Step-by-Step Reasoning Flow
CoT1. Decompose2. Intermedi…3. Self-Check4. Final Ans…
2/42. Intermediate Steps
Tokens as scratchpad
Quick Answer

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 reasoning field before the verdict key 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.