intermediateChapter 6 of 12

Precognition (Thinking Step by Step)

Chain-of-thought prompting · Thinking tags · Reasoning before answering

Let Claude Think Before Answering

For complex tasks — classification, math, analysis — Claude performs better when it reasons through the problem before giving a final answer. This is called chain-of-thought prompting.

The Scratchpad Pattern

Ask Claude to work through its reasoning in <thinking> tags, then give the final answer in <answer> tags:

Classify this support email. First, think through the reasoning 
in <thinking> tags. Then give your final classification in <answer> tags.

This separation has two benefits:

  1. Better accuracy — reasoning first leads to better conclusions.
  2. Inspectable logic — you can see why Claude made a decision.

When to Use It

  • Classification tasks with ambiguous cases
  • Math or logic problems
  • Multi-step analysis
  • Any task where you want to audit the reasoning

Key Takeaways

  • Ask Claude to think step-by-step in <thinking> tags before answering.
  • Put the final answer in <answer> tags for clean extraction.
  • This pattern dramatically improves accuracy on complex or ambiguous tasks.

Exercises