askill
thought-based-reasoning

thought-based-reasoningSafety 90Repository

Use when tackling complex reasoning tasks requiring step-by-step logic, multi-step arithmetic, commonsense reasoning, symbolic manipulation, or problems where simple prompting fails — provides Chain-of-Thought and related techniques with decision matrix.

0 stars
1.2k downloads
Updated 2/3/2026

Package Files

Loading files...
SKILL.md

Thought-Based Reasoning Techniques

Quick Reference

TechniqueWhen to UseAccuracy Gain
Zero-shot CoTQuick reasoning, no examples+20-60%
Few-shot CoTHave good examples, need consistency+30-70%
Self-ConsistencyHigh-stakes, need confidence+10-20% over CoT
Tree of ThoughtsComplex problems needing exploration+50-70% on hard tasks
Least-to-MostMulti-step with clear subproblems+30-80%
ReActTasks needing external information+15-35%
PALMath/computation (code execution)+10-15%
ReflexionIterative improvement from errors+10-20%

Decision Matrix

Need examples? ─No──→ Zero-shot CoT ("Let's think step by step")
                │                    │
               Yes              Need higher accuracy?
                │               /            \
          Few-shot CoT        Yes             No → Done
                │               │
          Need computation?   Self-Consistency (5-10 samples, majority vote)
                │                    │
               Yes              Still not enough?
                │               /            \
               PAL            Yes             No → Done
                              │
                    Problem decomposable?
                    /                    \
                  Yes                    No
                   │                      │
             Least-to-Most          Need exploration?
                                    /            \
                                  Yes             No
                                   │               │
                            Tree of Thoughts   Need external info?
                                               /            \
                                             Yes             No
                                              │               │
                                            ReAct        Need iteration?
                                                         /           \
                                                       Yes            No
                                                        │              │
                                                    Reflexion       Use CoT

Core Techniques

1. Zero-shot CoT

Append "Let's think step by step" — no examples needed.

Variants: "Let's break this down." / "Let's approach this systematically." / "First, let me understand the problem..."

2. Few-shot CoT

Provide 2-5 examples with intermediate reasoning steps (not just Q→A).

Q: Roger has 5 tennis balls. He buys 2 cans of 3. How many now?
A: Started with 5. 2 cans × 3 = 6. 5 + 6 = 11. The answer is 11.

Q: [YOUR QUESTION]
A:

3. Self-Consistency

Sample N responses (temp > 0), extract answers, majority vote.

  • 5-10 samples minimum. Diminishing returns past ~20.
  • Provides confidence measure (agreement level).

4. Tree of Thoughts (ToT)

Tree search over reasoning paths with self-evaluation at each node.

  • Generate 3-5 candidate next steps
  • Evaluate each: "sure" / "maybe" / "impossible"
  • BFS/DFS with beam width, prune "impossible"
  • Use for: puzzles, creative tasks, problems where CoT gets <50%

5. Least-to-Most

Two stages: decompose → solve sequentially.

  1. "To solve X, we need to first solve: [subproblem A], then [subproblem B]"
  2. Solve A → use answer in B → use answer in C → final answer

6. ReAct (Reasoning + Acting)

Interleave Thought → Action → Observation loops.

Thought 1: I need to find X
Action 1: Search[X]
Observation 1: [result]
Thought 2: Now I need Y based on what I learned
Action 2: Search[Y]
...
Action N: Finish[answer]

Reduces hallucination by grounding in external knowledge.

7. PAL (Program-Aided)

Generate Python code instead of natural language reasoning. Execute for answer.

  • Eliminates arithmetic errors
  • Requires code interpreter
  • Best for: math, symbolic manipulation, data processing

8. Reflexion

After failure: generate verbal reflection → store in memory → retry with insights.

Attempt 1: [failed]
Reflection: Failed because X. Next time I should Y.
Attempt 2: [uses reflection, succeeds]

Achieves 91% on HumanEval (vs GPT-4's 80%).

Task → Technique Matching

Task TypeBest Techniques
Math/LogicCoT, PAL, Self-Consistency
Multi-hop QAReAct, Least-to-Most
Creative/PuzzlesTree of Thoughts
Code generationPAL, Reflexion
Iterative tasksReflexion
General reasoningZero-shot CoT → Few-shot CoT

Combining Techniques

  • ReAct + Self-Consistency → robust factual answers
  • ToT + PAL → complex computational exploration
  • Least-to-Most + Reflexion → hard multi-step problems

Common Mistakes

MistakeFix
CoT for simple lookupsReserve for multi-step reasoning
Too few Self-Consistency samplesUse 5-10 minimum
Generic "think step by step" without validating outputCheck reasoning quality, not just presence
ToT on linear problemsUse only when exploration/backtracking needed
PAL without code executionEnsure interpreter is available
Poor few-shot exemplarsValidate examples actually solve correctly

Best Practices

  1. Start simple — Zero-shot CoT first, escalate only if needed
  2. Use clear step markers — "Step 1:", "First,", "Therefore,"
  3. Include diverse exemplars covering edge cases
  4. Add verification — "Let me verify..." at the end
  5. Match cost to stakes — Self-Consistency/ToT only when accuracy matters enough to justify compute

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

96/100Analyzed 2/11/2026

An exceptional technical reference for LLM reasoning strategies, featuring a clear decision matrix, specific implementation examples, and performance benchmarks.

90
98
98
95
92

Metadata

Licenseunknown
Version-
Updated2/3/2026
PublisherJacknelson6

Tags

llmprompting