Chapter 12. Reasoning Models
In previous chapters, we explored how language models acquire knowledge through pretraining (Chapter 2), how prompting strategies elicit better answers (Chapter 3), how fine-tuning and reinforcement learning shape model behavior ( Chapters 10 and 11), and how RLHF aligns models with human preferences (Chapter 11). This chapter brings these threads together around a single question: can language models reason?
The answer is yes, but not in the same way humans do, and not always reliably.
In this chapter, we discuss how reasoning models work, how they are trained and evaluated, and where they still fail. We begin with the types of reasoning that matter, then examine the techniques that enable them.
Types of Reasoning
Not all reasoning is the same. Reasoning comes in many forms, and LLM capabilities vary across them. Figure 12-1 summarizes the main types and shows where current LLMs tend to be stronger or weaker.
Figure 12-1. Main types of reasoning and where current language models tend to be stronger or weaker.
Deductive reasoning applies general rules to specific cases to reach a logically certain conclusion. “All mammals are warm-blooded. A whale is a mammal. Therefore, a whale is warm-blooded.” LLMs handle simple one- or two-step deductions well, but their performance degrades substantially as the number of chained steps increases. Saparov and ...
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