self-reflecting-chain

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Self-Reflecting Chain Reasoning Methodology

自我反思式链式推理方法论

Purpose: Sequential step-by-step reasoning with deep self-reflection at each step. Unlike parallel exploration (ToT/BoT), this follows a single logical chain, reflects on each step's validity, and backtracks when errors detected.
目的:按顺序逐步推理,每一步都进行深度自我反思。与并行探索方法(ToT/BoT)不同,该方法遵循单一逻辑链,反思每一步的有效性,并在检测到错误时进行回溯。

When to Use Self-Reflecting Chain

何时使用自我反思式链式推理

✅ Use when:
  • Steps have dependencies (Step N depends on Step N-1)
  • Logical reasoning required (mathematical, causal, deductive)
  • Need to trace exact reasoning path
  • Error detection and correction critical
  • Sequential planning (Step A must complete before Step B)
  • Debugging (trace bug through execution flow)
❌ Don't use when:
  • Multiple independent solution paths exist → Use ToT or BoT
  • Need to explore many options in parallel → Use BoT
  • Steps can execute in any order → Don't need sequential reasoning
Examples:
  • "Debug this race condition by tracing execution step-by-step" ✅
  • "Prove this mathematical theorem" ✅
  • "Plan project where each phase depends on previous" ✅
  • "Choose between 5 architectures" (parallel problem - use BoT) ❌

✅ 适用场景:
  • 步骤存在依赖关系(第N步依赖第N-1步)
  • 需要逻辑推理(数学、因果、演绎推理)
  • 需要追踪精确的推理路径
  • 错误检测与修正至关重要
  • 序列规划(步骤A必须在步骤B完成前执行完毕)
  • 调试(通过执行流程追踪bug)
❌ 不适用场景:
  • 存在多条独立的解决方案路径 → 使用ToT或BoT
  • 需要并行探索多种选项 → 使用BoT
  • 步骤可按任意顺序执行 → 无需序列推理
示例:
  • "通过逐步追踪执行流程调试此竞态条件" ✅
  • "证明该数学定理" ✅
  • "规划各阶段依赖前序阶段的项目" ✅
  • "在5种架构中选择"(并行问题 - 使用BoT) ❌

Core Methodology: Chain-Reflect-Backtrack

核心方法论:链式推理-反思-回溯

Step 1: Problem Decomposition

步骤1:问题分解

Objective: Break problem into sequential logical steps
Actions:
  1. Identify starting state
  2. Define goal state
  3. List steps to get from start to goal (sequential order)
  4. Number steps clearly (Step 1, 2, 3...)
  5. Identify dependencies between steps
Example (Debugging):
Start: System crashes when user clicks "Submit"
Goal: Identify root cause

Steps:
1. Trace user action to event handler
2. Check event handler for errors
3. Trace data flow to backend
4. Check backend validation logic
5. Inspect database query execution
6. Identify exact failure point

目标:将问题拆解为按逻辑顺序排列的步骤
操作:
  1. 确定初始状态
  2. 定义目标状态
  3. 列出从初始到目标的步骤(按顺序)
  4. 为步骤清晰编号(步骤1、2、3...)
  5. 识别步骤间的依赖关系
示例(调试):
初始状态:用户点击“提交”时系统崩溃
目标状态:确定根本原因

步骤:
1. 追踪用户操作至事件处理器
2. 检查事件处理器是否存在错误
3. 追踪数据流至后端
4. 检查后端验证逻辑
5. 检查数据库查询执行情况
6. 定位确切的故障点

Step 2: Execute Step N with Deep Reflection

步骤2:执行第N步并进行深度反思

For each step:
  1. Execute: Perform the reasoning/action for this step
  2. State Result: What did you learn/discover?
  3. Self-Reflect: Is this step correct?
  4. Check Validity: Does logic hold? Any assumptions?
  5. Confidence: How confident in this step (0-100%)?
Step Template:
markdown
undefined
针对每一步:
  1. 执行:执行此步骤的推理/操作
  2. 记录结果:你学到/发现了什么?
  3. 自我反思:此步骤是否正确?
  4. 验证有效性:逻辑是否成立?存在哪些假设?
  5. 置信度:你对该步骤的置信度如何(0-100%)?
步骤模板:
markdown
undefined

Step [N]: [Action]

步骤[N]:[操作]

Execution

执行

[Perform the reasoning or analysis]
[执行推理或分析]

Result

结果

[What was discovered/concluded]
[发现/得出的结论]

Self-Reflection

自我反思

  • Confidence: [0-100]%
  • Assumptions: [What assumptions does this step make?]
  • Logic Check: [Is the reasoning sound?]
  • Dependencies: [Does this depend on previous steps being correct?]
  • Potential Errors: [What could be wrong with this step?]
  • 置信度:[0-100]%
  • 假设:[此步骤基于哪些假设?]
  • 逻辑检查:[推理是否合理?]
  • 依赖关系:[此步骤是否依赖前序步骤的正确性?]
  • 潜在错误:[此步骤可能存在哪些问题?]

Decision

决策

  • Proceed to Step [N+1] (confidence ≥70%)
  • ⚠️ Low Confidence but proceeding (60-69%)
  • Backtrack to Step [N-X] (confidence <60%)

---
  • 继续至步骤[N+1](置信度≥70%)
  • ⚠️ 置信度较低但继续(60-69%)
  • 回溯至步骤[N-X](置信度<60%)

---

Step 3: Backtracking Protocol

步骤3:回溯协议

Trigger backtracking when:
  • Step confidence <60%
  • Logic error detected
  • Assumption proven false
  • Result contradicts known facts
  • Dead end reached
Backtracking Process:
  1. Identify error point: Which step was wrong?
  2. Return to that step: Go back to Step N-X
  3. Try alternative: Take different reasoning path
  4. Mark failed path: Document why previous path failed
  5. Resume forward: Continue from corrected step
Backtracking Example:
markdown
undefined
触发回溯的情况:
  • 步骤置信度<60%
  • 检测到逻辑错误
  • 假设被证明不成立
  • 结果与已知事实矛盾
  • 进入死胡同
回溯流程:
  1. 定位错误点:哪一步出现了错误?
  2. 返回至该步骤:回到步骤N-X
  3. 尝试替代方案:采用不同的推理路径
  4. 标记失败路径:记录之前路径失败的原因
  5. 恢复正向推理:从修正后的步骤继续
回溯示例:
markdown
undefined

Step 5: [Attempted reasoning]

步骤5:[尝试的推理]

→ Result: Contradiction detected → Confidence: 25% (contradicts Step 3 result)
Backtrack Decision: Return to Step 3, try alternative interpretation
→ 结果:检测到矛盾 → 置信度:25%(与步骤3的结果矛盾)
回溯决策:返回至步骤3,尝试其他解释

Step 3 (Revised): [Alternative reasoning]

步骤3(修正后):[替代推理]

→ Result: New interpretation consistent → Confidence: 80% → Proceed to Step 4 with revised understanding...

---
→ 结果:新解释前后一致 → 置信度:80% → 基于修正后的理解继续至步骤4...

---

Step 4: Chain Validation

步骤4:链式验证

At each step, validate the entire chain so far:
  1. Forward Consistency: Does Step N follow logically from Step N-1?
  2. Backward Consistency: Do all previous steps still hold given new information?
  3. Assumption Check: Have any assumptions been violated?
  4. Alternative Paths: Should we backtrack and try different approach?
Validation Checklist:
  • Each step's confidence ≥70%
  • No logical contradictions
  • All assumptions explicitly stated
  • Dependencies satisfied
  • No better alternative path obvious

在每一步,验证当前的整个逻辑链:
  1. 正向一致性:步骤N是否能从步骤N-1合理推导?
  2. 反向一致性:结合新信息,所有前序步骤是否仍然成立?
  3. 假设检查:是否有假设被违反?
  4. 替代路径:是否应该回溯并尝试不同方法?
验证清单:
  • 每个步骤的置信度≥70%
  • 无逻辑矛盾
  • 所有假设均已明确说明
  • 依赖关系已满足
  • 未发现更优的替代路径

Step 5: Final Synthesis

步骤5:最终合成

After completing chain:
  1. Trace complete path: List all steps from start to goal
  2. Confidence per step: Show confidence for each step
  3. Overall confidence: Minimum confidence across all steps
  4. Alternative paths explored: Document backtracks and why
  5. Final answer: Clear conclusion with reasoning trace
Synthesis Template:
markdown
undefined
完成逻辑链后:
  1. 追踪完整路径:列出从初始到目标的所有步骤
  2. 各步骤置信度:显示每个步骤的置信度
  3. 整体置信度:所有步骤中的最低置信度
  4. 探索的替代路径:记录回溯操作及原因
  5. 最终结论:清晰的结论及推理轨迹
合成模板:
markdown
undefined

Reasoning Chain Complete

推理链已完成

Complete Path

完整路径

  1. [Step 1] → Result: [X] (Confidence: 85%)
  2. [Step 2] → Result: [Y] (Confidence: 90%)
  3. [Step 3] → Result: [Z] (Confidence: 75%)
  4. [Step 4] → Result: [A] (Confidence: 88%)
  5. [Step 5] → Result: [B] (Confidence: 82%)
  1. [步骤1] → 结果:[X](置信度:85%)
  2. [步骤2] → 结果:[Y](置信度:90%)
  3. [步骤3] → 结果:[Z](置信度:75%)
  4. [步骤4] → 结果:[A](置信度:88%)
  5. [步骤5] → 结果:[B](置信度:82%)

Overall Confidence

整体置信度

Minimum: 75% (Step 3 was lowest) Chain Confidence: 75% (limited by weakest link)
最低值:75%(步骤3为最低) 链式置信度:75%(受限于最薄弱的环节)

Backtracks

回溯记录

  • Backtracked from Step 4 to Step 2 (logic error)
  • Alternative path tried at Step 3 (failed, original was correct)
  • 从步骤4回溯至步骤2(逻辑错误)
  • 在步骤3尝试了替代路径(失败,原路径正确)

Final Conclusion

最终结论

[Answer based on complete reasoning chain]
Reasoning Trace: Step 1 → Step 2 → Step 3 → Step 4 → Step 5 → Conclusion

---
[基于完整推理链的答案]
推理轨迹:步骤1 → 步骤2 → 步骤3 → 步骤4 → 步骤5 → 结论

---

Self-Critique Checklist

自我批判清单

  • Step Independence: Is each step clearly defined?
  • Logical Flow: Does each step follow from previous?
  • Reflection Depth: Did I genuinely reflect on each step (not boilerplate)?
  • Backtracking Used: Did I backtrack when confidence low?
  • Assumptions Explicit: Are all assumptions stated clearly?
  • Weakest Link: Is chain confidence based on weakest step?
  • Alternative Paths: Did I consider other approaches when stuck?

  • 步骤独立性:每个步骤是否定义清晰?
  • 逻辑流:每个步骤是否能从前序步骤推导而来?
  • 反思深度:是否真正对每个步骤进行了反思(而非模板化内容)?
  • 回溯应用:在置信度较低时是否进行了回溯?
  • 假设明确性:所有假设是否都已清晰说明?
  • 最薄弱环节:链式置信度是否基于最薄弱的步骤?
  • 替代路径:陷入困境时是否考虑了其他方法?

Common Mistakes

常见错误

  1. Skipping Reflection: Moving to next step without genuine self-reflection
  2. Ignoring Low Confidence: Proceeding when confidence <60%
  3. Missing Dependencies: Not checking if later steps depend on earlier ones
  4. No Backtracking: Never questioning previous steps when contradictions arise
  5. False Confidence: High confidence without justification
  6. Hidden Assumptions: Not explicitly stating what you're assuming

  1. 跳过反思:未进行真正的自我反思就进入下一步
  2. 忽略低置信度:在置信度<60%时仍继续
  3. 遗漏依赖关系:未检查后续步骤是否依赖前序步骤
  4. 未进行回溯:出现矛盾时从不质疑前序步骤
  5. 虚假置信度:无依据的高置信度
  6. 隐藏假设:未明确说明自身的假设

Sequential vs Parallel Decision Guide

序列式与并行式决策指南

Problem TypeUse Self-Reflecting ChainUse ToT/BoT
DependenciesSequential stepsIndependent paths
GoalSingle logical conclusionExplore options
MethodStep-by-step reasoningParallel branches
BacktrackingReturn to previous stepPrune branches
OutputReasoning traceMultiple solutions

问题类型使用自我反思式链式推理使用ToT/BoT
依赖关系序列步骤独立路径
目标单一逻辑结论探索选项
方法逐步推理并行分支
回溯返回至前序步骤修剪分支
输出推理轨迹多种解决方案

Summary

总结

Self-Reflecting Chain is systematic methodology for:
  1. Sequential reasoning (step-by-step)
  2. Deep self-reflection (confidence at each step)
  3. Error detection (validate logic continuously)
  4. Backtracking (correct errors when found)
  5. Traceability (clear reasoning path)
Use it when order matters, dependencies exist, and you need one correct answer with full reasoning trace.
Remember: Chain confidence = minimum step confidence. A 95% confident chain with one 60% step has 60% overall confidence. Strengthen the weakest link.
自我反思式链式推理是一种系统化方法论,适用于:
  1. 序列推理(逐步推进)
  2. 深度自我反思(每一步都评估置信度)
  3. 错误检测(持续验证逻辑)
  4. 回溯(发现错误时进行修正)
  5. 可追溯性(清晰的推理路径)
当问题的顺序至关重要、存在依赖关系,且你需要一个带有完整推理轨迹的正确答案时,可使用该方法。
注意:链式置信度=步骤最低置信度。一个整体95%置信度的逻辑链若存在一个60%置信度的步骤,其整体置信度为60%。需强化最薄弱的环节。