Chain-of-Thought (CoT)
Chain-of-thought is a prompting technique that improves AI reasoning by asking the model to show its step-by-step thinking process before arriving at a final answer.
Last reviewed
Chain-of-thought prompting is a technique where you instruct the AI model to break down its reasoning into explicit intermediate steps rather than jumping directly to an answer. It generally produces better answers on tasks involving math, logic, multi-step reasoning, and analysis, because each step constrains the next one. By making the reasoning process visible, CoT also makes it easier to identify where the model goes wrong.
The simplest form of CoT is adding "Let's think step by step" to your prompt, which is often enough to change the answer on a multi-step problem. More structured approaches involve providing examples that demonstrate the desired reasoning pattern (few-shot CoT) or defining a specific reasoning framework the model should follow. Advanced variants include tree-of-thought (exploring multiple reasoning paths), self-consistency (generating multiple reasoning chains and taking the majority answer), and chain-of-verification (asking the model to verify its own reasoning).
Chain-of-thought is particularly important for AI agents where incorrect reasoning can lead to wrong actions with real-world consequences. Modern reasoning models build this step into the model itself rather than leaving it to your prompt: Claude runs extended thinking, OpenAI's GPT-5 series exposes a configurable reasoning effort, and Gemini has its own thinking modes. On those models the deliberation happens whether or not you ask for it, which changes chain-of-thought from a prompting trick into a parameter you tune.
Real-World Examples
- •Asking Claude to solve a math problem by showing each calculation step before the final answer
- •A coding assistant reasoning through a bug by analyzing the error, tracing the code path, and explaining the fix
- •An AI analyzing a business problem by listing assumptions, evaluating options, and recommending a decision
- •Adding 'think step by step' to a multi-step classification prompt so the model works through the criteria before it labels