Knowledge pack — guides, templates, examples
Pattern | Core Shape | Use When | Stop Condition |
---|---|---|---|
Maieutic | Answer + claim tree | Need justification | Depth reached / consistent |
Self-Refine | Draft→Critique→Refine loop | Quality polishing | No material issues |
Least-to-Most | Ordered subproblems S1..Sn | Compositional reasoning | Final aggregation |
Self-Consistency | K sampled rationales | Reduce stochastic error | Majority stable |
RAG | Retrieve + cite | Factual grounding | Answer or unknown |
Q: <question> 1) Draft answer. 2) Claims: Claim: ... Because: ... 3) Expand depth N. 4) Label SUPPORT / CONTRADICT. 5) Prune contradictions. 6) Output { answer, explanation_tree }.
GEN: produce draft. CRITIQUE: issues by category + checklist. REFINE: apply checklist + CHANGELOG. STOP: if 'NO MATERIAL ISSUES' or max_rounds.
DECOMPOSE: S1..Sn (easiest->hardest). SOLVE: S_i referencing previous. RETURN: final answer + steps JSON.
FOR i in 1..K: sample reasoning (temp>0). COLLECT answers. SELECT majority / best-scored.
EMBED + INDEX docs. RETRIEVE top k. PROMPT with passages + cite requirement. ANSWER or unknown.