Hiring Partners
Segilola Resources Operating LimitedTaviatech TechnologiesFCMBMTN NigeriaAdvans La Fayette Microfinance BankAboki AfricaFirst Bank of NigeriaOPay
← Ai Prompt Engineering Β· Lesson 5 of 13

Module Four

πŸ“– Every lesson in this course is free to read right here, no account needed. Create a free account to track your progress, take the exam, and earn your certificate.
5
Module 4: Giving Examples and Setting Rules for AI

πŸ“˜ Module Four: Giving Examples and Setting Rules for AI

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!

🎯 Learning Objectives

After this module, you will be able to:

  • Give AI examples to show what you want.
  • Set rules to guide AI's answers.
  • Use constraints to limit AI's response.
  • Tell AI the length of the answer you want.
  • Ask AI to show its work or reasoning.
  • Combine examples and rules for perfect prompts.

πŸ“– Warm-up Story: Folake's Art Class

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!

πŸ“š Main Lessons

Lesson 1: What is an Example in a Prompt?

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.

Lesson 2: Why Examples are Powerful

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.

Lesson 3: How to Give a Good Example

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.

Lesson 4: Set Rules for AI

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.

Lesson 5: Types of Rules – Length

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.

Lesson 6: Types of Rules – Tone

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.

Lesson 7: Types of Rules – Content

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.

Lesson 8: Ask AI to Show Its Work

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.

Lesson 9: Combine Examples and Rules

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.

Lesson 10: Use Constraints to Be Creative

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.

Lesson 11: Ask AI to Give Multiple Options

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.

Lesson 12: Ask AI to Improve Its Answer

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.

Lesson 13: Use 'For example' to Show What You Want

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.

Lesson 14: Ask AI to Avoid Certain Things

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.

Lesson 15: Practice with Real Prompts

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.

πŸ”‘ Key Vocabulary

  • Example: A sample that shows AI what you want.
  • Rule: An instruction that guides AI's answer.
  • Constraint: A limit that makes AI more creative.
  • Length: How short or long the answer is.
  • Tone: The feeling or mood of the answer (funny, serious).
  • Content: What the answer includes or excludes.
  • Show work: Asking AI to explain its steps.
  • Combine: Using examples and rules together.
  • Improve: Making the answer better.
  • Avoid: Telling AI what not to include.

πŸ’‘ Important Concepts

  • Examples are guides: They show AI the style and format you want.
  • Rules are controls: They give you power over the answer.
  • Constraints boost creativity: Limits can lead to clever ideas.
  • Show work = understanding: AI's steps help you learn.
  • Combining = best results: Use examples and rules together for super prompts.

πŸ“ Step-by-Step Explanations

How to Write a Prompt with Examples and Rules in 5 Steps:

  1. Decide the goal: What do you want AI to do? (e.g., write a poem).
  2. Give an example: Write "For example: [your sample]."
  3. Set a rule: Add a rule for length, tone, or content.
  4. Add constraints: Tell AI what to avoid or include.
  5. Send and check: Send the prompt and see if it works.

🌍 Real-life Examples

  • "Give me a recipe like: 'Ingredients: flour, sugar.' Keep it short."
  • "Write a thank-you note like: 'Dear Grandma, thank you for the gift.' Make it friendly."
  • "Tell me a joke like: 'What do you call a bear with no teeth? A gummy bear!' But make it about a dog."
  • "Explain how to ride a bike like: 'Step 1: Balance. Step 2: Pedal.' Use simple words."

πŸ‡³πŸ‡¬ Nigerian Examples

  • "Give me a list of Nigerian fruits like: 'orange, mango, banana.' Keep it to 5."
  • "Tell a story about Anansi like: 'Anansi was a clever spider.' Make it funny."
  • "Explain how to make puff-puff like: 'Step 1: Mix flour. Step 2: Fry.' Keep it simple."
  • "Describe Lagos like: 'Lagos is a busy city.' Give me 3 facts and avoid traffic."
  • "Name three Nigerian presidents like: 'Obasanjo, Jonathan, Buhari.'"

🎈 Fun Examples Children Relate To

  • "Write a joke about a cat like: 'What do you call a cat that eats lemons? A sour puss!'"
  • "Make a list of superhero names like: 'Super Dog, Captain Cat.' Give me 5."
  • "Tell a story about a robot like: 'Once there was a robot named Robby.' Keep it short."
  • "Create a new game like: 'Hide and seek with a twist.' Make it for 4 players."
  • "Describe a rainbow like: 'A rainbow has 7 colors.' Use 3 sentences and make it magical."

🏠 Everyday Examples

  • "Make a shopping list like: 'bread, milk.' Only include breakfast items."
  • "Set a timer like: 'Set a timer for 10 minutes.' Say it in a friendly tone."
  • "Give me a bedtime story like: 'Once upon a time.' Make it about a princess."
  • "Suggest a family activity like: 'Movie night.' Give me 3 options."
  • "Explain how to clean a room like: 'Step 1: Pick up toys.' Keep it short."

πŸ§‘β€πŸ« Teacher Notes

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.

πŸ‘ͺ Parent Tips

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.

🌟 Interesting Facts

  • AI can generate code based on examples.
  • Some AI models can learn a new style with just one example.
  • Constraints like "no vowels" can lead to very creative outputs.
  • AI is used to help design games with specific rules.
  • Example-based prompting is used in many professional fields.

πŸ€” Did You Know?

  • Did you know that giving AI an example is called "few-shot prompting"?
  • Did you know that you can ask AI to generate a text in the style of Shakespeare?
  • Did you know that constraints can make AI more imaginative?
  • Did you know that many writers use AI to generate ideas with rules?

🧠 Remember This

  • Always give an example when you want a specific style.
  • Set rules to control length, tone, and content.
  • Use constraints to boost creativity.
  • Ask AI to show its work to understand its process.
  • Combine examples and rules for super prompts.
  • Practice writing prompts with both elements.

❌ Common Mistakes

  • Giving a bad example: The example is too vague or different from what you want.
  • Setting too many rules: Overwhelming AI with rules can confuse it.
  • Not checking the output: Always review AI's answer to see if it followed your rules.
  • Forgetting to combine: Using only examples or only rules is less powerful.
  • Not being specific with constraints: "Don't mention X" is clear, but "Be creative" is vague.

βœ… Best Practices

  • Use "For example:" to introduce your sample.
  • Set one or two clear rules per prompt.
  • Be specific with constraints like "in 3 sentences" or "without using 'and'."
  • Ask AI to improve its answer if the first one isn't perfect.
  • Always read AI's response to ensure it followed your rules.
  • Experiment with different examples and rules to see what works best.

πŸ“Š Clear ASCII Illustrations

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."
    

πŸ“‹ Comparison Tables

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.

πŸ“Œ End-of-Module Summary

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!

❓ Frequently Asked Questions

  1. What is an example in a prompt? A sample that shows AI what you want.
  2. Why are examples important? They guide AI to the right style and format.
  3. What is a rule? An instruction that controls AI's answer.
  4. Can I set rules for length? Yes, say "in 20 words" or "in 3 sentences."
  5. What is a constraint? A limit that makes AI think creatively.
  6. How do I ask AI to show its work? Add "Show your work" or "Show the steps."
  7. Should I combine examples and rules? Yes, that gives the best results.
  8. What if AI doesn't follow my rules? Rewrite your prompt more clearly.
  9. Can I ask AI to improve its answer? Yes, say "Can you make that better?"
  10. How can I avoid mistakes? Check your prompt for clarity and test it.

πŸ“ Review Questions

  1. What is an example in a prompt?
  2. Why do we give AI examples?
  3. What is a rule?
  4. Name two types of rules.
  5. How do you set a length rule?
  6. What is a constraint?
  7. Why would you ask AI to show its work?
  8. How do you combine examples and rules?
  9. Give an example of a prompt with a rule.
  10. Give an example of a prompt with an example.
  11. What is the benefit of avoiding certain words?
  12. Can you ask AI to give multiple options?
  13. What should you do if AI's answer is not right?
  14. How does practice help with prompts?
  15. Give a Nigerian example of a prompt with a rule.

✍️ Fill-in-the-Blank

  1. An _______ shows AI what you want. (example)
  2. A _______ is an instruction that guides AI. (rule)
  3. You can set a _______ rule to control the size of the answer. (length)
  4. A _______ is a limit that makes AI creative. (constraint)
  5. You can ask AI to _______ its work to learn its process. (show)
  6. Combining examples and _______ gives the best results. (rules)
  7. You can ask AI to _______ certain topics. (avoid)
  8. Use "For _______" to give an example. (example)
  9. Always _______ your prompt before sending. (check)
  10. _______ makes you a better prompt writer. (Practice)

βœ… True or False

  1. Examples are not important for AI. (False)
  2. Rules help control AI's answer. (True)
  3. Length rules tell AI how many words to use. (True)
  4. Constraints make AI less creative. (False)
  5. You can ask AI to show its work. (True)
  6. Combining examples and rules is confusing for AI. (False)
  7. You should always check AI's answer. (True)
  8. Avoiding certain words is not useful. (False)
  9. Practice is not necessary for prompt writing. (False)
  10. Multiple options help you choose. (True)

πŸ”˜ Multiple Choice Questions

  1. What does an example do?
    A) Confuses AI
    B) Shows AI what you want
    C) Makes AI ignore you
    D) None
    Answer: B
  2. Which is a rule?
    A) "For example"
    B) "Keep it short"
    C) "Tell a story"
    D) None
    Answer: B
  3. What is a constraint?
    A) A limitation
    B) A type of example
    C) A rule about tone
    D) None
    Answer: A
  4. How do you ask AI to show its work?
    A) "Be quick"
    B) "Show the steps"
    C) "Tell a joke"
    D) None
    Answer: B
  5. What is the benefit of combining examples and rules?
    A) It makes AI confused
    B) It gives the best results
    C) It is not useful
    D) None
    Answer: B
  6. Which is a length rule?
    A) "Make it funny"
    B) "In 10 words"
    C) "Don't mention dogs"
    D) None
    Answer: B
  7. How do you give an example?
    A) "For example:"
    B) "Rule:"
    C) "Constraint:"
    D) None
    Answer: A
  8. What does "avoid" do?
    A) Tells AI what to include
    B) Tells AI what not to include
    C) Tells AI to stop
    D) None
    Answer: B
  9. Why ask for multiple options?
    A) To waste time
    B) To have choices
    C) To confuse AI
    D) None
    Answer: B
  10. What should you do if AI's answer is wrong?
    A) Ignore it
    B) Rewrite your prompt
    C) Give up
    D) None
    Answer: B
  11. Which is a Nigerian example?
    A) "Tell me about snow"
    B) "Tell me about Lagos"
    C) "Tell me about penguins"
    D) None
    Answer: B
  12. What is a content rule?
    A) "Make it funny"
    B) "Only talk about fruits"
    C) "In 3 sentences"
    D) None
    Answer: B
  13. Can you ask AI to improve its answer?
    A) No
    B) Yes
    C) Only sometimes
    D) None
    Answer: B
  14. What is the best way to practice?
    A) Do nothing
    B) Write prompts every day
    C) Read only
    D) None
    Answer: B
  15. Why are examples powerful?
    A) They remove guesswork
    B) They make AI lazy
    C) They are not useful
    D) None
    Answer: A

πŸ”— Matching Exercises

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

✏️ Short Answer Questions

  1. Write a prompt with an example.
  2. Write a prompt with a length rule.
  3. What is a constraint? Give an example.
  4. Why is it good to ask AI to show its work?
  5. Write a Nigerian prompt that combines an example and a rule.

🎭 Scenario-based Exercises

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.

πŸ‘₯ Group Activity

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.

πŸ§‘ Individual Activity

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.

πŸ’¬ Classroom Discussion Questions

  • Why are examples helpful when talking to AI?
  • What rules do you find most useful?
  • How can constraints make AI more creative?
  • When would you ask AI to show its work?
  • What is the most important thing you learned in this module?

πŸ› οΈ Mini Project

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.

πŸ“„ Practical Assignment

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.

πŸ† Challenge Exercise

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!

πŸ” Quiz Answers

Answers to the Multiple Choice Questions are already provided above. For other exercises, refer to the lessons and key vocabulary.

🎁 Key Takeaways

  • Examples show AI what you want.
  • Rules control the answer.
  • Constraints make AI creative.
  • Ask AI to show its work to learn.
  • Combine examples and rules for perfect prompts.
  • Always check and improve your prompts.
  • Practice is the key to mastery.

πŸ”œ Preparation for Module Five

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!

πŸ† Get Certified

πŸ”’

Earn this certificate

Every lesson is already free to read. Sign up, finish the lessons, pass the exam (₦2,000 or 20,000 coins), and get a verified certificate with your name on it.

πŸŽ“ Sign Up to Get Certified
πŸ› οΈ Practice Tools
Hands-on simulators & labs - subscription required.
β†’
🎯 Internship Tasks
Real-world tasks to build your portfolio - unlock them with a subscription.
β†’