@ckelsoe/prompt-architect 3.0.2 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +264 -264
- package/LICENSE +21 -21
- package/README.md +1064 -1184
- package/adapters/README.md +75 -267
- package/adapters/for-windsurf.md +136 -136
- package/adapters/system-prompt.md +243 -243
- package/package.json +139 -138
- package/scripts/build-skill.js +64 -0
- package/scripts/install.js +4 -54
- package/scripts/test.js +205 -213
- package/scripts/validate-skill.js +350 -350
- package/skills/prompt-architect/SKILL.md +331 -331
- package/skills/prompt-architect/assets/templates/ape_template.txt +5 -5
- package/skills/prompt-architect/assets/templates/bab_template.txt +15 -15
- package/skills/prompt-architect/assets/templates/broke_template.txt +15 -15
- package/skills/prompt-architect/assets/templates/cai-critique-revise_template.txt +18 -18
- package/skills/prompt-architect/assets/templates/care_template.txt +16 -16
- package/skills/prompt-architect/assets/templates/chain-of-density_template.txt +46 -46
- package/skills/prompt-architect/assets/templates/chain-of-thought_template.txt +49 -49
- package/skills/prompt-architect/assets/templates/co-star_template.txt +17 -17
- package/skills/prompt-architect/assets/templates/crispe_template.txt +14 -14
- package/skills/prompt-architect/assets/templates/ctf_template.txt +15 -15
- package/skills/prompt-architect/assets/templates/devils-advocate_template.txt +25 -25
- package/skills/prompt-architect/assets/templates/hybrid_template.txt +101 -101
- package/skills/prompt-architect/assets/templates/least-to-most_template.txt +16 -16
- package/skills/prompt-architect/assets/templates/plan-and-solve_template.txt +7 -7
- package/skills/prompt-architect/assets/templates/pre-mortem_template.txt +27 -27
- package/skills/prompt-architect/assets/templates/race_template.txt +19 -19
- package/skills/prompt-architect/assets/templates/rcot_template.txt +31 -31
- package/skills/prompt-architect/assets/templates/react_template.txt +27 -27
- package/skills/prompt-architect/assets/templates/reverse-role_template.txt +11 -11
- package/skills/prompt-architect/assets/templates/rise-ie_template.txt +23 -23
- package/skills/prompt-architect/assets/templates/rise-ix_template.txt +28 -28
- package/skills/prompt-architect/assets/templates/risen_template.txt +21 -21
- package/skills/prompt-architect/assets/templates/rpef_template.txt +26 -26
- package/skills/prompt-architect/assets/templates/rtf_template.txt +13 -13
- package/skills/prompt-architect/assets/templates/self-refine_template.txt +16 -16
- package/skills/prompt-architect/assets/templates/skeleton-of-thought_template.txt +15 -15
- package/skills/prompt-architect/assets/templates/step-back_template.txt +10 -10
- package/skills/prompt-architect/assets/templates/tidd-ec_template.txt +45 -45
- package/skills/prompt-architect/assets/templates/tree-of-thought_template.txt +30 -30
- package/skills/prompt-architect/references/frameworks/ape.md +200 -200
- package/skills/prompt-architect/references/frameworks/bab.md +242 -242
- package/skills/prompt-architect/references/frameworks/broke.md +242 -242
- package/skills/prompt-architect/references/frameworks/cai-critique-revise.md +230 -230
- package/skills/prompt-architect/references/frameworks/care.md +235 -235
- package/skills/prompt-architect/references/frameworks/chain-of-density.md +479 -479
- package/skills/prompt-architect/references/frameworks/chain-of-thought.md +424 -424
- package/skills/prompt-architect/references/frameworks/co-star.md +256 -256
- package/skills/prompt-architect/references/frameworks/crispe.md +253 -253
- package/skills/prompt-architect/references/frameworks/ctf.md +207 -207
- package/skills/prompt-architect/references/frameworks/devils-advocate.md +206 -206
- package/skills/prompt-architect/references/frameworks/least-to-most.md +226 -226
- package/skills/prompt-architect/references/frameworks/plan-and-solve.md +210 -210
- package/skills/prompt-architect/references/frameworks/pre-mortem.md +197 -197
- package/skills/prompt-architect/references/frameworks/race.md +243 -243
- package/skills/prompt-architect/references/frameworks/rcot.md +203 -203
- package/skills/prompt-architect/references/frameworks/react.md +304 -304
- package/skills/prompt-architect/references/frameworks/reverse-role.md +189 -189
- package/skills/prompt-architect/references/frameworks/rise.md +555 -555
- package/skills/prompt-architect/references/frameworks/risen.md +297 -297
- package/skills/prompt-architect/references/frameworks/rpef.md +195 -195
- package/skills/prompt-architect/references/frameworks/rtf.md +358 -358
- package/skills/prompt-architect/references/frameworks/self-refine.md +205 -205
- package/skills/prompt-architect/references/frameworks/skeleton-of-thought.md +186 -186
- package/skills/prompt-architect/references/frameworks/step-back.md +206 -206
- package/skills/prompt-architect/references/frameworks/tidd-ec.md +470 -470
- package/skills/prompt-architect/references/frameworks/tree-of-thought.md +260 -260
- package/skills/prompt-architect/scripts/framework_analyzer.py +807 -807
- package/skills/prompt-architect/scripts/prompt_evaluator.py +336 -336
- package/adapters/for-cursor.mdc +0 -138
- package/adapters/for-gemini-cli.md +0 -70
- package/adapters/for-github-copilot.md +0 -141
- package/adapters/for-openai-codex-cli.md +0 -158
|
@@ -1,203 +1,203 @@
|
|
|
1
|
-
# RCoT (Reverse Chain-of-Thought)
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
Reverse Chain-of-Thought (RCoT) is a verification framework that catches reasoning errors by working backwards. After generating an initial answer using standard reasoning, the model is instructed to reconstruct what the original question must have been — given only its answer. The reconstructed question is then compared condition-by-condition against the actual question to identify overlooked conditions, misinterpreted constraints, and logical gaps. Discrepancies found in this cross-check feed back into a corrected response.
|
|
6
|
-
|
|
7
|
-
**Research basis:** Documented on LearnPrompting.org and Mirascope; grounded in academic backward reasoning literature (RCoT paper; FOBAR: forward-backward reasoning). Related work: "Reversal of Thought" (ACL 2025, arXiv 2410.12323); "Reverse Thinking Makes LLMs Stronger Reasoners" (NAACL 2025).
|
|
8
|
-
|
|
9
|
-
## Why RCoT Works
|
|
10
|
-
|
|
11
|
-
Forward reasoning errors typically come from:
|
|
12
|
-
- Overlooking a condition in the question
|
|
13
|
-
- Misinterpreting a constraint
|
|
14
|
-
- Assuming something that wasn't stated
|
|
15
|
-
|
|
16
|
-
When the model reconstructs "what question would produce my answer?", it must articulate what conditions its reasoning implicitly assumed. Comparing these implicit assumptions against the actual question reveals the gaps.
|
|
17
|
-
|
|
18
|
-
**Limitation:** RCoT catches overlooking and misinterpretation errors well, but is less effective at catching hallucinated facts (fabricated information that is internally consistent) or pure arithmetic errors.
|
|
19
|
-
|
|
20
|
-
## Components
|
|
21
|
-
|
|
22
|
-
### Initial Generation
|
|
23
|
-
**Purpose:** Standard reasoning pass — generate an initial answer using Chain-of-Thought or direct reasoning. This is the answer to verify.
|
|
24
|
-
|
|
25
|
-
### Question Reconstruction
|
|
26
|
-
**Purpose:** Given only the answer (not the original question), reconstruct what the question must have been. The model must articulate the implicit conditions its reasoning assumed.
|
|
27
|
-
|
|
28
|
-
**Trigger:** *"Looking only at the answer below, reconstruct the question that would produce this answer. List every condition, constraint, and piece of information the question must have contained."*
|
|
29
|
-
|
|
30
|
-
### Condition Cross-Check
|
|
31
|
-
**Purpose:** Compare the reconstructed question's conditions against the actual question's conditions. List any conditions that: appear in the actual question but not the reconstruction (overlooked), appear in the reconstruction but not the actual question (assumed/hallucinated), or are present in both but interpreted differently.
|
|
32
|
-
|
|
33
|
-
### Correction
|
|
34
|
-
**Purpose:** Feed the identified discrepancies back to the model to generate a corrected answer that addresses what was missed.
|
|
35
|
-
|
|
36
|
-
## Template Structure
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
STEP 1 — INITIAL ANSWER:
|
|
40
|
-
Answer the following question using step-by-step reasoning.
|
|
41
|
-
Show your work.
|
|
42
|
-
|
|
43
|
-
QUESTION: [Your question]
|
|
44
|
-
|
|
45
|
-
STEP 2 — QUESTION RECONSTRUCTION:
|
|
46
|
-
Looking only at the answer above (ignore the original question),
|
|
47
|
-
reconstruct the question that would produce this answer.
|
|
48
|
-
List every condition, constraint, and piece of information
|
|
49
|
-
the question must have contained.
|
|
50
|
-
|
|
51
|
-
RECONSTRUCTED QUESTION: [AI generates this]
|
|
52
|
-
|
|
53
|
-
STEP 3 — CROSS-CHECK:
|
|
54
|
-
Now compare the reconstructed question to the original question.
|
|
55
|
-
Identify:
|
|
56
|
-
- Conditions in the ORIGINAL question but MISSING from your reconstruction
|
|
57
|
-
(these are conditions you overlooked in your reasoning)
|
|
58
|
-
- Conditions in your RECONSTRUCTION but NOT in the original question
|
|
59
|
-
(these are assumptions you made that weren't stated)
|
|
60
|
-
- Conditions present in both but interpreted differently
|
|
61
|
-
|
|
62
|
-
STEP 4 — CORRECTION:
|
|
63
|
-
If discrepancies were found, generate a corrected answer that addresses
|
|
64
|
-
every condition in the original question. If no discrepancies, confirm
|
|
65
|
-
the original answer is correct.
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
## Complete Examples
|
|
69
|
-
|
|
70
|
-
### Example 1: Multi-Condition Logic Problem
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
STEP 1 — INITIAL ANSWER:
|
|
74
|
-
A company has 3 departments: Engineering, Marketing, and Sales.
|
|
75
|
-
Engineering has 2x as many employees as Marketing.
|
|
76
|
-
Sales has 5 fewer employees than Engineering.
|
|
77
|
-
Marketing has 10 employees.
|
|
78
|
-
How many total employees does the company have?
|
|
79
|
-
|
|
80
|
-
Show your reasoning step by step.
|
|
81
|
-
|
|
82
|
-
STEP 2 — QUESTION RECONSTRUCTION:
|
|
83
|
-
Given only this answer: "45 employees total"
|
|
84
|
-
What conditions must the question have contained?
|
|
85
|
-
List every constraint implied by this answer.
|
|
86
|
-
|
|
87
|
-
STEP 3 — CROSS-CHECK:
|
|
88
|
-
Compare your reconstructed conditions to the actual question.
|
|
89
|
-
What did you overlook? What did you assume that wasn't stated?
|
|
90
|
-
|
|
91
|
-
STEP 4 — CORRECTION:
|
|
92
|
-
If your cross-check found discrepancies, recalculate with all
|
|
93
|
-
conditions properly applied.
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### Example 2: Complex Requirement Analysis
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
STEP 1:
|
|
100
|
-
Given these requirements: [paste requirements]
|
|
101
|
-
Which of the following implementation approaches satisfies all of them?
|
|
102
|
-
[List options]
|
|
103
|
-
|
|
104
|
-
[AI generates initial recommendation]
|
|
105
|
-
|
|
106
|
-
STEP 2 — RECONSTRUCTION:
|
|
107
|
-
Looking only at the recommendation above, reconstruct the requirements
|
|
108
|
-
that must have been in the original question.
|
|
109
|
-
|
|
110
|
-
STEP 3 — CROSS-CHECK:
|
|
111
|
-
Compare your reconstructed requirements to the actual requirements above.
|
|
112
|
-
Which requirements did you not account for in your recommendation?
|
|
113
|
-
|
|
114
|
-
STEP 4 — CORRECTION:
|
|
115
|
-
Update the recommendation to satisfy the overlooked requirements.
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### Example 3: Multi-Step Technical Analysis
|
|
119
|
-
|
|
120
|
-
```
|
|
121
|
-
STEP 1:
|
|
122
|
-
[Complex technical question with multiple constraints]
|
|
123
|
-
Analyze and recommend an approach.
|
|
124
|
-
|
|
125
|
-
[AI generates initial analysis]
|
|
126
|
-
|
|
127
|
-
STEP 2 — RECONSTRUCTION:
|
|
128
|
-
From the analysis above only, list every constraint and requirement
|
|
129
|
-
the original question must have specified.
|
|
130
|
-
|
|
131
|
-
STEP 3 — CROSS-CHECK:
|
|
132
|
-
Compare against the actual question. What was overlooked?
|
|
133
|
-
What was assumed without basis?
|
|
134
|
-
|
|
135
|
-
STEP 4 — CORRECTION:
|
|
136
|
-
Revise the analysis to address everything found in Step 3.
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## Abbreviated Version (Single Prompt)
|
|
140
|
-
|
|
141
|
-
For simpler use cases, collapse all steps into one compound prompt:
|
|
142
|
-
|
|
143
|
-
```
|
|
144
|
-
Answer the following question step by step: [QUESTION]
|
|
145
|
-
|
|
146
|
-
Then, working only from your answer (not re-reading the question),
|
|
147
|
-
reconstruct what the question must have contained.
|
|
148
|
-
|
|
149
|
-
Compare your reconstruction to the actual question. Identify any
|
|
150
|
-
conditions you overlooked or misinterpreted.
|
|
151
|
-
|
|
152
|
-
If discrepancies exist, provide a corrected answer.
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
## Best Use Cases
|
|
156
|
-
|
|
157
|
-
1. **Multi-Condition Logic Problems**
|
|
158
|
-
- Questions with several constraints that must all be satisfied
|
|
159
|
-
- Eligibility determination, scheduling, constraint satisfaction
|
|
160
|
-
|
|
161
|
-
2. **Complex Technical Requirements**
|
|
162
|
-
- Architecture decisions with multiple requirements
|
|
163
|
-
- Code that must satisfy several constraints simultaneously
|
|
164
|
-
|
|
165
|
-
3. **Legal/Financial/Medical Analysis**
|
|
166
|
-
- Multi-clause documents where missing one condition is costly
|
|
167
|
-
- Any domain where overlooked conditions cause errors
|
|
168
|
-
|
|
169
|
-
4. **Verification Layer in Pipelines**
|
|
170
|
-
- Add RCoT as a verification step after any complex reasoning
|
|
171
|
-
- Especially useful before high-stakes decisions
|
|
172
|
-
|
|
173
|
-
## Selection Criteria
|
|
174
|
-
|
|
175
|
-
**Choose RCoT when:**
|
|
176
|
-
- ✅ The question has multiple conditions/constraints that could be overlooked
|
|
177
|
-
- ✅ You want to verify that reasoning addressed everything
|
|
178
|
-
- ✅ Previous answers to similar questions have missed conditions
|
|
179
|
-
- ✅ Domain is high-stakes and overlooked conditions are costly
|
|
180
|
-
|
|
181
|
-
**Avoid when:**
|
|
182
|
-
- ❌ Simple question with one condition → overhead not worth it
|
|
183
|
-
- ❌ Verification needs involve factual accuracy → CRITIC (tool-grounded) is better
|
|
184
|
-
- ❌ Arithmetic verification → PS+ or explicit calculation check is faster
|
|
185
|
-
- ❌ Creative or generative task → no "conditions to miss"
|
|
186
|
-
|
|
187
|
-
## RCoT vs. Other Reasoning Frameworks
|
|
188
|
-
|
|
189
|
-
| | RCoT | Chain of Thought | Plan-and-Solve | Step-Back |
|
|
190
|
-
|---|---|---|---|---|
|
|
191
|
-
| Direction | Forward then backward (verification) | Forward only | Forward with planning | Abstract then forward |
|
|
192
|
-
| Best for | Catching overlooked conditions | Linear reasoning | Numerical calculation | Principle-grounded reasoning |
|
|
193
|
-
| Adds | Verification pass | None | Planning + variable extraction | Abstraction step |
|
|
194
|
-
| Failure mode | Doesn't catch hallucinations | Errors compound | Still needs correct variables | Step-back too vague |
|
|
195
|
-
|
|
196
|
-
## Quick Reference
|
|
197
|
-
|
|
198
|
-
| Step | Purpose |
|
|
199
|
-
|------|---------|
|
|
200
|
-
| Initial Answer | Generate reasoning (forward) |
|
|
201
|
-
| Reconstruction | "What question produced this?" (backward) |
|
|
202
|
-
| Cross-Check | Compare conditions: original vs. reconstructed |
|
|
203
|
-
| Correction | Fix what was overlooked or misinterpreted |
|
|
1
|
+
# RCoT (Reverse Chain-of-Thought)
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Reverse Chain-of-Thought (RCoT) is a verification framework that catches reasoning errors by working backwards. After generating an initial answer using standard reasoning, the model is instructed to reconstruct what the original question must have been — given only its answer. The reconstructed question is then compared condition-by-condition against the actual question to identify overlooked conditions, misinterpreted constraints, and logical gaps. Discrepancies found in this cross-check feed back into a corrected response.
|
|
6
|
+
|
|
7
|
+
**Research basis:** Documented on LearnPrompting.org and Mirascope; grounded in academic backward reasoning literature (RCoT paper; FOBAR: forward-backward reasoning). Related work: "Reversal of Thought" (ACL 2025, arXiv 2410.12323); "Reverse Thinking Makes LLMs Stronger Reasoners" (NAACL 2025).
|
|
8
|
+
|
|
9
|
+
## Why RCoT Works
|
|
10
|
+
|
|
11
|
+
Forward reasoning errors typically come from:
|
|
12
|
+
- Overlooking a condition in the question
|
|
13
|
+
- Misinterpreting a constraint
|
|
14
|
+
- Assuming something that wasn't stated
|
|
15
|
+
|
|
16
|
+
When the model reconstructs "what question would produce my answer?", it must articulate what conditions its reasoning implicitly assumed. Comparing these implicit assumptions against the actual question reveals the gaps.
|
|
17
|
+
|
|
18
|
+
**Limitation:** RCoT catches overlooking and misinterpretation errors well, but is less effective at catching hallucinated facts (fabricated information that is internally consistent) or pure arithmetic errors.
|
|
19
|
+
|
|
20
|
+
## Components
|
|
21
|
+
|
|
22
|
+
### Initial Generation
|
|
23
|
+
**Purpose:** Standard reasoning pass — generate an initial answer using Chain-of-Thought or direct reasoning. This is the answer to verify.
|
|
24
|
+
|
|
25
|
+
### Question Reconstruction
|
|
26
|
+
**Purpose:** Given only the answer (not the original question), reconstruct what the question must have been. The model must articulate the implicit conditions its reasoning assumed.
|
|
27
|
+
|
|
28
|
+
**Trigger:** *"Looking only at the answer below, reconstruct the question that would produce this answer. List every condition, constraint, and piece of information the question must have contained."*
|
|
29
|
+
|
|
30
|
+
### Condition Cross-Check
|
|
31
|
+
**Purpose:** Compare the reconstructed question's conditions against the actual question's conditions. List any conditions that: appear in the actual question but not the reconstruction (overlooked), appear in the reconstruction but not the actual question (assumed/hallucinated), or are present in both but interpreted differently.
|
|
32
|
+
|
|
33
|
+
### Correction
|
|
34
|
+
**Purpose:** Feed the identified discrepancies back to the model to generate a corrected answer that addresses what was missed.
|
|
35
|
+
|
|
36
|
+
## Template Structure
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
STEP 1 — INITIAL ANSWER:
|
|
40
|
+
Answer the following question using step-by-step reasoning.
|
|
41
|
+
Show your work.
|
|
42
|
+
|
|
43
|
+
QUESTION: [Your question]
|
|
44
|
+
|
|
45
|
+
STEP 2 — QUESTION RECONSTRUCTION:
|
|
46
|
+
Looking only at the answer above (ignore the original question),
|
|
47
|
+
reconstruct the question that would produce this answer.
|
|
48
|
+
List every condition, constraint, and piece of information
|
|
49
|
+
the question must have contained.
|
|
50
|
+
|
|
51
|
+
RECONSTRUCTED QUESTION: [AI generates this]
|
|
52
|
+
|
|
53
|
+
STEP 3 — CROSS-CHECK:
|
|
54
|
+
Now compare the reconstructed question to the original question.
|
|
55
|
+
Identify:
|
|
56
|
+
- Conditions in the ORIGINAL question but MISSING from your reconstruction
|
|
57
|
+
(these are conditions you overlooked in your reasoning)
|
|
58
|
+
- Conditions in your RECONSTRUCTION but NOT in the original question
|
|
59
|
+
(these are assumptions you made that weren't stated)
|
|
60
|
+
- Conditions present in both but interpreted differently
|
|
61
|
+
|
|
62
|
+
STEP 4 — CORRECTION:
|
|
63
|
+
If discrepancies were found, generate a corrected answer that addresses
|
|
64
|
+
every condition in the original question. If no discrepancies, confirm
|
|
65
|
+
the original answer is correct.
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Complete Examples
|
|
69
|
+
|
|
70
|
+
### Example 1: Multi-Condition Logic Problem
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
STEP 1 — INITIAL ANSWER:
|
|
74
|
+
A company has 3 departments: Engineering, Marketing, and Sales.
|
|
75
|
+
Engineering has 2x as many employees as Marketing.
|
|
76
|
+
Sales has 5 fewer employees than Engineering.
|
|
77
|
+
Marketing has 10 employees.
|
|
78
|
+
How many total employees does the company have?
|
|
79
|
+
|
|
80
|
+
Show your reasoning step by step.
|
|
81
|
+
|
|
82
|
+
STEP 2 — QUESTION RECONSTRUCTION:
|
|
83
|
+
Given only this answer: "45 employees total"
|
|
84
|
+
What conditions must the question have contained?
|
|
85
|
+
List every constraint implied by this answer.
|
|
86
|
+
|
|
87
|
+
STEP 3 — CROSS-CHECK:
|
|
88
|
+
Compare your reconstructed conditions to the actual question.
|
|
89
|
+
What did you overlook? What did you assume that wasn't stated?
|
|
90
|
+
|
|
91
|
+
STEP 4 — CORRECTION:
|
|
92
|
+
If your cross-check found discrepancies, recalculate with all
|
|
93
|
+
conditions properly applied.
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Example 2: Complex Requirement Analysis
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
STEP 1:
|
|
100
|
+
Given these requirements: [paste requirements]
|
|
101
|
+
Which of the following implementation approaches satisfies all of them?
|
|
102
|
+
[List options]
|
|
103
|
+
|
|
104
|
+
[AI generates initial recommendation]
|
|
105
|
+
|
|
106
|
+
STEP 2 — RECONSTRUCTION:
|
|
107
|
+
Looking only at the recommendation above, reconstruct the requirements
|
|
108
|
+
that must have been in the original question.
|
|
109
|
+
|
|
110
|
+
STEP 3 — CROSS-CHECK:
|
|
111
|
+
Compare your reconstructed requirements to the actual requirements above.
|
|
112
|
+
Which requirements did you not account for in your recommendation?
|
|
113
|
+
|
|
114
|
+
STEP 4 — CORRECTION:
|
|
115
|
+
Update the recommendation to satisfy the overlooked requirements.
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Example 3: Multi-Step Technical Analysis
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
STEP 1:
|
|
122
|
+
[Complex technical question with multiple constraints]
|
|
123
|
+
Analyze and recommend an approach.
|
|
124
|
+
|
|
125
|
+
[AI generates initial analysis]
|
|
126
|
+
|
|
127
|
+
STEP 2 — RECONSTRUCTION:
|
|
128
|
+
From the analysis above only, list every constraint and requirement
|
|
129
|
+
the original question must have specified.
|
|
130
|
+
|
|
131
|
+
STEP 3 — CROSS-CHECK:
|
|
132
|
+
Compare against the actual question. What was overlooked?
|
|
133
|
+
What was assumed without basis?
|
|
134
|
+
|
|
135
|
+
STEP 4 — CORRECTION:
|
|
136
|
+
Revise the analysis to address everything found in Step 3.
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Abbreviated Version (Single Prompt)
|
|
140
|
+
|
|
141
|
+
For simpler use cases, collapse all steps into one compound prompt:
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
Answer the following question step by step: [QUESTION]
|
|
145
|
+
|
|
146
|
+
Then, working only from your answer (not re-reading the question),
|
|
147
|
+
reconstruct what the question must have contained.
|
|
148
|
+
|
|
149
|
+
Compare your reconstruction to the actual question. Identify any
|
|
150
|
+
conditions you overlooked or misinterpreted.
|
|
151
|
+
|
|
152
|
+
If discrepancies exist, provide a corrected answer.
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Best Use Cases
|
|
156
|
+
|
|
157
|
+
1. **Multi-Condition Logic Problems**
|
|
158
|
+
- Questions with several constraints that must all be satisfied
|
|
159
|
+
- Eligibility determination, scheduling, constraint satisfaction
|
|
160
|
+
|
|
161
|
+
2. **Complex Technical Requirements**
|
|
162
|
+
- Architecture decisions with multiple requirements
|
|
163
|
+
- Code that must satisfy several constraints simultaneously
|
|
164
|
+
|
|
165
|
+
3. **Legal/Financial/Medical Analysis**
|
|
166
|
+
- Multi-clause documents where missing one condition is costly
|
|
167
|
+
- Any domain where overlooked conditions cause errors
|
|
168
|
+
|
|
169
|
+
4. **Verification Layer in Pipelines**
|
|
170
|
+
- Add RCoT as a verification step after any complex reasoning
|
|
171
|
+
- Especially useful before high-stakes decisions
|
|
172
|
+
|
|
173
|
+
## Selection Criteria
|
|
174
|
+
|
|
175
|
+
**Choose RCoT when:**
|
|
176
|
+
- ✅ The question has multiple conditions/constraints that could be overlooked
|
|
177
|
+
- ✅ You want to verify that reasoning addressed everything
|
|
178
|
+
- ✅ Previous answers to similar questions have missed conditions
|
|
179
|
+
- ✅ Domain is high-stakes and overlooked conditions are costly
|
|
180
|
+
|
|
181
|
+
**Avoid when:**
|
|
182
|
+
- ❌ Simple question with one condition → overhead not worth it
|
|
183
|
+
- ❌ Verification needs involve factual accuracy → CRITIC (tool-grounded) is better
|
|
184
|
+
- ❌ Arithmetic verification → PS+ or explicit calculation check is faster
|
|
185
|
+
- ❌ Creative or generative task → no "conditions to miss"
|
|
186
|
+
|
|
187
|
+
## RCoT vs. Other Reasoning Frameworks
|
|
188
|
+
|
|
189
|
+
| | RCoT | Chain of Thought | Plan-and-Solve | Step-Back |
|
|
190
|
+
|---|---|---|---|---|
|
|
191
|
+
| Direction | Forward then backward (verification) | Forward only | Forward with planning | Abstract then forward |
|
|
192
|
+
| Best for | Catching overlooked conditions | Linear reasoning | Numerical calculation | Principle-grounded reasoning |
|
|
193
|
+
| Adds | Verification pass | None | Planning + variable extraction | Abstraction step |
|
|
194
|
+
| Failure mode | Doesn't catch hallucinations | Errors compound | Still needs correct variables | Step-back too vague |
|
|
195
|
+
|
|
196
|
+
## Quick Reference
|
|
197
|
+
|
|
198
|
+
| Step | Purpose |
|
|
199
|
+
|------|---------|
|
|
200
|
+
| Initial Answer | Generate reasoning (forward) |
|
|
201
|
+
| Reconstruction | "What question produced this?" (backward) |
|
|
202
|
+
| Cross-Check | Compare conditions: original vs. reconstructed |
|
|
203
|
+
| Correction | Fix what was overlooked or misinterpreted |
|