AI Model Wiki

    Skip to main content
    5 min read
    Lesson 4 of 6

    Extended Thinking & Complex Reasoning

    From the course Anthropic Claude for Enterprise

    Extended thinking lets Claude show its reasoning process, dramatically improving performance on complex tasks.

    How Extended Thinking Works

    When enabled, Claude thinks step-by-step before responding:

    1. Receives your prompt
    2. Generates internal "thinking" tokens (visible to you)
    3. Works through the problem methodically
    4. Produces a well-reasoned final answer

    When to Use Extended Thinking

    • Complex math and logic — Multi-step calculations, proofs, optimization
    • Code debugging — Tracing through complex code paths
    • Strategic analysis — Evaluating multiple options with tradeoffs
    • Research synthesis — Connecting information from multiple sources
    • Legal/financial analysis — Tasks requiring careful, precise reasoning

    Extended Thinking via API

    response = client.messages.create(
        model="claude-sonnet-4-20250514",
        max_tokens=16000,
        thinking={
            "type": "enabled",
            "budget_tokens": 10000
        },
        messages=[{"role": "user", "content": "Analyze the pros and cons of microservices vs monolith for a 10-person startup"}]
    )
    

    Budget Tokens

    You control how much "thinking time" Claude gets:

    • 5,000 tokens — Quick analysis, simple problems
    • 10,000 tokens — Standard complex reasoning
    • 50,000+ tokens — Deep analysis, multi-faceted problems

    More thinking tokens = better reasoning but higher latency and cost.

    Tips for Extended Thinking

    • Enable it for anything requiring multi-step reasoning
    • Review the thinking output to understand Claude's logic
    • If the answer seems wrong, increase the budget tokens
    • Combine with system prompts that specify reasoning frameworks

    Real-World Extended Thinking Use Case

    A venture capital firm uses extended thinking to analyze startup pitch decks. The system prompt specifies a framework: assess market size, competition, team quality, unit economics, and funding ask reasonableness. With 15,000 budget tokens, Claude reads a 30-page pitch and produces a structured memo that junior analysts previously took four hours to write — with reasoning steps visible so the analyst can verify the logic. The firm reports 70% time savings on first-pass deal screening, with analysts spending their time on the 20% of deals the AI flags as high-interest.

    Pitfall: Extended Thinking and Token Costs

    Extended thinking budget tokens count toward your input token bill. A 50,000-token thinking budget on every user query will quickly become expensive at scale. Reserve extended thinking for genuinely complex analytical tasks where the quality improvement justifies the cost. For routine queries — summarization, simple Q&A, classification — standard mode is faster and 3-5x cheaper. A practical pattern: start with standard mode, detect complexity signals in the response (hedging language, "it depends" framing), and automatically retry with extended thinking for ambiguous cases.

    Key Takeaways

    • •Extended thinking shows Claude's step-by-step reasoning process
    • •Dramatically improves performance on math, logic, debugging, and analysis
    • •Budget tokens control thinking depth — more tokens means deeper reasoning
    • •Review thinking output to understand and verify Claude's logic
    0 of 6 lessons marked complete

    Progress is kept in this browser only.