A prompting technique that instructs a language model to articulate intermediate reasoning steps before arriving at a final answer, improving performance on complex tasks.
Chain-of-thought (CoT) prompting is a technique that dramatically improves LLM performance on reasoning tasks. Instead of asking a model to jump directly to an answer, CoT prompts instruct the model to "think step by step," producing a visible reasoning trace before its conclusion.
There are two main variants: few-shot CoT, where example reasoning chains are included in the prompt, and zero-shot CoT, where simply appending "Let's think step by step" elicits reasoning behavior. Both approaches substantially improve accuracy on arithmetic, commonsense reasoning, and symbolic manipulation tasks.
Chain-of-thought is foundational to modern agentic AI frameworks. Many orchestration tools like LangChain and LlamaIndex use CoT-style prompting internally to guide models through multi-step workflows. It is also closely related to the scratchpad mechanism in dedicated reasoning models.
Weekly AI tool reviews, news digests, and how-to guides.
Join 12,000+ builders