← Back to Glossary

Chain of Thought

Techniques

A prompting technique where you ask the AI to show its reasoning step by step, which often leads to more accurate answers.

Think of chain of thought like solving a math problem on paper instead of in your head. If someone asks you what 17 times 23 is, you will probably get it wrong in your head. But if you write it out step by step -- 17 times 20 is 340, 17 times 3 is 51, so the answer is 391 -- you are much more likely to get it right.

Chain of thought (CoT) is a technique where you encourage an AI model to work through a problem step by step rather than jumping straight to the answer. It turns out that when you ask an AI to "think out loud," it makes fewer mistakes, especially on math, logic, and reasoning problems.

Here is why it works: when a model tries to answer a complex question in one shot, it can easily make logical errors. But when it breaks the problem into smaller steps, each step is simpler and more likely to be correct. It is the same reason your math teacher told you to show your work -- the process of writing out each step helps you catch mistakes.

You can trigger chain of thought in several ways. The simplest is just adding "Let's think step by step" to your prompt. You can also show the model an example of step-by-step reasoning and ask it to follow the same pattern. Some newer models, like OpenAI's o1 series, have chain-of-thought reasoning built in -- they automatically reason through problems internally before giving you an answer.

Chain of thought is especially useful for word problems, multi-step calculations, coding challenges, logical puzzles, and any task where the answer depends on getting multiple intermediate steps right. It does use more tokens (because the model is writing out more text), but the improvement in accuracy is usually worth the extra cost.

Real-World Examples

  • *Asking ChatGPT to 'solve this math problem step by step' instead of just asking for the answer
  • *OpenAI's o1 model automatically using internal chain-of-thought before responding
  • *Asking Claude to 'walk me through your reasoning' for a complex analysis question

Tools That Use This

ChatGPTFreemiumClaudeFreemiumGeminiFreemium

Related Terms

Prompt EngineeringFew-Shot LearningInferenceLarge Language Model