Chain-of-Thought
Also known as: CoT, Chain-of-Thought Prompting, Step-by-Step Reasoning
A prompting technique that improves AI reasoning by instructing the model to decompose complex problems into intermediate reasoning steps before arriving at a final answer.
“A prompting technique that improves AI reasoning by instructing the model to decompose complex problems into intermediate reasoning steps before arriving at a final answer.
“
Overview
Chain-of-Thought (CoT) prompting is a technique that dramatically improves the reasoning ability of large language models by encouraging them to "show their work" — generating intermediate reasoning steps rather than jumping directly to an answer. First demonstrated by Google researchers in 2022, CoT has become a standard technique in prompt engineering.
How It Works
Instead of producing a single output, the model is encouraged to break down its reasoning into explicit steps. For example, without CoT a model might answer "What is 24 x 17?" with just "408". With CoT and the prompt "Let's think step by step", the model would show: "24 x 17 = 24 x 10 + 24 x 7 = 240 + 168 = 408". The explicit reasoning steps help the model arrive at correct answers for problems that require multi-step logic.
Variants
Zero-Shot CoT
Simply adding "Let's think step by step" to the prompt without providing any examples. Surprisingly effective across many reasoning tasks.
Few-Shot CoT
Providing examples that demonstrate the step-by-step reasoning process, teaching the model both the format and the reasoning approach.
Tree of Thought (ToT)
An extension that explores multiple reasoning paths simultaneously, evaluating each path and pruning less promising ones.
Context Management Implications
CoT trades increased context window usage (more output tokens) for improved accuracy. This is a context management decision — allocating more of the output budget to reasoning steps versus final answers.
Sources & Further Reading
Related Terms
Few-Shot Learning
A machine learning approach where models learn to perform tasks from only a small number of examples, typically provided within the prompt or during a brief adaptation phase.
Large Language Model
A type of AI model trained on vast amounts of text data that can understand, generate, and manipulate human language, typically based on the transformer architecture with billions of parameters.
Prompt Engineering
The practice of designing, optimizing, and structuring inputs (prompts) to AI language models to elicit desired outputs, including techniques for instruction formatting, context provision, and output specification.