Generative AI & LLMs

chain-of-thought prompting

/ CHAYN-uv-THAWT PROMPT-ing /

Chain-of-thought prompting is the simple trick of asking a model to work through a problem step by step, out loud, before giving its final answer — instead of blurting the answer immediately. For multi-step problems like arithmetic word problems or logic puzzles, this small change can sharply improve accuracy. The phrase "Let's think step by step" became famous precisely because adding it sometimes turns a wrong answer into a right one.

Why does writing out the steps help? A language model produces text one piece at a time, and each new piece is conditioned on everything already written. When the model commits intermediate steps to the page, those steps become part of the context it reads back, giving it a scaffold to build on rather than having to leap to the conclusion in a single bound. It is a bit like the difference between doing long division on paper and trying to do it entirely in your head.

Be careful not to mistake the appearance of reasoning for the real thing. The written-out steps are themselves generated text, and the model can produce a fluent, plausible-looking chain that is logically broken yet still arrives at the right answer — or a beautiful chain that confidently reaches the wrong one. The reasoning shown is not a faithful window into how the model actually computed its answer. It is a useful technique that improves results on many tasks, not proof that the model truly reasons the way the words suggest.

Q: "A shop had 23 apples, sold 8, then got 12 more. How many now?" Without CoT a model might guess "27." With CoT: "Start 23. Sold 8 -> 15. Got 12 more -> 27." Writing each step makes it much likelier to land on the correct 27 — and lets you see where any slip happened.

Showing the working improves accuracy on multi-step problems.

A chain of thought is not a true record of the model's internal process — it is generated text that often correlates with better answers. Studies show models can reach a right answer through visibly flawed reasoning, or rationalize an answer they had already settled on. Treat it as a helpful prompt, not a transparent explanation.

Also called
CoTstep-by-step prompting思维链思維鏈思维链提示