freecoding.school100% FREE · NO SIGNUP
Tensor TownISSUE #64 of 120

chain of thought · think before answering

NeuraVSThe Overfit Ogre
Neura saysChain-of-thought prompting asks the model to reason step by step before answering.

For multi-step problems, telling the model to "think step by step" (or showing worked reasoning) markedly improves accuracy — it allocates intermediate computation instead of jumping to an answer. Chain-of-thought exposes the reasoning, which also aids debugging. Modern "reasoning" models internalize this. Caveat: the stated reasoning isn't always the true cause of the answer, so don't treat it as a guarantee.

Power-ups you unlock

The Overfit Ogre attacks — common mistakes

Boss battleExplain why step-by-step prompting helps multi-step arithmetic.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>"What is 17×24? Think step by step."
→ 17×24 = 17×20 + 17×4 = 340 + 68 = 408
intermediate steps → fewer errors</pre></body></html>
▶ Open the interactive comic issue
‹ Zero-Shot · One-Shot · Few-ShotTree Of Thoughts · Branching Reasoning ›