From the course: Advanced Prompt Engineering Techniques

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Chain-of-thought (CoT) prompting

Chain-of-thought (CoT) prompting

- If I gave you a logic puzzle like Miken has five apples and gives chase two of them, how many apples does Miken and have left? You would go through a chain of thoughts to figure out how to solve the puzzle. Now, when we work with AI systems, we can use few shot prompting to provide examples of chains of thought and then have the system match those patterns in its own so-called Reasoning to solve logic puzzles. This is called chain of thought prompting. Let me show you an example of this. So first I'm going to show you what happens if I don't provide any examples. So here we have a logic puzzle. Tracy used a piece of wire four feet long to support tomato plants in her garden. The wire was cut into pieces six inches long. How many pieces did she obtain? So if I run this in ChatGPT, ChatGPT will try to figure this out and it will go through some sort of logic process and it'll probably get the answer right, but not…

Contents