Chain of Thought (CoT) used in AI models
What is Chain of Thought and how does it work?
The Chain of Thought (CoT) is a technique used in AI models, especially language models, to enhance their reasoning and problem-solving abilities. Instead of immediately providing a direct answer, the model follows a series of intermediate steps, much like the logical process a person would go through when dealing with a complex problem.
The idea behind CoT is simple: by making the model’s reasoning process explicit, you get more accurate and coherent answers, especially when tackling problems that require multiple steps or involve abstract concepts, such as math or language tasks. It’s like the model is "thinking out loud," allowing you to follow each step that leads to the final solution.
For example, if the model is asked to solve a math problem, it doesn’t just give the answer but breaks down each calculation and step in the reasoning process. This approach is particularly useful for complex problems, improving not just accuracy but also the transparency of how the decision is made.
Imagine asking the model to solve a mathematical equation. Instead of simply providing the result, it explains the process step by step, starting with simplifying terms and continuing through to the final calculation. This makes the solution easier to understand and allows you to check for any logical or calculation errors along the way.
A practical example
To use this technique with LLMs, you can simply add prompts like "Describe your reasoning step by step" or "Explain your answer in detail." These prompts encourage the model to break down the solution into a series of logical steps instead of just giving the final answer.
Let’s say a user is trying to solve a complex problem that requires logical reasoning.
Prompt
Giulia hangs 5 shirts out in the sun, and they dry completely in 1 hour. Assuming the conditions remain the same, how long would it take for 15 shirts to dry? Explain your reasoning step by step.
Here’s the step-by-step reasoning the LLM followed to solve this problem using the Chain of Thought (CoT) technique:
LLM Response
- Step 1: Evaluate the drying time for 5 shirts
We know that Giulia hangs 5 shirts, and they dry completely in 1 hour. This drying time refers to the process under the sun, and the number of shirts doesn’t affect the drying time since the sun can act on all of them at once. - Step 2: Confirm the assumption that drying time doesn’t depend on the number of shirts
Since the conditions remain the same and the sun affects all the shirts simultaneously, adding more shirts (as long as there’s enough space) doesn’t increase the drying time. Each shirt gets the same exposure to the sun as if there were only 5 shirts. - Step 3: Apply the same logic to 15 shirts
Since 5 shirts dry in 1 hour and drying time depends on the environmental conditions, not the number of shirts (as long as there’s space), we can conclude that 15 shirts will also dry in 1 hour. - Conclusion:
Even if Giulia hangs 15 shirts instead of 5, the drying time remains the same—1 hour—because the sun dries all the shirts simultaneously, and the conditions haven’t changed.
This reasoning shows that the number of shirts doesn’t affect the drying time, provided they’re all exposed to the sun at the same time. By breaking down the problem into logical steps, the LLM ensures that every detail is considered and clearly explained.
Asking for a step-by-step explanation is what activates the Chain of Thought mode in a language model. This type of prompt not only encourages the model to provide a more detailed and thought-out answer but also allows you to examine how the model processes the information, resulting in more accurate and transparent solutions.
Overall, Chain of Thought helps tackle complex problems with greater reliability by making the reasoning behind the answer clear and easy to follow.

