Reflection is a solver–critic loop: an agent evaluates an attempt, turns the failure into a hint or error analysis, and tries again with that feedback in context. section 5.3.2
A better second attempt does not mean the model learned permanently. No weights are updated, and past sessions are forgotten unless feedback is explicitly preserved; improvement comes from richer prompts. section 5.3.2
Use reflection when:
- The first attempt is likely to fail, but its failure contains information that can guide revision. section 5.3.2
- A critic can check the answer against a known solution, test, or deterministic validation rule. section 5.4.3 section 5.6
- You can afford iterative calls, extra tokens, and latency in exchange for deeper improvement on one reasoning path. section 5.3.2 section 5.4.3
Reflection differs from tree-of-thought by going deeper on one path through revision, while tree-of-thought explores multiple branches and prunes weaker ones. It can also wrap CoT, ReAct, or tool use. section 5.3.2 section 5.6
A retrying time-travel solver
A solver attempts a time-travel calculation. A critic checks the answer and returns a concise hint when it is wrong. The solver receives that hint as context and retries until it passes the check or reaches the retry limit. An exercise replaces a hardcoded target with check_answer(days), accepts answers equal to 26, limits attempts to four, and reports failure when all attempts fail. section 5.5












