Gradient
Lesson 10.8Concept~50 min

Reasoning & agents

Thinking before answering, using tools, and acting in the world.

Module 10 · 0/11 done

Thinking out loud

A language model produces each token with a fixed amount of computation. For a hard question, that’s not much — unless it writes intermediate steps first. Each written step becomes context the model can attend to, so it can, in effect, spend more computation on harder problems. This is chain-of-thought.

Q: A shop sells pens at 3 for $2. How much do 12 pens cost?

Direct:   $6   ✗

Step by step:
  12 pens is 12 ÷ 3 = 4 groups of three.
  Each group costs $2, so 4 × $2 = $8.   ✓
Check yourself
Why can writing out reasoning steps improve a language model’s answer?

Complete the challenge above to continue.