What is it?
Chain-of-thought prompting means asking a model to show its working: "work through this step by step, then give the final answer". For multi-step problems that often gives better answers than demanding the answer straight away.
Two cautions: the steps written out are output text, not a guaranteed window into how the model actually decided; and newer reasoning models often do this by themselves.
Also known as: CoT, CoT prompting, step by step prompting, think step by step, let's think step by step, show your work prompt, few-shot chain of thought, zero-shot CoT.
Technical definition
CoT elicits intermediate token sequences via few-shot exemplars or instructions (zero-shot "let's think step by step" variants). It improves performance on arithmetic, symbolic and commonsense multi-step tasks for sufficiently capable models (Wei et al., 2022). Stated rationales can be unfaithful to the computation that produced the answer, so they should not be treated as ground-truth explanations. With reasoning-trained models, explicit CoT prompts are often unnecessary and can interfere (Reasoning Models).
Entity type: technique · Freshness class: evolving.
When should I use it?
Try CoT for multi-step arithmetic, logic, planning and analysis with standard (non-reasoning) models. Skip it for extraction/classification, or when using a reasoning model whose provider advises against explicit step-by-step prompts.
Implementation patterns
- Few-shot CoT: include 2–4 worked examples with steps and a final answer line.
- Zero-shot CoT: instruct stepwise working, then a clearly delimited final answer.
- Decompose: ask for sub-questions first, answer each, then combine.
- Separate fields: ask for a brief "justification" and a "final_answer" in a structured output so downstream code reads only the answer.
Technologies and frameworks
Commonly associated: few-shot exemplars, structured output with a "rationale" field. Names are examples of what exists, not recommendations, and projects change quickly.
Practical guide
- Write the task, the constraints and what a correct final answer looks like.
- Add "work through the problem, then end with FINAL: <answer>" or use a structured schema.
- Test with and without CoT on the same cases (How to Evaluate AI Systems and Outputs).
- Keep it only where it measurably helps.
- If showing users reasoning, present a concise rationale you generated for display.
Common failure modes
- Parsing the final answer out of free-form steps, which breaks when the format drifts.
- Trusting a plausible-looking chain as proof; errors can hide in a fluent step.
- Adding CoT to a reasoning model and getting longer, no better, more expensive output.
- Exposing raw intermediate text to end users when a short justification would do (Reasoning Transparency and Hidden Reasoning).
- Using CoT for simple lookups where it only adds tokens.
Troubleshooting
- Final answer is hard to extract — Require a labelled final line or structured output (Structured Outputs from LLMs).
- Steps are plausible but answer is wrong — Add a verifier (calculator, unit tests, retrieval) rather than asking the model to re-check itself.
- Quality dropped with a reasoning model — Remove step-by-step scaffolding and state the goal and constraints instead.
Contrasted with
- Reasoning Models — Reasoning models deliberate by default after special training; CoT is a prompting technique you add.
- Self-Consistency (Sampling and Voting) — Self-consistency samples several chains and votes; plain CoT uses one chain.
Questions this page answers
- What is chain-of-thought prompting?
- Does "think step by step" still help?
- How do I use chain of thought in a prompt?
- Is the chain of thought a faithful explanation?
Typical goals: improve accuracy on multi-step prompts; decide whether to still use chain-of-thought with reasoning models; show users a justification without exposing internal traces.
Sources and verification
Status: not independently verified. This entry was authored on 2026-10-06 from general technical knowledge, without live checking of the sources below. Treat every source as a lead to confirm (identifier, title, authorship, current version) before publication or citation.
Freshness class: evolving — Established techniques whose best practice shifts as research and tooling move. Re-review every 6 months.
Canonical sources (unverified leads):
- Wei et al., Chain-of-Thought Prompting Elicits Reasoning in Large Language Models (2022) — arXiv:2201.11903
- Kojima et al., Large Language Models are Zero-Shot Reasoners (2022) — arXiv:2205.11916
- Turpin et al., Language Models Don't Always Say What They Think: Unfaithful Explanations in Chain-of-Thought Prompting (2023) — arXiv:2305.04388