MMOOZZGG.com

Glossary

What is chain of thought prompting?

In short

Chain of thought is a step-by-step solution that a language model writes before its answer, so that it handles a hard task more accurately.

Language models · chain of thought

MMOOZZGG.com editorsChecked: 1 min read

For a child

In a math lesson, the teacher asks you not just to write the answer but to show the solution: first one step, then the second, then the third. This makes it easier not to get lost and to find where you went wrong. If you ask a neural network to solve a task step by step, it also makes fewer mistakes. The steps written one after another are called a chain.

In plain words

A language model writes text word by word. If you demand an answer to a hard task at once, it has no room to think and often makes mistakes. When the model first writes out the steps in between, each next step builds on those already written, and the result is more accurate. Chain of thought prompting gets this with sample solutions in the prompt or a simple request to reason step by step. It is like counting change in a shop: in your head it is easy to slip, but on paper in a column it all adds up.

For business

A step-by-step solution raises accuracy where a mistake costs money: calculating a discount under complex terms, checking an application against the rules, reviewing a complaint. It also helps control: the written steps show where the model stumbled, which is useful when you review disputed cases. The downsides: the answer is longer, so it costs more and takes more time, and plausible steps do not prove a correct conclusion. The model can confidently write out wrong logic. So in important processes the steps are not shown to the customer as a justification, and the result is checked by rules or by a person. Before launch, it is worth reviewing typical AI errors and who is responsible for them.

For a specialist

Chain of thought (CoT) is a sequence of intermediate steps in natural language that a model generates before its final answer. Wei et al. (2022) showed that eight examples with step-by-step solutions in the prompt (few-shot CoT) clearly improve a 540-billion-parameter model on arithmetic, common-sense, and symbolic tasks. Kojima et al. (2022) got the effect with no examples (zero-shot CoT): one trigger phrase, “Let’s think step by step”, raised accuracy on MultiArith from 17.7% to 78.7%. Later methods include self-consistency, which votes across several chains, and tree of thoughts; in reasoning models, such chains are shaped by reinforcement learning. An open question remains: how well the reasoning text reflects the model’s real computation (faithfulness).

Example

A manager asks AI to calculate the final price of an order with three discounts and delivery. When it solves the task step by step, the model applies each discount in order and then adds delivery, and the steps show where a rule worked wrongly.

Related terms

Questions and answers

How do you make a neural network reason step by step? In your prompt, ask it to write out the solution first and then give the answer, or show an example of such a solution. Reasoning models do this by themselves and usually need no separate request.
Can you trust the model’s reasoning? Not fully. The steps help you find an error, but smooth reasoning does not prove a correct conclusion, and sometimes it does not match how the model actually reached the answer.

Check important conclusions separately.

Sources

Not sure whether your company needs this?

AI solutions map
Contact us