Chain-of-thought prompting

Get Claude to reason step by step for better results on complex tasks

Why Claude sometimes gives shallow answers

On complex, multi-step problems — pricing strategy, debugging, risk analysis — jumping straight to an answer can produce shallow or incorrect results. The solution is to make Claude reason out loud before committing to an answer. This is called chain-of-thought (CoT) prompting, and it measurably improves accuracy on tasks that require multi-step reasoning.

How to trigger it

  • “Think through this step by step before answering”
  • “Walk me through your reasoning”
  • “Before giving your recommendation, work through the tradeoffs”
  • “Show your work”

Example: pricing a project

Without CoT:

How should I price a Shopify rebuild for a client with 2,000 SKUs?
→ Claude gives a range: "$5,000-$15,000 depending on complexity" (shallow, not useful)

With CoT:

I need to price a Shopify rebuild. Think through the key cost drivers step by step before giving me a number.

Details: 2,000 SKU catalog, custom inventory sync with ERP, 3 custom page templates, migration from WooCommerce, client needs ongoing support.

Walk through: (1) what drives cost in each area, (2) risk factors that could blow scope, (3) then give me a pricing range with a rationale.

CoT for decision-making

I'm deciding whether to take on a new client who has a $2,000 budget for a full WooCommerce site.

Before telling me what to do, think through:
- What does $2,000 actually cover realistically?
- What's the risk if scope creeps?
- What's the opportunity cost vs. my current workload?

Then give me your recommendation with the key reason.

Separating reasoning from output

"Work through this internally, then give me only your final recommendation — no need to show the reasoning."

Rule of thumb: If the task has more than two variables that interact, or if being wrong has real consequences, use chain-of-thought. The extra reasoning is worth a slightly longer response.