Chain-of-Thought Prompting
Simple Definition
Chain-of-thought (CoT) prompting asks the AI to work through a problem step by step before giving its final answer. Instead of jumping straight to a conclusion, the model shows its reasoning, which makes it much more accurate on complex problems.
The simplest version: add “Let’s think step by step” to your prompt.
Why It Works
LLMs generate text token by token. When forced to reason through a problem explicitly, the model builds on each step, catching errors and following logical sequences more carefully. It’s like the difference between doing mental math vs. writing it out, writing it out reduces mistakes.
Example
Without chain-of-thought:
Q: A store sells 3 items for $4 each and 2 items for $7 each. What’s the total? A: $22
With chain-of-thought:
Q: A store sells 3 items for $4 each and 2 items for $7 each. What’s the total? Let’s think step by step.
Step 1: 3 items × $4 = $12 Step 2: 2 items × $7 = $14 Step 3: $12 + $14 = $26
A: $26
The step-by-step version catches the arithmetic correctly.
How to Trigger Chain-of-Thought
Simple triggers that work:
- “Let’s think step by step.”
- “Walk me through your reasoning.”
- “Think through this carefully before answering.”
- “Show your work.”
Best Uses
- Math and logic problems
- Multi-step analysis
- Legal or policy reasoning
- Debugging code
- Any task where the process matters as much as the answer
Related Terms
- Prompt Engineering, the broader practice CoT belongs to
- Few-Shot Prompting, can be combined with CoT for more examples
- Zero-Shot Prompting, CoT can be applied zero-shot (“think step by step”)
- LLM, the models that benefit most from CoT prompting
Continue learning
Explore related guides, tools, workflows, and prompts that help you go deeper into this topic.
Browse all AI terms.
Learn termSee these concepts in practice.
Open workflowA simple explanation of this AI concept.
Learn termA simple explanation of this AI concept.
Learn termA simple explanation of this AI concept.
Learn termA simple explanation of this AI concept.
Learn termSee AI terms in action
Browse practical AI workflows that use the concepts in this glossary.
Frequently Asked Questions
Does chain-of-thought prompting always help?
It helps most with complex reasoning, math, and multi-step problems. For simple tasks like classification or summarization, it adds unnecessary length without benefit.
Last updated: