reasoning
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReasoning Patterns
推理模式
Systematic thinking for accurate problem solving.
用于精准解决问题的系统性思维方式。
Instructions
操作指南
1. Chain-of-Thought (CoT)
1. 思维链(Chain-of-Thought, CoT)
Break complex problems into explicit reasoning steps:
PROBLEM → ANALYZE → DECOMPOSE → SOLVE STEPS → VERIFY → SYNTHESIZEmarkdown
undefined将复杂问题拆解为明确的推理步骤:
PROBLEM → ANALYZE → DECOMPOSE → SOLVE STEPS → VERIFY → SYNTHESIZEmarkdown
undefinedThinking Process
思考流程
- Understand: What is being asked?
- Identify: What information do I have?
- Plan: What steps will solve this?
- Execute: Work through each step
- Verify: Is the solution correct?
undefined- 理解:问题的核心需求是什么?
- 识别:我掌握了哪些信息?
- 规划:通过哪些步骤可以解决问题?
- 执行:逐步完成每个步骤
- 验证:解决方案是否正确?
undefined2. Self-Reflection Protocol
2. 自我反思协议
Before finalizing any output:
markdown
undefined在最终确定输出内容前:
markdown
undefinedReflection Checklist
反思检查清单
- Does this answer the actual question?
- Are there any logical errors?
- Did I miss edge cases?
- Is this the simplest solution?
- Would a senior developer approve this?
undefined- 该内容是否真正回答了问题?
- 是否存在逻辑错误?
- 我是否遗漏了边缘情况?
- 这是不是最简单的解决方案?
- 资深开发者是否会认可这个方案?
undefined3. Problem Decomposition
3. 问题拆解
typescript
// ❌ Bad: Trying to solve everything at once
function solveComplexProblem() {
// 500 lines of tangled logic
}
// ✅ Good: Decomposed into clear steps
function solveComplexProblem() {
const parsed = parseInput();
const validated = validateData(parsed);
const processed = processData(validated);
return formatOutput(processed);
}typescript
// ❌ 错误示例:试图一次性解决所有问题
function solveComplexProblem() {
// 500行混乱的逻辑代码
}
// ✅ 正确示例:拆解为清晰的步骤
function solveComplexProblem() {
const parsed = parseInput();
const validated = validateData(parsed);
const processed = processData(validated);
return formatOutput(processed);
}4. Verification Strategies
4. 验证策略
| Strategy | When to Use |
|---|---|
| Trace Through | Algorithm logic |
| Edge Cases | Input validation |
| Type Check | TypeScript code |
| Unit Test | Critical functions |
| Dry Run | Complex flows |
| 策略 | 使用场景 |
|---|---|
| 追踪排查 | 算法逻辑 |
| 边缘情况测试 | 输入验证 |
| 类型检查 | TypeScript代码 |
| 单元测试 | 关键函数 |
| 试运行 | 复杂流程 |
5. Error Detection
5. 错误检测
markdown
undefinedmarkdown
undefinedCommon Reasoning Errors
常见推理错误
- Assumption Error: Assuming facts not stated
- Logic Gap: Missing intermediate steps
- Scope Creep: Solving wrong problem
- Premature Optimization: Overcomplicating
- Confirmation Bias: Ignoring alternatives
undefined- 假设错误:假设未明确说明的事实
- 逻辑断层:缺少中间推理步骤
- 范围偏离:解决了错误的问题
- 过早优化:过度复杂化解决方案
- 确认偏差:忽略其他备选方案
undefined6. Reasoning Template
6. 推理模板
Use this template for complex tasks:
markdown
undefined在处理复杂任务时使用以下模板:
markdown
undefinedTask: [Description]
任务:[任务描述]
Understanding
理解阶段
- Goal: [What we need to achieve]
- Constraints: [Limitations]
- Inputs: [Available data]
- 目标:[我们需要达成的结果]
- 约束条件:[限制因素]
- 输入数据:[可用的数据]
Approach
实施步骤
- Step 1: [Description]
- Step 2: [Description]
- Step 3: [Description]
- 步骤1:[步骤描述]
- 步骤2:[步骤描述]
- 步骤3:[步骤描述]
Execution
执行过程
[Work through each step]
[逐步完成每个步骤]
Verification
验证环节
- Goal achieved
- Constraints satisfied
- No side effects
- 达成目标
- 满足约束条件
- 无副作用
Reflection
反思总结
- What worked: [...]
- What could improve: [...]
undefined- 有效之处:[...]
- 可改进点:[...]
undefined