Loading
Loading
Chain-of-Thought (CoT) is a prompting technique that asks the model to explain its reasoning steps in detail before reaching the final answer.
Instead of "answer directly," you tell it: "think out loud, step by step."
Neural networks produce tokens sequentially. When you ask the model to "think out loud," you're giving it extra computational space to develop reasoning before answering. This significantly improves accuracy on complex problems.
✅ Good for:
❌ Not necessary for:
Method 1: "Think step by step" The simplest approach. Just add to the end of your prompt: "Think step by step before giving your final answer"
Method 2: Few-Shot CoT Give an example of how to reason: "Here's an example of how to solve the problem: [example with thinking steps]. Now solve the following problem the same way."
Method 3: Explicit breakdown "Analyze the problem in steps:
Question: A store applies a 20% discount on a product worth $250, then adds 15% tax. What is the final price?
Without CoT (may err on complex versions): Rushes to an answer without showing work
With CoT: "Step 1: 20% discount = 250 × 0.2 = $50 Step 2: Price after discount = 250 - 50 = $200 Step 3: 15% tax = 200 × 0.15 = $30 Step 4: Final price = 200 + 30 = $230"
The more complex and multi-step the task, the greater the value of Chain-of-Thought.