Skip to content
bits
Prompting that works · Lesson 7 of 10

Let it think

Tutor:

Remember how a reply gets written: one token at a time, each one picked straight after the last. With no scratch space, the model has to get a tricky answer right in a single pass, with no chance to try an approach and back out.

Thinking gives it that scratch space. When thinking is on, Claude works through the problem in thinking blocks first, then writes its answer. It can try an approach, check it and change course. That helps most with maths, logic and multi-step jobs.

Tutor:

On current Claude models, thinking is adaptive: Claude decides whether a question needs thinking, and how much. You steer it with one setting, effort: low, medium, high, and on some models xhigh and max. Higher effort means more thinking, better answers on hard problems, and more cost and wait.

How that plays out depends on the model (as of October 2026). On Claude Fable 5.1 and Opus 5.5, thinking is always on. On Claude Haiku 5.5, it's on unless you switch it off, which you can only do at high effort or below. Its default effort is medium.

import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
const reply = await client.messages.create({
model: "claude-haiku-5-5",
thinking: { type: "adaptive" },
output_config: { effort: "high" },
max_tokens: 16000,
messages: [{ role: "user", content: "Plan a 3-day trip to Kyoto for someone who hates crowds." }],
});
TypeScriptUTF-8● lines 6–7: highlighted
Tutor:

Two things to know. Thinking tokens are billed as output tokens, the expensive kind. And they count toward max_tokens, so leave room, or the answer gets cut off.

Tutor:

What do you write in the prompt? Less than you'd think.

Say “think carefully”, not how. Anthropic finds that a general nudge often gets better reasoning than a step-by-step plan you wrote by hand. Claude's own approach is often better than the one you'd prescribe.

Ask it to check its work. End with something like “Before you answer, check it against these requirements: …”. That catches mistakes, especially in maths and code.

Show worked examples. Examples (lesson 3) shape how Claude thinks, too.

quick check+20 neurons
Tutor:

Your app runs Claude Opus 5.5 and gets hard questions wrong. You want more careful reasoning. What do you change?

    Type your answer or tap an option · Enter checks

    Tutor:

    When thinking is off. This sandbox runs Claude Haiku 5.5 with thinking switched off and effort at low, to keep every run small and cheap. With thinking off, Anthropic's fallback still works: ask Claude to reason through the problem in its reply before answering, and to put the final answer in <answer> tags so your code can find it. (On models where thinking is always on, skip this and rely on thinking.)

    Here's a small puzzle with a trap in it. Meeting A runs 9 to 10, B runs 10 to 11, and C runs 11 to 11. Which ones overlap? Ask Claude to reason first, and to give the answer in tags.

    Your turn

    Run your prompt and the replies land here.

      • Includes the meetings, not yet
      • Asks it to reason first, not yet
      • Asks for <answer> tags, not yet
      • Ran at 1.0, not yet
      run at
      ~0 tokens

      Turn on JavaScript to run prompts.

      Tutor:

      Check the answer yourself: A and B overlap from 10:15 to 10:25, and B and C only touch at 11:00. Claude Haiku 5.5 often gets this one right even without the reasoning, so don't expect a dramatic difference on a puzzle this small. The habit pays off on harder problems, and the <answer> tags pay off every time: your code can read the answer and skip the working.