Reasoning in the loop
Chain-of-thought as scratch space, the ReAct 'reason' step, and self-consistency — plus why a visible chain is evidence, not a proof.
Every agent step begins with a reason move: the model writes what it is thinking before it acts. This is chain-of-thought, repurposed. In a chat model, CoT is a way to buy accuracy with tokens; in an agent, it is the deliberation that decides which tool to call and why — the difference between acting and acting deliberately.
Start here
Tokens are the model's only scratch space. Writing a step of reasoning before acting lets the model condition its action on work it just did, rather than committing on the first impulse. It is the same trick as "show your work" — and it helps for the same reason.
Same question, two decoding strategies
A pen costs $7. You buy 3 pens and pay with a $25 bill. What change do you get?
Why it works: every token generated buys another forward pass — writing intermediate steps gives the model "working memory in tokens." Illustrative example; the direct-answer failure is common on multi-step problems, not guaranteed every time.
Watch the answer change as the model is allowed to reason before committing.
Why thinking before acting helps
- More compute per decision — each extra reasoning token is another forward pass over the problem, which raises the chance the action is right.
- Grounding the tool choice — a short "I need the customer's orders to answer this" makes the subsequent tool call far more likely to be the correct one.
- Traceability — the reasoning is in the transcript, so a failure can be read back and diagnosed, not guessed at.
Self-consistency
A single chain is one sample from a distribution. Self-consistency samples several independent chains and takes the majority answer — a cheap ensemble that fixes the chains that went astray. It works because correct reasoning paths tend to agree with each other even when they differ in wording; the errors scatter, the answer concentrates.
Careful
The visible chain is not a faithful transcript of the computation. What the model writes can be summarised, post-hoc rationalised, or shaped by what it thinks you want to read. Treat it as evidence of process, not a proof — a plausible-looking chain can sit on top of a wrong answer, and a right answer can come from a chain that does not describe how it was reached.
Check yourself
Eduspheria wiki · Agentic AI, Planning & reasoning
0 / 4 answered
Next: what to do when the reasoning leads somewhere wrong — reflection.