mirror of
https://github.com/dair-ai/Prompt-Engineering-Guide
synced 2024-11-02 15:40:13 +00:00
32 lines
1.2 KiB
Plaintext
32 lines
1.2 KiB
Plaintext
|
# Zero-Shot CoT
|
||
|
|
||
|
One recent idea that came out more recently is the idea of [zero-shot CoT](https://arxiv.org/abs/2205.11916) (Kojima et al. 2022) that essentially involves adding "Let's think step by step" to the original prompt. Let's try a simple problem and see how the model performs:
|
||
|
|
||
|
*Prompt:*
|
||
|
```
|
||
|
I went to the market and bought 10 apples. I gave 2 apples to the neighbor and 2 to the repairman. I then went and bought 5 more apples and ate 1. How many apples did I remain with?
|
||
|
```
|
||
|
|
||
|
*Output:*
|
||
|
```
|
||
|
11 apples
|
||
|
```
|
||
|
|
||
|
The answer is incorrect! Now Let's try with the special prompt.
|
||
|
|
||
|
*Prompt:*
|
||
|
```
|
||
|
I went to the market and bought 10 apples. I gave 2 apples to the neighbor and 2 to the repairman. I then went and bought 5 more apples and ate 1. How many apples did I remain with?
|
||
|
|
||
|
Let's think step by step.
|
||
|
```
|
||
|
|
||
|
*Output:*
|
||
|
```
|
||
|
First, you started with 10 apples.
|
||
|
You gave away 2 apples to the neighbor and 2 to the repairman, so you had 6 apples left.
|
||
|
Then you bought 5 more apples, so now you had 11 apples.
|
||
|
Finally, you ate 1 apple, so you would remain with 10 apples.
|
||
|
```
|
||
|
|
||
|
It's actually impressive that this simple prompt is effective at this task. This is particularly useful where you don't have too many examples to use in the prompt.
|