Chain-of-thought
A chain-of-thought is an ordered sequence of intermediate reasoning steps that connects information or a problem to a conclusion, whether expressed or generated as text.
The Architecture of Reasoning
A reasoning technique that proceeds through ordered analytical steps.
- How it is used
- Makes the reasoning behind complex team decisions inspectable before conclusions become commitments.
- How deep it goes
- Develops a conversational sequence and compact checklist for examining assumptions and causal links, without requiring formal documentation.
- Examples
- Uses a payment-service incident and a market-expansion recommendation to reveal hidden causal leaps and assumptions.
- What you can do after
- Practice/perform stepwise questioning to locate weak links before an ambiguous or costly decision is made.
Read how The Architecture of Reasoning explains chain-of-thought →
Inside AI
Logical reasoning is the process of deriving conclusions from information by applying rules of consistency and inference.
- How it is used
- Contrasts human contextual reasoning with the limitations of data-driven AI and automation.
- How deep it goes
- Outlines a medical decision sequence and discusses contextual inference, but does not specify a chain-of-thought prompting method.
- Examples
- Illustrates reasoning with a medical diagnostic sequence, a banana and its plastic counterpart, and a self-driving car's repeated destination error.
- What you can do after
- Evaluate/understand how context and successive inferences affect decisions, and why automated conclusions need scrutiny.
Sutskever's List
Reasoning is the ability to derive conclusions or solve problems by applying structured relationships among facts or representations.
- How it is used
- Frames the challenge of connecting facts, comparisons, or decisions across steps where scaling pretraining alone did not yield dependable performance.
- How deep it goes
- Explains relational memory interactions and prompting strategies through worked tasks, but does not establish a general solution to reliable planning.
- Examples
- Uses CLEVR comparisons, bAbI supporting facts, vector-distance ranking, and GSM8K arithmetic word problems.
- What you can do after
- Evaluate/understand it by distinguishing benchmark success from dependable reasoning and by inspecting intermediate steps or explicit planning constraints.
Knowledge Graphs and LLMs in Action
Reasoning is the process of analyzing information, applying rules, and drawing conclusions from evidence or premises.
- How it is used
- Deploys reasoning to derive insights, classify new cases, answer knowledge-graph questions, and support intelligent-system decisions.
- How deep it goes
- Explains deductive and inductive forms, uncertainty, and a query-generation pipeline, while stopping short of formal reasoning algorithms.
- Examples
- Uses spam filtering, a river-crossing puzzle, and natural-language-to-Cypher knowledge-graph querying as concrete reasoning examples.
- What you can do after
- Build reliable query-generation workflows by supplying schema context, checking relationships, structuring reasoning steps, and using execution feedback.
Read how Knowledge Graphs and LLMs in Action explains chain-of-thought →
Build a Reasoning Model (From Scratch)
The process of deriving conclusions from premises through explicit inference rather than surface pattern recognition.
- How it is used
- Frames intermediate-step generation as the core capability for improving LLM performance on complex tasks and practical agent workflows.
- How deep it goes
- Defines intermediate reasoning, contrasts it with pattern matching, and outlines prompting, sampling, and refinement without detailing training internals.
- Examples
- Uses multistep math, coding, logical puzzles, capital recall, and bird-and-penguin premises to distinguish inference from statistical association.
- What you can do after
- Evaluate, prototype, and design reasoning improvements using chain-of-thought, self-consistency, and other inference-time methods.
Read how Build a Reasoning Model (From Scratch) explains chain-of-thought →
Machine Learning Platform Engineering
A multistep reasoning chain is an orchestrated sequence of intermediate operations that transforms a user query into a final model response.
- How it is used
- Frames a user query as an orchestrated LLM workflow whose intermediate stages need production debugging.
- How deep it goes
- Explains the component sequence and stage-level tracing, but does not specify an implementation of the orchestration.
- Examples
- Uses a documentation-query RAG application and Langfuse spans across retrieval, augmentation, and generation.
- What you can do after
- Diagnose/debug with Langfuse spans to locate failures and inspect timing and token usage across RAG stages.
Read how Machine Learning Platform Engineering explains chain-of-thought →
AI Agents in Action
Reasoning is the process of deriving conclusions, plans, or solutions by relating information through intermediate steps.
- How it is used
- Uses stepwise prompting to help language models reason through problems and support agent planning and evaluation.
- How deep it goes
- Explains zero-shot stepwise prompting and an answer-evaluation flow, and compares it with example-based prompting.
- Examples
- Tests a time-travel problem against an expected answer and uses corrective feedback after an incorrect response.
- What you can do after
- Apply it via a step-by-step prompt and evaluate the predicted answer against an expected solution.
Natural Language Processing in Action, Second Edition
Reasoning is the process of deriving conclusions or solving problems by applying relationships among facts, premises, or representations.
- How it is used
- Distinguishes apparent language-model reasoning from pattern-based text generation and examines claims of intelligence.
- How deep it goes
- Contrasts text-pattern generalization with reasoning and real-world grounding, but gives no formal account of reasoning mechanisms.
- Examples
- Uses a cow-and-bull leg-counting prompt whose ten generated answers range from a plausible answer to unrelated words.
- What you can do after
- Evaluate whether plausible language-model responses demonstrate reasoning by inspecting their grounding and consistency.
Read how Natural Language Processing in Action, Second Edition explains chain-of-thought →
LLM Evaluation and Alignment, The Foundational Ideas
Reasoning ability is the capacity of a model to derive conclusions through logically appropriate intermediate inferences.
- How it is used
- Evaluates whether models solve mathematical and logical tasks and whether their intermediate reasoning is sound.
- How deep it goes
- Explains context contamination, independent references, step-level labels, and candidate reranking, but stops short of a general reasoning algorithm.
- Examples
- Uses contaminated elementary math judgments, reference-guided grading, PRM800K step labels, and MATH candidate reranking.
- What you can do after
- Diagnose reasoning-evaluation failures and apply independent references or process reward models to rerank candidate solutions.
Read how LLM Evaluation and Alignment, The Foundational Ideas explains chain-of-thought →
Deep Learning with R, Third Edition
Reasoning is the process of deriving conclusions or selecting actions from representations, premises, or rules.
- How it is used
- Uses natural-language searches through reasoning steps as a test-time adaptation method for handling novel problems.
- How deep it goes
- Defines chain-of-thought synthesis as natural-language test-time search but does not detail its implementation.
Read how Deep Learning with R, Third Edition explains chain-of-thought →
Building Specialized AI Systems
A reasoning trail is a sequence of intermediate calculations and explanations that connects input evidence to a final decision.
- How it is used
- Structures fine-tuning data so models learn decisions together with transparent rationales.
- How deep it goes
- Traces inputs through intermediate calculations to a textual decision explanation, without detailing model internals.
- Examples
- Uses income, debt, credit score, late payments, DTI, and a high-risk classification.
- What you can do after
- Evaluate credit-risk decisions by inspecting the evidence, calculations, classification, and supporting explanation.
Read how Building Specialized AI Systems explains chain-of-thought →
Domain-Specific Small Language Models
A model's multi-step internal or external problem-solving process used to derive an answer for difficult tasks.
- How it is used
- Use additional inference computation or reward-guided training to improve answers on difficult or domain-specific tasks.
- How deep it goes
- Explains inference-time search and reward design, then outlines a domain-specific training workflow without detailing search algorithms or reward mathematics.
- Examples
- Uses math, logic, and coding tasks alongside an additive-manufacturing model trained to format reasoning traces and answer domain questions.
- What you can do after
- Build it from scratch by preparing domain data, defining correctness and formatting rewards, configuring GRPO, and training a small model.
Read how Domain-Specific Small Language Models explains chain-of-thought →
Interview Speak
The sequence of mental reasoning steps used to analyze information and reach, evaluate, or justify a conclusion or action.
- How it is used
- Uses interview answers to reveal how candidates analyze problems, make decisions, manage priorities, and respond under pressure.
- How deep it goes
- Explains a practical reasoning sequence—pause, identify difficulty, compare options, justify the choice, and report the outcome—without formal theory.
- Examples
- Uses guesstimates, brainteasers, past difficult decisions, and questions about handling specific problems as practice cases.
- What you can do after
- Practice explaining assumptions, alternatives, trade-offs, conclusions, and results in response to analytical interview questions.
Machines that Think
Reasoning that proceeds through an explicit sequence of intermediate inferential steps.
- How it is used
- Uses intermediate steps to structure generation before a final answer and reduce unsupported conclusions.
- How deep it goes
- Explains how generated steps supply context, surveys branching methods, and notes that why the approach works remains unsettled.
- Examples
- Cites arithmetic, commonsense, and symbolic reasoning tasks, alongside a contrast between direct answers and intermediate steps.
- What you can do after
- Evaluate and understand how intermediate steps can support an answer without necessarily revealing its underlying cause.
Build a DeepSeek Model (From Scratch)
Reasoning behavior is a model's capability to carry out or express multi-step inference and problem-solving strategies.
- How it is used
- Uses reasoning-style traces as behavior that reinforcement learning can strengthen and supervised distillation can transfer.
- How deep it goes
- Traces emergence under verifiable-task reinforcement learning, then outlines staged filtering and transfer without specifying a general reasoning mechanism.
- Examples
- Uses R1-Zero’s aha moment, where the model revisits a flawed approach, and filtered traces for student training.
- What you can do after
- Understand how reward-driven training can elicit reasoning-like behavior and how supervised distillation transfers learned traces.
Read how Build a DeepSeek Model (From Scratch) explains chain-of-thought →
AI Model Evaluation
The process of deriving conclusions or solutions through logical or evidential steps expressed in a model output.
- How it is used
- Improves LLM-judge scoring by requiring criterion-based reasoning before a verdict.
- How deep it goes
- Explains criterion-by-criterion reasoning and its debugging value, but cautions that fluent explanations do not prove correctness.
- Examples
- Contrasts a bare 1–5 rating prompt with criterion justifications requested before the score.
- What you can do after
- Diagnose questionable judge scores by inspecting misunderstandings, missed context, or rubric application.
Retrieval Augmented Generation, The Foundational Ideas
Multi-step reasoning coordination is the organization of subproblem solving, information gathering, and result synthesis across iterative reasoning cycles.
- How it is used
- Coordinates evolving information needs in research, creative, analytical, and mission-critical workflows.
- How deep it goes
- Defines iterative decomposition, retrieval, validation, and synthesis, but does not specify a complete implementation.
- Examples
- Uses research agents, tool-selecting systems, and ScholarCopilot to illustrate iterative retrieval and specialized information gathering.
- What you can do after
- Evaluate multi-step processes with monitoring, confidence scoring, factual verification, and gap detection.
Read how Retrieval Augmented Generation, The Foundational Ideas explains chain-of-thought →
Designing AI Agents
A reasoning technique that represents a decision as a sequence of intermediate steps or claims.
- How it is used
- Structures decisions as checkable intermediate claims when later steps depend on them.
- How deep it goes
- Specifies application-owned claims, evidence links, verification, and stopping conditions, but not a faithful private reasoning trace.
- Examples
- Uses a payroll calculation with policy dates, location rules, rounding, and checkable intermediate amounts.
- What you can do after
- Evaluate whether explicit decision dependencies justify their verification, token, and latency costs.
Vibe Engineering
Reasoning is the deliberate use of intermediate inference steps to analyze a problem and derive an answer.
- How it is used
- Use reasoning chains selectively when troubleshooting; familiar problems may yield faster through direct retrieval.
- How deep it goes
- Contrasts looping exploration with one successful retrieval example, without prescribing a formal reasoning procedure.
- Examples
- Compares a looping game-bug investigation with a one-line prompt and screenshot identifying the Minus World glitch.
- What you can do after
- Evaluate whether to request reasoning, trust retrieval, or intervene and check an answer.
Context Engineering
Step-by-step reasoning is a reasoning technique that decomposes a complex task into a sequence of smaller logical operations.
- How it is used
- Guides an LLM through complex objectives by splitting them into interpretable steps within one prompt or across chained calls.
- How deep it goes
- Defines task decomposition and prompt-level use, then contrasts explicit procedural prompting with reasoning models’ internal reasoning.
- Examples
- Uses complex objectives handled through chained model calls or step-by-step guidance in a single prompt.
- What you can do after
- Apply it by breaking a complex objective into smaller interpretable steps, either across calls or within a prompt.
Building Reliable AI Systems
Reasoning that reaches a conclusion through multiple connected inferential steps.
- How it is used
- Supports multistep reasoning and agent collaboration through cycle management in LangGraph workflows.
- How deep it goes
- Identifies cycles as support for multistep reasoning but does not detail individual inferential steps.
- Examples
- Uses agent collaboration in a cyclic workflow as an illustration, without specifying a reasoning task.
- What you can do after
- Build multi-agent workflows that use cycles to support multistep reasoning and collaboration.
Read how Building Reliable AI Systems explains chain-of-thought →
Also covered in
- The AI Pocket Book
- AI Agents and Applications
- Generative AI in Action
- Starting Data Analytics with Generative AI and Python
- The Art of AI Product Development
- Introduction to Generative AI, Second Edition
- LLM Customization and Fine-TuningIn early access (MEAP)
- AI Agents for Offensive SecurityIn early access (MEAP)
- AI for Everyday IT
- AI Agents in Action, Second Edition
What to know first
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- reinforcement learningReinforcement learning is a machine-learning paradigm in which an agent learns behavior or a decision policy through interaction with an environment and evaluative feedback, such as rewards.
- fine-tuningFine-tuning is the continued training of a pretrained model on targeted data or objectives to adapt its parameters or behavior to a task, domain, or use.
- similarity searchSimilarity search is a retrieval technique that finds or ranks items by their similarity to a query, often by comparing feature or vector representations under a similarity or distance measure.
Related concepts
- Tree-of-thoughtcontrasts with · Tree-of-thought is a reasoning technique that explores and evaluates multiple branching paths of intermediate reasoning to develop a solution.
- direct q&acontrasts with · A reasoning pattern in which a question receives an answer directly, without an explicit intermediate reasoning process.
- chain-of-thought promptingproduced by · Chain-of-thought prompting is a technique that elicits or supplies intermediate reasoning steps to guide a model toward a final answer.
- ReActused by · ReAct is an agent technique that iteratively interleaves reasoning, actions, and observations so results can guide subsequent actions.
- reasoning modelused by · A reasoning model is a machine-learning model designed or trained to perform multistep analysis or inference before producing an answer or result.
- AI agentpart of · An AI agent is a computational system that uses artificial intelligence to interpret information and select or perform actions toward goals while interacting with an environment.
Questions about chain-of-thought
What is chain-of-thought?
A chain-of-thought is an ordered sequence of intermediate reasoning steps that connects information or a problem to a conclusion, whether expressed or generated as text.
Which Manning books explain chain-of-thought?
The Architecture of Reasoning, Inside AI, Sutskever's List, Knowledge Graphs and LLMs in Action, Build a Reasoning Model (From Scratch), Machine Learning Platform Engineering, AI Agents in Action, Natural Language Processing in Action, Second Edition and 13 more.
What should I know before learning chain-of-thought?
Manning books that teach chain-of-thought usually introduce language model, reinforcement learning, fine-tuning and similarity search first.
What is the difference between chain-of-thought and Tree-of-thought?
A chain-of-thought is an ordered sequence of intermediate reasoning steps that connects information or a problem to a conclusion, whether expressed or generated as text. Tree-of-thought is a reasoning technique that explores and evaluates multiple branching paths of intermediate reasoning to develop a solution.
What is chain-of-thought part of?
Chain-of-thought is part of AI agent. An AI agent is a computational system that uses artificial intelligence to interpret information and select or perform actions toward goals while interacting with an environment.
What is chain-of-thought also called?
Chain-of-thought is also called multi-step reasoning, reasoning chain, step-by-step reasoning or CoT.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.




















