Get startedGet started for free

Enabling reasoning with DeepSeek

1. Reasoning with DeepSeek

Let's now take a look at DeepSeek's reasoning mode!

2. Chatting vs. reasoning

Chat mode is designed to predict the next word in the conversation. It's great for anything from ad-hoc question-answering all the way to workflow automations. However, it struggles with more involved tasks that require deep analysis or multiple problem-solving steps, like coding and math. In reasoning mode, the same model breaks complex tasks into smaller, structured steps that greatly improve the likelihood of arriving at the final answer. Let's illustrate this difference with an example.

3. Reasoning and math

A train travels 60 miles in 1.5 hours. If it continues at the same speed, how far will it travel in 4 hours, and what time will it arrive if it leaves at 2:15PM? In chat mode, the model might impatiently generate a straight prediction, or perhaps the text to help it find the answer, but with reasoning enabled, the model would likely break it down into the following steps:

4. Reasoning and math

It would first calculate the average speed of the train, as the problem indicates the train continues at this speed. Then, it would calculate the distance it would cover in that time by multiplying by four hours, and add four hours to the original departure time. Finally, it responds with the correct answer.

5. Reasoning about reasoning

Throughout this process, the model is generating additional "thinking" tokens to help it decide what to do, doing it, and then updating its knowledge to help it move forward or iterate. Here's the surprising part:

6. Reasoning is on by default

DeepSeek reasons by default. The requests you've already been writing have been triggering reasoning under the hood. Let's send our train problem and see what comes back.

7. Reasoning mode output

Here's the model's response — accessed the same way as before, on the message's content attribute. Notice how the model lays out the reasoning as numbered steps before giving the final answer. The thinking and the conclusion arrive together in a single, structured response.

8. Disabling reasoning

Reasoning is enabled by default, but you can also opt out entirely to force the pure "chat mode" behavior. Pass the extra body argument with a thinking object whose type is set to disabled, and the model returns a quick, conversational response with no step-by-step structure. This is what we'd call chat mode — useful when you want a fast lookup or a short, direct reply, and don't need the model to work through the problem.

9. Cranking up the effort

For most problems, the default reasoning is plenty. But for genuinely hard tasks — deep math, intricate code, multi-step research — set reasoning effort to max and the model will spend longer working through each step. Beware that this often results in a substantial increase in cost, so it's worth testing at lower reasoning efforts first. The response shape doesn't change — you still read the answer off the message content attribute — but the structured reasoning tends to be more detailed.

10. Let's practice!

Now it's your turn to give this a try!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.