Patterns
๐Ÿ”—

Chain-of-Thought(CoT)

Breaks down complex problems into step-by-step intermediate reasoning steps

Complexity: lowReasoning Techniques

Video Explanation

Loading video explanation...

๐ŸŽฏ 30-Second Overview

Pattern: Generate explicit step-by-step reasoning before final answer

Why: Makes reasoning transparent, improves accuracy on complex problems, enables error detection

Key Insight: Add 'Let's think step by step' trigger + numbered reasoning steps โ†’ 2-5x accuracy gain

โšก Quick Implementation

1Prompt Setup:Add "Let's think step by step" trigger
2Examples:Provide 2-3 reasoning examples
3Structure:Number each reasoning step clearly
4Verify:Check logical flow & calculations
5Conclude:State final answer explicitly
Example: Problem โ†’ Step 1: [reasoning] โ†’ Step 2: [reasoning] โ†’ Answer: [result]

๐Ÿ“‹ Do's & Don'ts

โœ…Use consistent step numbering (Step 1, Step 2, etc.)
โœ…Include verification steps for calculations
โœ…Provide diverse few-shot examples
โœ…Break complex problems into sub-problems
โœ…Use clear reasoning triggers ("Let's think...")
โŒSkip intermediate steps for "obvious" calculations
โŒUse CoT for simple, direct questions
โŒIgnore token cost increase (2-5x overhead)
โŒMake reasoning steps too verbose or redundant
โŒForget to validate logical consistency

๐Ÿšฆ When to Use

Use When

  • โ€ข Complex mathematical problems
  • โ€ข Multi-step logical reasoning
  • โ€ข Decision-making with trade-offs
  • โ€ข Educational/explainable AI
  • โ€ข When accuracy > speed

Avoid When

  • โ€ข Simple factual questions
  • โ€ข Real-time/low-latency needs
  • โ€ข Creative/subjective tasks
  • โ€ข Tight token budgets
  • โ€ข When implicit reasoning works

๐Ÿ“Š Key Metrics

Reasoning Accuracy
Correct final answers vs baseline
Step Correctness
Valid intermediate reasoning steps
Token Efficiency
Accuracy gain per token increase
Interpretability
Human rating of reasoning clarity
Consistency Rate
Agreement across multiple chains
Error Attribution
Ability to identify wrong steps

๐Ÿ’ก Top Use Cases

Math Word Problems: "If a train travels 60 mph for 2 hours..." โ†’ step-by-step calculation
Logic Puzzles: Multi-conditional problems requiring systematic elimination
Code Debugging: Trace execution path step-by-step to find errors
Financial Analysis: Break down ROI calculations with intermediate steps
Medical Diagnosis: Systematic symptom analysis โ†’ differential diagnosis

References & Further Reading

Deepen your understanding with these curated resources

Contribute to this collection

Know a great resource? Submit a pull request to add it.

Contribute

Patterns

closed

Loading...

Built by Kortexya