What you will be able to do
- Explain why asking Claude to reason before answering improves results on multi-step tasks
- Write basic, guided and structured chain-of-thought prompts and pick the right one
- Choose between manual chain of thought and extended thinking, and steer thinking with prompt wording
1.Why reasoning before answering helps
A model that answers in a single pass has to get everything right on the first try: no scratch work, no checking, no changing direction halfway through. For a proof, a hard bug or a multi-step analysis, the first approach often isn't the best one. Chain-of-thought (CoT) prompting removes that limit by asking for step-by-step reasoning before the answer.
The thinking documentation describes what that reasoning does. Claude restates the question, tries approaches, checks intermediate results and drops paths that don't work out. That is why reasoning helps most on maths, coding, analysis and long agentic tasks. In those tasks the answer depends on intermediate work that would otherwise be squeezed into the response or skipped.
The vision cookbook has a small example. Asked to count the dogs in a photo, Claude answered 10 when there were 9. After the prompt was changed, Claude scanned the image left to right inside <thinking> tags and then gave its count in <answer> tags. This time it got 9. Nothing else about the task changed. The only difference was that the counting happened in visible steps instead of all at once.
The blog lists when manual CoT is worth using: the task needs several analytical steps, you want Claude to consider specific factors, you need reasoning you can review, or extended thinking isn't available.
Checkpoint 1 of 5· Check yourself
According to the thinking documentation, why does reasoning before answering improve performance on complex tasks?
Quality on complex tasks depends on intermediate work. Reasoning first makes room for that work instead of compressing it into the answer.
“intermediate work that would otherwise be compressed into the response itself or skipped”Source: platform.claude.com
2.Three ways to write a chain-of-thought prompt
Anthropic's blog describes three ways to write CoT into a prompt, each adding more control than the last. All three use the same task: drafting a personalized fundraising email for a donor. The basic version takes the task prompt and adds a single instruction at the end.
Draft personalized emails to donors asking for contributions to this year's Care for Kids program.
Program information:
<program>
{{PROGRAM_DETAILS}}
</program>
Donor information:
<donor>
{{DONOR_DETAILS}}
</donor>
Think step-by-step before you write the email.Guided CoT says what to think about and in what order. Structured CoT also puts the reasoning and the answer in separate tags. That separation is useful when code consumes the output: your application can extract the <email> block and log or discard the <thinking> block.
| Pattern | What you add to the prompt | Wording from the donor-email example |
|---|---|---|
| Basic | A single instruction to reason first | Think step-by-step before you write the email. |
| Guided | Specific reasoning stages, in order | First, think through what messaging might appeal to this donor given their donation history. Then, consider which aspects of the Care for Kids program would resonate with them. |
| Structured | Tags that separate reasoning from the final answer | Think before you write the email in <thinking> tags. ... write the personalized donor email in <email> tags |
Exact wording matters for any reasoning instruction. The thinking documentation suggests 'This task involves multistep reasoning. Think carefully before responding.' as a phrase that encourages thinking. It also warns that steering can be sensitive to wording: if one phrasing doesn't work, try a more direct one.
Checkpoint 2 of 5· Put it in order
Put the stages of the guided chain-of-thought donor prompt in the order the prompt asks for them
- 1.Consider which aspects of the Care for Kids program would resonate with the donor
- 2.Think through what messaging might appeal to this donor given their donation history
- 3.Write the personalized donor email using the analysis
Guided CoT fixes the order of reasoning: first the donor's likely motivations, then the matching program aspects, then the email built from both.
“First, think through what messaging might appeal to this donor given their donation history.”Source: claude.com
Checkpoint 3 of 5· Exam question
While reviewing a few-shot prompt for a sentiment classifier, an engineer notices that all five included examples are short, positive-sentiment product reviews written in the same sentence structure. Model outputs on negative or mixed reviews are now unreliable. What is the most likely cause and fix?
Correct answer: A — The examples are not diverse enough and Claude has picked up unintended patterns from the repeated structure; add negative, mixed, and structurally varied examples
- A. Correct. Examples must be diverse and cover edge cases so Claude does not pick up unintended patterns; a set that is uniform in sentiment and structure fails to represent the full task and biases outputs toward that pattern.
- B. Incorrect. Missing <thinking> tags is unrelated to a diversity problem; sentiment classification of this kind does not require an intermediate reasoning trace to fix a biased example set.
- C. Incorrect. Simply adding more examples without addressing their lack of diversity would likely reinforce the same unintended pattern rather than correct it.
- D. Incorrect. Example placement relative to instructions affects clarity but does not resolve a root diversity problem in the content of the examples themselves.
3.Manual chain of thought versus extended thinking
Extended thinking builds reasoning into the model call. Claude reasons in thinking content blocks before its text response, without you asking for it in the prompt. The blog says that when extended thinking is available, it is generally preferable to manual CoT. Manual CoT still has a role in two cases: when extended thinking isn't available, and when you need reasoning you can review. The second case matters because the thinking text you get back is a summary, and on many models the default is to omit it. Structured CoT puts the full reasoning into the response itself, inside tags you choose. The blog also says the two methods are complementary: explicit CoT prompting can still help on complex tasks even when thinking is on.
Two cautions apply when thinking is on. First, cost: thinking tokens are billed as output tokens even when the thinking text isn't returned. Second, how detailed your instructions should be. The prompting best practices advise general instructions over prescriptive steps. A prompt like 'think thoroughly' often produces better reasoning than a hand-written step-by-step plan, because Claude's reasoning often goes beyond what a person would write down. Keep guided CoT for cases where you need Claude to cover specific factors. Don't use it as a default way of scripting a model that already reasons well.
You can also steer thinking with plain prompt text. The phrase from the previous section works in a system prompt. Adding a short request to think hard to a single user message encourages thinking on that turn only, which helps when only some requests in a conversation need deep reasoning. The docs treat this like any other prompt change: test it on representative traffic before you ship.
Checkpoint 4 of 5· Check yourself
An auditor needs to review the complete reasoning behind each answer from a pipeline that already has extended thinking enabled. Which approach fits Anthropic's guidance?
Reasoning you can review is one of the listed reasons for manual CoT, and thinking text is only a summary. The blog calls the two approaches complementary, so you don't have to turn thinking off.
“Even when extended thinking is available, explicit CoT prompting can still be beneficial for complex tasks.”Source: claude.com
Checkpoint 5 of 5· Exam question
An engineer is building a Claude prompt that analyzes several long internal documents and answers a question about them. Responses sometimes ignore details buried in the middle of the documents. Which of the following changes are consistent with documented long-context prompting guidance? (Select all that apply.)(Select 3)
Correct answers: A, B, D — Place the long documents near the top of the prompt, above the query and instructions; Wrap each document in <document> tags with source and content subtags to structure the input clearly; Ask Claude to quote the relevant passages inside <quotes> tags before producing the final analysis
- A. Correct. Long-form documents should be placed near the top of the prompt, above the query and instructions, which improves performance across models.
- B. Correct. Wrapping each document in structured tags such as <document>, <source>, and <document_content> helps Claude parse multi-document input unambiguously.
- C. Incorrect. Placing the query at the very top, before the documents, contradicts documented guidance; queries placed at the end can improve response quality, especially with complex multi-document inputs.
- D. Correct. Asking Claude to quote relevant passages before analysis grounds the response and helps it cut through noise in long documents.
- E. Incorrect. Long-context guidance explicitly addresses multi-document analysis via structured tags rather than requiring the input to be reduced to a single document.
- F. Incorrect. Removing XML structure works against the documented recommendation to use tags for clarity when handling multiple documents and metadata.
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.Once extended thinking exists, chain-of-thought prompting is obsolete and should never be combined with it.Why is that wrong?
Extended thinking is generally preferred when it is available, but manual CoT is still useful for reasoning you can review, and the blog calls the two complementary.
2.A detailed hand-written plan of reasoning steps always beats a general instruction to think.Why is that wrong?
The prompting best practices advise general instructions over prescriptive steps. A general request to think thoroughly often gives better reasoning than a scripted plan.
3.Thinking that isn't returned in the response costs nothing.Why is that wrong?
Thinking tokens are billed as output tokens even when the thinking text isn't returned.
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“it restates what is being asked, tries approaches, checks intermediate results, and abandons paths that do not hold up”
↩︎ Why reasoning before answering helps“the tokens Claude spends reasoning are billed as output tokens, even when the thinking text isn't returned to you”
↩︎ Manual chain of thought versus extended thinking“the tokens Claude spends reasoning are billed as output tokens, even when the thinking text isn't returned to you”
↩︎ Exam trap 3“intermediate work that would otherwise be compressed into the response itself or skipped”
↩︎ Checkpoint“what you see is never the raw chain of thought: the text in a thinking block is a summary of Claude's reasoning”
↩︎ Prediction - 2.https://claude.com/blog/best-practices-for-prompt-engineeringSecondary source
“Chain of thought (CoT) prompting involves requesting step-by-step reasoning before answering.”
↩︎ Why reasoning before answering helps“Use tags to separate reasoning from the final answer.”
↩︎ Three ways to write a chain-of-thought prompt“When available, extended thinking is generally preferable to manual chain of thought prompting.”
↩︎ Manual chain of thought versus extended thinking“The two approaches are complementary, not mutually exclusive.”
↩︎ Exam trap 1“First, think through what messaging might appeal to this donor given their donation history.”
↩︎ Checkpoint“Even when extended thinking is available, explicit CoT prompting can still be beneficial for complex tasks.”
↩︎ Checkpoint - 3.
“There's only 9 dogs but Claude thinks there is 10!”
↩︎ Why reasoning before answering helps - 4.
“This task involves multistep reasoning. Think carefully before responding.”
↩︎ Three ways to write a chain-of-thought prompt“If one phrasing doesn't produce the behavior you want, try a more direct variant.”
↩︎ Three ways to write a chain-of-thought prompt“Per-message steering is useful when only some requests in a conversation warrant extended reasoning.”
↩︎ Manual chain of thought versus extended thinking - 5.https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practicesOfficial docs
“often produces better reasoning than a hand-written step-by-step plan”
↩︎ Manual chain of thought versus extended thinking“often produces better reasoning than a hand-written step-by-step plan”
↩︎ Exam trap 2