PromptForge
Prompt library

Chain-of-Thought Prompting — Claude

ClaudeFundamentals From a course

Asking a model to "think step by step" before answering measurably improves accuracy on reasoning, math, and multi-step logic tasks because it forces the model to externalize intermediate steps instead of jumping to a guess..

The prompt

Before answering, list the 3 possible root causes of this bug, evaluate each against the stack trace below, then state which is most likely and why.

[paste stack trace]

What to replace

Swap these placeholders for your own details before running the prompt:

  • [paste stack trace]your own value

Pro tip: Chain-of-thought helps most on math, logic, debugging, and multi-criteria decisions — skip it for simple factual lookups, it just adds noise.

How to use this prompt

  1. Copy the prompt using the button above.
  2. Replace [paste stack trace] with your own details — the more specific you are, the better the output.
  3. Paste it into Claude and run it.
  4. If the answer feels generic, add constraints: audience, length, tone, and what to avoid. That single change fixes most weak output.

Learn the technique

Chain-of-Thought Prompting

Module 2 — Core Techniques · Prompt Engineering Fundamentals

Related prompts