Chain of Thought
CoT
ELI5 — The Vibe Check
Chain of Thought is when you tell the AI 'show your work' like a math teacher. Instead of jumping straight to the answer, the model reasons through the problem step by step. It turns out that just asking an AI to think out loud makes it dramatically better at hard problems. Who knew — turns out even robots benefit from talking through their feelings.
Real Talk
Chain of Thought (CoT) is a prompting technique where LLMs are encouraged to produce intermediate reasoning steps before arriving at a final answer. This approach significantly improves performance on complex reasoning tasks including math, logic, and multi-step problems. It can be elicited via few-shot examples or zero-shot with phrases like 'Let's think step by step.'
Show Me The Code
# Chain of Thought prompting
prompt = """
Q: If a shirt costs $25 and is 20% off,
what do you pay after 8% tax?
A: Let me think step by step:
1. Discount: $25 × 0.20 = $5
2. Sale price: $25 - $5 = $20
3. Tax: $20 × 0.08 = $1.60
4. Total: $20 + $1.60 = $21.60
"""
When You'll Hear This
"Add chain-of-thought prompting — the model needs to reason through this." / "CoT prompting improved accuracy from 60% to 95%."
Related Terms
Few-Shot Learning
Few-shot learning is teaching an AI by showing it just a few examples — like showing someone two pictures of a platypus and saying 'find more of these.
LLM (Large Language Model)
An LLM is a humongous AI that read basically the entire internet and learned to predict what words come next, really really well.
o1
o1 is OpenAI's 'thinking' model — instead of blurting out answers immediately, it takes a moment to actually reason through the problem like a human would.
Prompt Engineering
Prompt engineering is the art of talking to AI so it actually does what you want.