What is chain-of-thought prompting?
At its simplest, chain-of-thought (CoT) means asking the model to show its work. Instead of "What's the answer?", you ask "Reason through this step by step, then give the answer." The model generates a sequence of intermediate steps, and the final answer falls out of that sequence.
There are two common forms. Zero-shot CoT adds a trigger phrase like "Let's think step by step" with no examples. Few-shot CoT shows the model one or more worked examples that include the reasoning, then asks it to solve a new problem the same way. The original Wei et al. 2022 paper demonstrated the few-shot form; the zero-shot trigger came shortly after and is now the everyday default.
The mechanism is straightforward: generating intermediate tokens gives the model more computation to allocate to the problem and forces each conclusion to be conditioned on an explicit prior step. Errors that slip through a single-shot answer often surface — and get corrected — when the reasoning is spelled out.