Lesson 2— Adding inputs to Prompts
1. Zero-Shot Prompt
A direct question or command with no examples.
- Prompt:
“Tell me a short bedtime story about a teddy bear who is afraid of the dark.”
Useful when:
- You don’t have a specific style in mind.
- You want to see what the model does “by default.”
2. Few-Shot Prompt
You provide one or more examples to guide the style, tone, or structure.
- Prompt:
“Here is a rhyme: ‘Twinkle twinkle little star, how I wonder what you are…’ Based on this style, write a rhyme about a happy puppy exploring the park.”
Another example:
- Prompt:
“Example product description: ‘This stainless-steel water bottle keeps drinks cold for 24 hours and hot for 12 hours. It’s leak-proof and perfect for travel.’ Now write a similar description for a wireless Bluetooth speaker for outdoor use.”
3. Chain-of-Thought Prompt
You explicitly ask the AI to reason step-by-step before giving the final answer.
- Prompt:
“Explain step by step, then give the final answer: If I have 3 apples and I get 2 more, how many apples do I have?” - Prompt (decision making):
“Explain your reasoning step by step, then conclude: Should a small business choose a cloud-based accounting system or a locally installed one?”
4. Self-Consistency Prompting
You run the same prompt multiple times, compare the answers, and keep the best result.
Example:
- Prompt (run 3–5 times):
“Write a 150-word introduction for a blog post about the benefits of learning AI for high-school students.”
Then:
- Compare the different versions.
- Choose the one with the clearest message, best tone, or combine the best sentences.
5. Prompt Chaining
You treat the interaction as a sequence of prompts that build on each other.
Example – Research report:
- Prompt 1:
“List 10 key challenges that small businesses face when adopting AI tools.” - Prompt 2:
“From the list you just created, choose the 3 most important challenges and explain each in detail in one paragraph.” - Prompt 3:
“Now propose 2 practical solutions for each of the 3 main challenges, in bullet points.” - Prompt 4:
“Combine all of the above into a structured report with headings and subheadings.”