AI & LLMs Intermediate

Reasoning in LLMs — Chain of Thought, Extended Thinking, and When to Use Them

Reasoning models think before answering. Here's how chain-of-thought prompting works, what Anthropic's extended thinking does differently, and when the extra cost is worth it.

DjangoZen Team May 09, 2026 15 min read 165 views

Language models can do more than produce an immediate answer — they can be prompted or designed to reason through a problem step by step before responding, which dramatically improves their performance on complex tasks. Techniques like chain-of-thought prompting and the extended-thinking modes of modern models harness this, but they come with tradeoffs in cost and speed. Understanding how model reasoning works and when to use it is key to applying these capabilities effectively rather than indiscriminately.

Immediate answers versus reasoning

By default, a language model produces an answer directly, generating its response immediately. For simple tasks this is fine, but for complex problems requiring multiple steps of logic, jumping straight to an answer often leads to mistakes, much as a person blurting out an answer to a hard problem without thinking it through would. Reasoning techniques address this by having the model work through the problem step by step before giving a final answer. Understanding the distinction between an immediate response and a reasoned one — and that complex problems benefit from the latter — is the foundation for knowing when and how to invoke a model's reasoning capabilities.

Chain-of-thought prompting

Chain-of-thought is a technique where you prompt the model to show its reasoning, working through a problem step by step rather than answering immediately. Simply asking the model to think through the steps, or to explain its reasoning before answering, often improves accuracy on complex tasks substantially. By generating the intermediate steps, the model effectively works the problem out rather than guessing the answer. Understanding chain-of-thought as the practice of prompting the model to reason explicitly — to lay out the steps toward an answer — is valuable because it is a simple prompting change that meaningfully improves performance on problems that need logic, calculation, or multi-step thinking.

Why reasoning improves accuracy

Reasoning step by step works because it lets the model break a complex problem into manageable pieces and build toward the answer, with each step grounded in the previous ones, rather than trying to leap to a conclusion in one go. Generating the intermediate reasoning gives the model more to work with and a structured path, reducing the errors that come from skipping steps. It mirrors how careful human problem-solving decomposes a hard problem. Understanding why reasoning helps — that it provides structure and intermediate grounding rather than demanding a single leap — explains when it will help most: on problems complex enough that the steps matter and a direct answer is error-prone.

Extended thinking modes

Modern models increasingly offer built-in extended-thinking or reasoning modes, where the model is designed to think more deeply before responding, spending additional effort on internal reasoning for hard problems. Rather than you having to prompt for step-by-step reasoning, the model does extended reasoning as a capability, often producing markedly better results on difficult tasks. Understanding that these dedicated reasoning modes exist — that models can be invoked to think harder for complex problems — is important because they represent a powerful tool for tasks that genuinely need deep reasoning, available as a feature rather than only as a prompting technique, with their own tradeoffs to weigh.

When reasoning helps most

Reasoning techniques help most on tasks that are genuinely complex: multi-step problems, logical reasoning, mathematical or analytical work, careful analysis, and situations where the path to the answer matters. For these, the improvement from reasoning can be substantial. The corollary is that for simple, direct tasks — a quick lookup, a straightforward generation — reasoning adds little benefit while costing more time and money. Understanding which tasks benefit — the genuinely complex ones — is the key judgment, because applying reasoning where it helps yields better results, while recognizing where it does not avoids paying its costs needlessly on tasks that a direct answer handles perfectly well.

The costs of reasoning

Reasoning is not free. Having the model generate reasoning steps or think extensively means producing more text and doing more work, which costs more — both in money, since you typically pay per token and reasoning generates many, and in time, since it takes longer to produce a reasoned response. For complex problems where reasoning meaningfully improves the result, this cost is well justified; for simple ones, it is waste. Understanding the cost and latency tradeoff is essential to using reasoning wisely, because the goal is to apply it where the improvement justifies the expense, not everywhere, which would slow your application and inflate costs for no benefit on tasks that did not need it.

When not to use reasoning

Just as important as knowing when to use reasoning is knowing when not to. For simple, direct tasks — quick classifications, straightforward generations, lookups — reasoning adds cost and latency without improving the result, because there is no complex path to reason through. Defaulting to reasoning everywhere makes an application slower and more expensive than it needs to be. Understanding that reasoning is a targeted tool for complex problems, not a universal upgrade, prevents this overuse. Matching the approach to the task — direct answers for simple tasks, reasoning for complex ones — is the discipline that keeps your AI features both effective and efficient.

Guiding the reasoning

Beyond simply asking a model to reason, you can guide how it reasons — suggesting an approach, asking it to consider specific factors, or structuring the steps you want it to work through. For complex tasks, providing a helpful structure for the reasoning can improve results further than an unguided request. This is an extension of prompt design applied to the reasoning process itself. Understanding that you can shape not just whether the model reasons but how — directing its problem-solving approach — gives you finer control over difficult tasks, letting you help the model reason in the way most likely to reach a good answer for the specific kind of problem at hand.

Applying reasoning in your application

In practice, applying reasoning means deciding, per feature, whether the task is complex enough to benefit. For a feature handling genuinely hard problems — complex analysis, multi-step logic — invoking reasoning, whether through chain-of-thought prompting or a model's extended-thinking mode, will improve quality and is worth the cost. For features handling simple tasks, a direct approach is faster and cheaper. You might even route different requests differently based on complexity. Understanding that the practical skill is matching the reasoning approach to each task's complexity — applying it where it pays off — is what lets you use these powerful capabilities to genuinely improve your application without slowing it down or inflating costs unnecessarily.

How to prompt for reasoning

Invoking chain-of-thought is often as simple as instructing the model to think through the problem step by step, or to explain its reasoning before giving a final answer. This straightforward instruction prompts the model to generate the intermediate steps that improve its accuracy. You can also ask it to break the problem into parts or to work through it carefully. Understanding that prompting for reasoning can be this simple — a clear instruction to reason step by step — makes the technique immediately accessible, since you do not need anything elaborate to gain the accuracy benefit on complex tasks, just a prompt that directs the model to work through the problem rather than answer at once.

Separating reasoning from the answer

When a model reasons before answering, you often want to present only the final answer to the user, not the lengthy reasoning. A practical pattern is to have the model reason and then clearly give its conclusion, so you can extract the final answer to display while the reasoning served its purpose of improving accuracy. This lets you get the benefit of reasoning without showing users the full working. Understanding that you can separate the model's reasoning process from the answer you present — using the reasoning to improve quality while displaying only the conclusion — is a practical detail that lets you apply reasoning techniques cleanly within a user-facing feature.

Reasoning aids verification

A side benefit of having a model show its reasoning is that you can inspect the steps to judge whether the answer is trustworthy. If the reasoning is sound, you have more confidence; if it contains an obvious error, you know to be skeptical. This transparency into how the model reached an answer is valuable for tasks where correctness matters, giving you a check beyond the bare conclusion. Understanding that visible reasoning supports verification — letting you or a reviewer assess the path to the answer, not just the answer itself — is an additional reason reasoning techniques are useful for important or complex tasks where you want to trust, but also verify, the result.

Balancing quality, cost, and speed

Using reasoning in practice is an exercise in balancing three things: the quality improvement it brings, the additional cost it incurs, and the extra time it takes. For a complex, important task, the quality gain justifies the cost and latency. For a simple or high-volume task, the costs may outweigh a marginal benefit. Finding the right balance for each feature — applying reasoning where its quality benefit is worth the cost and speed tradeoff — is the practical judgment that makes these techniques valuable rather than wasteful. Understanding that the decision is this three-way balance helps you deploy reasoning where it genuinely pays off, keeping your AI features both high-quality where it matters and efficient where it does not.

Summary

Language models can reason through problems step by step before answering, which substantially improves their performance on complex tasks, and you harness this through chain-of-thought prompting — asking the model to show its reasoning — or through the built-in extended-thinking modes of modern models. Reasoning works because it lets the model decompose a hard problem and build toward the answer with intermediate grounding, rather than leaping to a conclusion, which is why it helps most on genuinely complex, multi-step, logical, or analytical tasks. But reasoning costs more in both money and time, since it generates more text and takes longer, so it is a targeted tool, not a universal upgrade: for simple, direct tasks it adds expense and latency without benefit. The key skill is matching the approach to the task — invoking reasoning where the problem's complexity justifies it and using direct answers where it does not — and you can further guide how the model reasons for difficult problems. Applied with this judgment, reasoning techniques let you meaningfully improve your AI features on hard tasks while keeping them efficient on easy ones.