Chapter 3. Reasoning Large Language Models
LLMs such as DeepSeek-R1, OpenAI GPT-5, and Google Gemini are prime examples of how LLMs can be scaled to new heights through reasoning frameworks. Reasoning in LLMs attempts to mimic human thinking by generating thoughts through tokens before giving a final answer. As shown in Figure 3-1, these tokens explain LLMs’ chain-of-thought and allow reasoning LLMs to break down a problem into smaller steps (often called reasoning steps or thought processes).
Figure 3-1. The differences between a non-reasoning and reasoning LLM
Reasoning LLMs first “think” and generate intermediate information before finally answering the query.
Interestingly, the differences between non-reasoning and reasoning LLMs can be viewed through the lens of human cognition, specifically System 1 and System 2 thinking from Daniel Kahneman’s dual-process theory,1 which describes two modes of human cognition.
System 1, in human cognition, operates automatically and quickly, relying on intuition and learned associations to make snap judgments. Non-reasoning LLMs operate much like System 1 thinking and generate responses quickly based on patterns they learned during training. They produce immediate answers without step-by-step (explicit) thinking.
System 2, in human cognition, engages in slower, more deliberate reasoning that requires conscious effort and attention. Reasoning ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access