Chain-of-Thought (CoT) tells the model to think step by step — one linear path. But some problems have multiple valid approaches, and the best answer requires exploring several, evaluating each, and choosing the strongest.
Tree of Thought (ToT) makes the model explore multiple reasoning branches in parallel, evaluate each intermediate step, backtrack from dead ends, and converge on the best path.
The pattern: decompose → explore multiple paths → evaluate each → prune losers → continue best path → synthesize.
This is overkill for simple tasks. It's transformative for strategy, architecture decisions, root cause analysis, and any problem where the first plausible answer isn't necessarily the best one.
I need to add real-time notifications to a B2B project management tool (Go backend, PostgreSQL, 2,000 concurrent users, 2-person eng team, hosted on Railway).
Use a Tree-of-Thought approach:
Step 1 — Generate 3 distinct approaches: Propose 3 architecturally different solutions for real-time notifications. Each must be genuinely different in technology and trade-offs, not variations of the same idea.
Step 2 — Evaluate each on these criteria (score 1–5):
Step 3 — Eliminate: If any approach has a score of 1 on any criterion, eliminate it and explain the fatal flaw.
Step 4 — Develop the winner: For the winning approach, provide: architecture diagram (text), implementation sequence (what to build first), and the 3 biggest risks with mitigations.
Format the evaluation as a comparison table.
Our Go API's P95 latency jumped from 120ms to 1,400ms yesterday at 3 PM. No code was deployed. 2,000 RPM. PostgreSQL on Railway.
Use a Tree-of-Thought diagnostic approach:
Step 1 — Generate 4 hypotheses for what could cause a 10× P95 spike with no code deployment. Each must be a different category of failure.
Step 2 — For each hypothesis, list:
Step 3 — Rank by:
Step 4 — Give me a diagnostic runbook: Ordered steps to systematically confirm or eliminate each hypothesis, starting with the highest probability × fastest to check.
Context: I have access to Railway logs, PG slow query log (500ms threshold), Go pprof, and Grafana dashboards.
Claude excels at structured multi-path reasoning. Use numbered approaches and ask it to 'evaluate each against these criteria before choosing.' Claude will genuinely explore alternatives rather than rushing to one answer.