liveBook · Manning

Multi-step reasoning

As explained in Build a Reasoning Model (From Scratch)

The process of deriving conclusions from premises through explicit inference rather than surface pattern recognition.

Reasoning in large language models means generating intermediate steps before a final answer, rather than jumping directly from prompt to conclusion. These steps may be visible or hidden in special tags, and they can improve performance on complex math, coding, and logic tasks. section 1.1 section 1.0

Reasoning differs from pattern matching and supports several implementation strategies:

  • Pattern matching predicts likely continuations from learned correlations; logical reasoning applies rules to premises, draws implications, and detects contradictions. section 1.4
  • Chain-of-thought prompts or trains the model to produce explicit intermediate steps, which may or may not be shown to users. section 1.1
  • Inference-time scaling increases answer-generation compute without changing model weights by generating longer reasoning, sampling multiple answers, or refining responses. section 4.1
  • Self-consistency samples multiple reasoning paths and selects the most frequent answer, trading higher inference cost for potential accuracy gains. section 4.1

Premises, conclusions, and contradiction

Given “All birds can fly” and “A penguin is a bird,” a closed-world system derives “A penguin can fly.” With background knowledge that penguins cannot fly, a reasoning system should detect the contradiction, request clarification, or weaken the premise. section 1.4

Figure 1.2 A simplified illustration of how a reasoning LLM might tackle a multistep reasoning task using a chain of thought. Rather than just recalling a fact, the model combines several intermediate reasoning steps to arrive at the correct conclusion. The intermediate reasoning steps may or may not be shown to the user, depending on the implementation.

Shows how a reasoning LLM combines intermediate steps to solve a multistep task, while allowing those steps to remain visible or hidden. section 1.1

How Build a Reasoning Model (From Scratch) covers it

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 it assumes
Assumes only cursory knowledge of LLM construction and requires no advanced mathematics, while treating reasoning methods as the central skill.
What you can do after
Evaluate, prototype, and design reasoning improvements using chain-of-thought, self-consistency, and other inference-time methods.
How it connects
Connects reasoning to logical reasoning, pattern matching, chain-of-thought, inference-time scaling, self-consistency, and self-refinement.

Also explained in

Compare how 10 books explain multi-step reasoning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Reasoning Model (From Scratch). The section links point to the parts of the book it draws on.