AI & LLMs

What is chain-of-thought prompting?

Chain-of-thought prompting is a technique that asks an AI model to work through its reasoning in steps before giving an answer, which improves accuracy on problems that require several linked decisions.

New to Bolt? Sign up free.

Technical definition

Chain-of-thought prompting elicits intermediate reasoning steps from a language model before its final answer. The prompt either instructs the model to reason step by step or supplies examples that demonstrate worked reasoning. Generating those steps conditions the model's own later tokens, which raises accuracy on multi-step arithmetic, logical, and planning tasks compared with prompting for the answer alone.

The technique was documented in research published in 2022 and is now standard practice. Some current models perform this reasoning by default.

In plain terms

Instead of asking for the answer, ask the AI to show its work. Accuracy goes up, because the model builds each step on the one before it rather than guessing at the end.

Why it matters

Models fail differently on one-step and many-step problems. Given a question that needs four linked decisions, a model asked for a bare answer will often produce a plausible wrong one. The same model asked to reason through it will catch its own error at step two.

When you are building software, this applies to any request that requires the AI to hold several constraints at once: figuring out why a flow breaks, designing a data structure that serves three different views, or working out what an edge case should do.

The cost is length. Reasoning takes tokens, so it is worth it for hard problems and wasteful for easy ones.