CertSafari
    Anthropic Claude Certified Architect – Professional (CCAR-P)· Lessons

    Domain 2 · Lesson 9/38

    Chain-of-thought prompting and extended thinking

    Apply prompt engineering techniques

    9 min read
    2.6% of exam
    5 sources
    Published 4 Oct 2026
    Docs as of 30 Sep 2026

    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?

    Sources123

    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.

    Basic chain of thought: the task, its inputs in tags, and one closing instruction to reason firsttext
    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.

    The three chain-of-thought patterns from Anthropic's prompt-engineering blog
    PatternWhat you add to the promptWording from the donor-email example
    BasicA single instruction to reason firstThink step-by-step before you write the email.
    GuidedSpecific reasoning stages, in orderFirst, 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.
    StructuredTags that separate reasoning from the final answerThink 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. 1.Consider which aspects of the Care for Kids program would resonate with the donor
    2. 2.Think through what messaging might appeal to this donor given their donation history
    3. 3.Write the personalized donor email using the analysis

    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?

    Sources42

    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?

    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)

    Sources2541

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 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.

      Covered in Manual chain of thought versus extended thinking

    2. 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.

      Covered in Manual chain of thought versus extended thinking

    3. 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.

      Covered in Manual chain of thought versus extended thinking

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 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. 2.
      “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. 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
    4. 5.
      “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

    Ready to test yourself?

    Practise the 12 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.