Practice Exercise
In this section, we present practical exercises to help learners apply the three major types of prompts discussed in the chapter: zero-shot, few-shot, and chain-of-thought. These prompts allow interaction with AI models and are essential for various tasks. Learners will create:
- A zero-shot prompt that commands the model to summarize a news article, using its pre-existing knowledge without providing examples.
- A few-shot prompt designed to generate motivational quotes, where students will give the model several examples to illustrate the desired output.
- A chain-of-thought prompt for solving a math problem involving a store that sells apples, asking students to outline their reasoning step-by-step before concluding the answer.
These practice exercises aim to deepen understanding of how varying degrees of context and example outputs affect the AI's responses.