It’s like teaching someone how to solve a math problem step-by-step instead of just giving them the answer.
For example, let’s say we want our model to figure out if a group of numbers adds up to an even number:
Prompt: The odd numbers in this group add up to an even number: 4, 8, 9, 15, 12, 2, 1. A: Adding all the odd numbers (9, 15) gives 24. The answer is True.
But instead of just giving the model this prompt and expecting it to magically understand how to solve it, we can use CoT to help guide its reasoning process:
Prompt: The odd numbers in this group add up to an even number: 4, 8, 9, 15, 12, 2, 1. A: Adding all the odd numbers (9) gives 9. Let’s think step by step… What other odd numbers are there?
Output: The model might generate something like this:
Thought 1: Looking at the prompt, we see that there are several odd numbers in this group: 4, 8, 9, 15, 12, 2, and 1. Let’s start by adding up all of the odd numbers (except for 1) to get a total sum.
Thought 2: The first odd number is 9. Adding it gives us 9.
Thought 3: What other odd numbers are there? We can see that there are several more, including 4 and 8. Let’s add those up too.
Thought 4: After adding all of the odd numbers (except for 1), we get a total sum of 24.
Thought 5: Looking at the prompt again, we can see that there are also some even numbers in this group, including 8 and 12. Let’s add those up too.
Thought 6: After adding all of the odd and even numbers (except for 1), we get a total sum of 40.
Thought 7: But wait! We only need to find out if this group adds up to an even number, not whether it’s greater than or less than some arbitrary value like 40. Let’s focus on that instead.
Thought 8: To check if the sum is even, we can divide it by 2 and see if there’s a remainder. If there isn’t, then the number is even!
Thought 9: After dividing our total sum of 40 by 2, we get a quotient of 20 with no remainder. That means that this group adds up to an even number!
Output: The answer is True.
So basically, CoT helps models understand complex reasoning tasks by breaking them down into smaller steps or “thoughts”. It’s like teaching someone how to solve a math problem step-by-step instead of just giving them the answer.