Understanding Reasoning Models: Guiding LLMs to Think Step by Step
Introduction: Why Reasoning Techniques Matter
In the previous lessons, you learned how large language models (LLMs) generate text by predicting one token at a time and how different model versions can affect the quality of responses. Let's build on that foundation by exploring how you can get even better answers from LLMs — especially for complex or multi-step problems — by guiding them to "think" before answering.
When you ask a model a simple question, it often gives you a direct answer. However, for more complicated tasks, such as solving a math problem or analyzing a scenario, the model can make mistakes if it tries to answer too quickly. This is where reasoning techniques come in. Encouraging the model to break down its thought process can help it arrive at more accurate and logical answers.
Chain of Thought (CoT): The Step-by-Step Approach
The Chain of Thought (CoT) technique is a way to prompt LLMs to solve problems step by step, just like you might do on paper. Instead of asking for a final answer right away, you guide the model to show its reasoning process.
Let's see how this works, starting with a simple math problem.
Suppose you ask:
If you ask this, the model will try to predict the next token. It can't actually do the math; it just predicts something plausible. Sometimes, it gets it right, but often, it makes a mistake, especially with large numbers or multi-step problems.
To help the model, you can add a phrase like Think step by step to your prompt. This tells the model to break down the problem:
But you can be even more helpful by showing the model exactly how to break down the steps. Let's build this up together.
First, you can show the model how to multiply using place value:
Chain of Thought (CoT): Full Example
Now, let's put this into a full prompt, step by step:
In this prompt, we provide the model with a solution example for a different problem and then ask for a solution to an actual problem. This way, we show the model how to "think" properly.
By guiding the model through each step, you help it avoid mistakes and clarify its reasoning. This is the core idea behind Chain of Thought prompting.
You can use this approach for many problems, not just math. For example, you can ask the model to explain its reasoning in logic puzzles, story analysis, or code debugging.

