Welcome to Module Four! Now you know how to give AI a role and make it creative. In this module, we will learn two super important tricks: giving AI examples and setting rules. Examples show AI exactly what you want. Rules tell AI what to do and what not to do. These two skills will make you a true AI master. You will be able to get exactly the answer you want every single time. Let's dive in!
After this module, you will be able to:
Folake loved to draw. One day, her art teacher said: "Draw a tree." Folake drew a big green tree. Her friend drew a small brown tree. The teacher said: "They are both trees, but I wanted a tree with fruits." Folake thought: "If only the teacher had given an example!"
Then, the teacher said: "Draw a tree like this: with a brown trunk, green leaves, and red apples." Now everyone drew the same kind of tree. That is exactly how AI works. If you give an example, AI knows what you mean. If you set rules, AI follows them perfectly. Let's learn how!
Definition: An example is a sample that shows AI exactly what you want.
Why it is important: Examples help AI understand your expectation. It's like showing a picture instead of just describing it.
Simple explanation: If you want AI to write a poem, give it a short poem as an example. It will write a similar one.
Real-life example: "Write a joke like this: 'Why did the chicken cross the road? To get to the other side!'"
School example: "Explain addition like this: 'Adding 2 and 3 gives 5.'"
Home example: "Make a shopping list like: apples, bread, milk."
Nigerian example: "Tell me a story like the one about the tortoise and the hare."
Illustration:
You: "Write a poem like:
'The sun is bright, the sky is blue,
I love to play, and so do you.'"
AI: "The stars are high, the moon is round,
I love to laugh, and so do you."
Mini summary: Examples show AI what you want, so it can copy the style.
Definition: Examples are powerful because they remove guesswork for AI.
Why it is important: Without examples, AI might give you something completely different. Examples guide it.
Simple explanation: If you ask AI to "tell a story" without an example, it might be too long or too short. With an example, it matches your length and style.
Real-life example: "Give me three facts like: '1. Nigeria is in Africa. 2. It has many languages. 3. It is a big country.'"
School example: "Write a sentence like: 'The cat sat on the mat.'"
Home example: "Set the table like: plate, spoon, cup."
Nigerian example: "Name three cities like: Lagos, Abuja, Kano."
Illustration:
Without example: "Tell me about animals." -> AI says "Animals are living things."
With example: "Tell me about animals like: 'Lions are kings of the jungle.'" -> AI says "Elephants are the largest land animals."
Mini summary: Examples make sure AI gives you the kind of answer you want.
Definition: A good example is clear, short, and exactly matches what you want.
Why it is important: If your example is fuzzy, AI will give a fuzzy answer. A clear example gives a clear answer.
Simple explanation: If you want a list, give a list as an example. If you want a paragraph, give a paragraph.
Real-life example: "Give me a recipe like: 'Step 1: Boil water. Step 2: Add rice.'"
School example: "Explain the water cycle like: 'First, water evaporates. Then, it forms clouds.'"
Home example: "Tell me a bedtime story like: 'Once upon a time, there was a princess.'"
Nigerian example: "Give me a greeting like: 'Good morning, how are you?'"
Illustration:
Good example: "Tell me a joke like: 'What do you call a fish with no eyes? Fsh!'"
Bad example: "Tell me a joke." (no example)
Mini summary: A clear example helps AI give you the perfect response.
Definition: Rules are instructions that tell AI what to do and what not to do.
Why it is important: Rules help you control AI's answer. You can say "keep it short" or "don't use big words."
Simple explanation: It's like telling a friend: "When we play the game, you must not peek." Rules make the game fair.
Real-life example: "Tell me about dogs, but only give three facts."
School example: "Explain fractions, but use simple words."
Home example: "Give me a recipe, but don't include eggs."
Nigerian example: "Tell me about Lagos, but only mention food places."
Illustration:
No rule: "Tell me about cars." -> AI gives a long answer.
With rule: "Tell me about cars in 20 words." -> AI gives a short answer.
Mini summary: Rules give you control over AI's answer.
Definition: Length rules tell AI how long or short the answer should be.
Why it is important: Sometimes you want a short answer for a quiz, or a long answer for an essay.
Simple explanation: You can say "in 10 words" or "in one paragraph."
Real-life example: "What is the capital of Nigeria? Answer in one word."
School example: "Explain photosynthesis in 30 words."
Home example: "Tell me a joke in 5 words."
Nigerian example: "Describe Abuja in 3 sentences."
Illustration:
"Tell me about Nigeria in 10 words."
AI: "Nigeria is a large country in West Africa with many people."
Mini summary: Length rules control the size of AI's answer.
Definition: Tone rules tell AI how to sound β funny, serious, friendly, or formal.
Why it is important: The tone of the answer should match the situation. You wouldn't tell a joke in a serious tone.
Simple explanation: You can say "in a funny way" or "in a serious way."
Real-life example: "Tell me a joke in a silly tone."
School example: "Explain gravity in a serious way."
Home example: "Give me a recipe in a friendly tone."
Nigerian example: "Tell me about Lagos in an exciting tone."
Illustration:
"Tell me about rain in a sad tone."
AI: "The rain falls sadly, like tears from the sky."
Mini summary: Tone rules make AI sound the way you want.
Definition: Content rules tell AI what to include or exclude in the answer.
Why it is important: You might not want certain topics or information. You can tell AI to focus on specific things.
Simple explanation: "Only talk about fruits" or "Don't talk about vegetables."
Real-life example: "Tell me about pets, but only dogs."
School example: "Explain the solar system, but only the planets."
Home example: "Give me a shopping list, but only healthy items."
Nigerian example: "Tell me about Nigerian food, but only soups."
Illustration:
"Tell me about African animals, but only those that are big."
AI: "Elephants, giraffes, and lions are big African animals."
Mini summary: Content rules help AI focus on what you need.
Definition: Showing work means asking AI to explain the steps it took to get the answer.
Why it is important: This helps you understand how AI thinks and ensures the answer is correct.
Simple explanation: In math class, you show your work to get partial credit. AI can do the same.
Real-life example: "What is 15 x 3? Show your work."
School example: "Solve this equation and show the steps."
Home example: "How do I bake a cake? Show the steps."
Nigerian example: "How do you make jollof rice? Show the steps."
Illustration:
You: "What is 5 + 3? Show your work."
AI: "5 + 3 = 8. I added 5 and 3 together because plus means addition."
Mini summary: Asking AI to show work helps you learn its process.
Definition: Combining means using both examples and rules in one prompt.
Why it is important: This gives you the best of both worlds β AI knows exactly what you want and how to do it.
Simple explanation: You give an example and then say "and make it funny" or "keep it short."
Real-life example: "Write a poem like this: 'Roses are red, violets are blue.' But make it about cats."
School example: "Give me a fact like: 'The Earth is round.' But only in 5 words."
Home example: "Make a list like: apples, bananas. But only fruits that are red."
Nigerian example: "Tell me a story like the one about the tortoise. But set it in Lagos."
Illustration:
"Write a joke like 'Why did the chicken cross the road?' but make it about a dog and keep it short."
AI: "Why did the dog run in circles? Because it was chasing its tail!"
Mini summary: Combining examples and rules creates super prompts.
Definition: Constraints are limits that force AI to be more creative.
Why it is important: Sometimes when you limit options, AI thinks of clever new ideas.
Simple explanation: If you say "write a story without using the letter 'e'", AI has to work hard and become creative.
Real-life example: "Write a poem without using the word 'love'."
School example: "Explain math without using numbers."
Home example: "Give me a recipe without using salt."
Nigerian example: "Tell me about Nigeria without mentioning Lagos."
Illustration:
"Describe a house without using the word 'big'."
AI: "The house was spacious, with large windows and a huge garden."
Mini summary: Constraints make AI think in new and creative ways.
Definition: Multiple options mean asking AI to give more than one answer so you can choose.
Why it is important: Sometimes you want choices. AI can give you a few different answers.
Simple explanation: "Give me three different ideas for a birthday party."
Real-life example: "Give me three dinner options."
School example: "Give me three ways to solve this math problem."
Home example: "Give me three activities for a rainy day."
Nigerian example: "Give me three Nigerian recipes for breakfast."
Illustration:
You: "Give me three names for a pet dog."
AI: "1. Bingo, 2. Max, 3. Lucky."
Mini summary: Asking for multiple options gives you choices.
Definition: Improvement means asking AI to make its answer better.
Why it is important: AI can revise and enhance its own answers if you ask.
Simple explanation: After AI gives an answer, you say "Can you make that more interesting?"
Real-life example: "Can you make that joke funnier?"
School example: "Can you explain that in a simpler way?"
Home example: "Can you give me a shorter version?"
Nigerian example: "Can you tell that story with more drama?"
Illustration:
You: "Tell me about the sun."
AI: "The sun is a star."
You: "Can you make that more detailed?"
AI: "The sun is a huge, glowing ball of gas in the sky. It gives us light and warmth."
Mini summary: You can always ask AI to improve its answer.
Definition: The phrase "for example" introduces an example in your prompt.
Why it is important: It clearly signals to AI that you are giving a sample.
Simple explanation: Write "For example, I want a story like this..."
Real-life example: "Give me a list of chores. For example: 'wash dishes'."
School example: "Write a sentence. For example: 'The dog ran.'"
Home example: "Make a plan. For example: 'step 1, step 2'."
Nigerian example: "Tell me a proverb. For example: 'A chicken that sleeps early catches the worm.'"
Illustration:
"Give me a fruit. For example: 'apple'."
AI: "Banana."
Mini summary: "For example" is a great way to give AI a sample.
Definition: Avoid means telling AI what NOT to include.
Why it is important: Sometimes you want to avoid certain topics, words, or styles.
Simple explanation: "Don't use the word 'very'."
Real-life example: "Tell me a story, but don't mention animals."
School example: "Explain math, but don't use division."
Home example: "Give me a recipe, but don't include sugar."
Nigerian example: "Tell me about Nigeria, but don't mention politics."
Illustration:
"Tell me a joke, but don't mention food."
AI: "Why did the bicycle fall over? Because it was two-tired!"
Mini summary: Telling AI what to avoid gives you cleaner answers.
Definition: Practice means using what you learned to write prompts with examples and rules.
Why it is important: The more you practice, the better you become. You will be a prompt master!
Simple explanation: Write a prompt, check if it has examples and rules, then send it.
Real-life example: "Write a thank-you note like: 'Dear Mom, thank you for the gift.' Keep it to 20 words."
School example: "Explain gravity like: 'Gravity is a force.' Use simple words and keep it to 3 sentences."
Home example: "Give me a game like: 'Treasure hunt'. But make it an indoor game."
Nigerian example: "Tell me about Abuja like: 'Abuja is the capital.' Use 5 facts."
Illustration:
Your prompt: "Tell me about dogs. For example: 'Dogs are friendly.' Give me 3 facts and keep it funny."
AI: "1. Dogs are loyal. 2. They love to play. 3. They have a great sense of smell."
Mini summary: Practice makes perfect. Keep writing prompts with examples and rules.
How to Write a Prompt with Examples and Rules in 5 Steps:
This module introduces key advanced techniques. Teachers should stress that examples and rules are like giving instructions to a helper. Encourage students to write prompts with both elements. Use peer review activities where students evaluate each other's prompts. Discuss the power of constraints and how they can lead to surprising creativity. Remind students that practice is essential.
Parents can support their children by helping them think of examples and rules for everyday tasks. For instance, "Give me a menu like: breakfast, lunch, dinner. Keep it healthy." Use AI together and ask the child to improve the prompts by adding more rules. Praise them when they create clear and specific prompts. This builds critical thinking.
Flowchart: How to Write a Prompt with Examples and Rules
+---------------------+
| Start |
+----------+----------+
|
V
+----------+----------+
| Decide the goal |
| (e.g., write a poem)|
+----------+----------+
|
V
+----------+----------+
| Give an example |
| "For example: ..." |
+----------+----------+
|
V
+----------+----------+
| Set a rule |
| (length, tone) |
+----------+----------+
|
V
+----------+----------+
| Add constraints |
| (what to avoid) |
+----------+----------+
|
V
+----------+----------+
| Send to AI |
+----------+----------+
|
V
+----------+----------+
| Check the answer |
| Did it follow rules?|
+---------------------+
Comparison of Prompt Types
Basic Prompt: "Tell me about dogs."
With Example: "Tell me about dogs like: 'Dogs are loyal.'"
With Rule: "Tell me about dogs in 10 words."
With Both: "Tell me about dogs like: 'Dogs are loyal.' in 10 words."
Example vs Rule
| Example | Rule |
|---|---|
| Shows AI the style. | Tells AI how to behave. |
| "Like this: 'Roses are red.'" | "Keep it short." |
| Guides the format. | Controls the output. |
With and Without Constraints
| Without Constraint | With Constraint |
|---|---|
| "Write a story." | "Write a story without using the letter 'e'." |
| AI gives a regular story. | AI gives a creative, unusual story. |
In Module Four, we learned two powerful techniques: giving examples and setting rules. Examples show AI exactly what you want, and rules guide its response. We explored different types of rulesβlength, tone, contentβand how to combine them with examples for perfect prompts. We also discovered constraints that make AI more creative and learned to ask AI to show its work. Remember: a good prompt with examples and rules gets you the best answers. Keep practicing and you will become an AI prompt engineer!
Match the term with its definition:
| Term | Definition |
|---|---|
| 1. Example | A. A limit that makes AI creative |
| 2. Rule | B. A sample that shows AI what you want |
| 3. Constraint | C. An instruction that guides AI |
| 4. Show work | D. Asking for multiple answers |
| 5. Multiple options | E. Asking AI to explain its steps |
Answers: 1-B, 2-C, 3-A, 4-E, 5-D
Scenario 1: You want AI to write a poem for your mom, but you want it to be happy and short. Write a prompt with an example and a rule.
Scenario 2: You need a recipe for dinner, but you don't want it to include onions. Write a prompt with a content rule.
Scenario 3: You are learning about the solar system and want AI to explain it step by step. Write a prompt that asks AI to show its work.
In groups of 4, each member writes a prompt with an example and a rule on a topic like "animals," "food," or "sports." Then, swap prompts and evaluate if they are clear and follow the rules. Choose the best prompt in the group and present it to the class.
Write five prompts for different tasks. Each prompt must include at least one example and one rule. For example: "Write a joke like: 'Why did the tomato turn red?' Make it about a dog and keep it to 10 words." Then, test your prompts with a partner.
Create a "Prompt Recipe Book" with 5 different prompts. Each prompt should have an example and a rule. For example, "Recipe for a Joke: Example β 'Why did the chicken cross the road?' Rule β make it about a cow." Share your recipe book with the class.
Use an AI assistant to generate a text based on a prompt with an example and a rule. Write down the prompt, the AI's response, and then evaluate whether the AI followed your rules. If not, rewrite the prompt and try again.
Write a prompt that gives AI an example, sets three rules (length, tone, and content), and includes a constraint. For example: "Write a story like: 'Once upon a time...' Make it funny, in 50 words, about a cat, and avoid using the word 'very'." See if AI can follow all your instructions!
Answers to the Multiple Choice Questions are already provided above. For other exercises, refer to the lessons and key vocabulary.
In Module Five, we will learn about advanced prompt engineering like system prompts, using AI to analyze data, and even creating AI personas. We will also explore how to use AI for problem-solving and decision-making. Get ready to become a true AI expert! Keep practicing your example and rule-based prompts.
End of Module Four β You are becoming a prompt master!