Module Introduction
Welcome back, AI explorers! In Module 1, we learned about Generative AI and met Gemini – Google's super-smart AI assistant. We discovered that Gemini can write emails, create images, and answer questions. But here's the secret: how you ask Gemini is just as important as what you ask. This is called prompt engineering. A prompt is the question or instruction you give to the AI. And engineering means designing it carefully – like a builder designing a house. In this module, you will learn how to write amazing prompts that get you the best possible answers. You will discover techniques like role prompting, few-shot prompting, and chain-of-thought prompting. By the end, you will be a prompt master – able to make Gemini do almost anything you want. Let's start crafting great prompts!
Ada is 11 years old. She loves using Gemini to help her with homework. One day, she asks Gemini: "Tell me about lions." Gemini gives her a short answer. Ada is not satisfied. She asks her older brother, "Why didn't Gemini tell me more?" Her brother says, "You need to ask better questions. Try: 'Tell me five interesting facts about lions, including where they live and what they eat.'" Ada tries it. Gemini gives her a detailed, helpful answer. Ada learns that the way you ask changes the answer you get. She becomes a prompt expert. Now she can get Gemini to write poems, explain science, and even help with her business ideas. Ada's lesson: a good prompt makes all the difference!
Definition: A prompt is the instruction or question you give to an AI like Gemini. It tells the AI what you want it to do.
Why it's important: The prompt is how you communicate with the AI. A good prompt gets a good answer. A bad prompt gets a bad answer.
Simple explanation: Think of a prompt like a order you give to a waiter. If you say "food," the waiter doesn't know what you want. If you say "I'd like a cheeseburger with fries," you get exactly what you want.
Real‑life example: When you search on Google, you type a search query – that's a prompt.
School example: When you ask a teacher a question, you give them a prompt.
Home example: When you ask a parent for something, you give them a prompt.
Nigerian example: When you order food at a restaurant, you give the waiter a prompt.
+------------------------------------------+ | What is a Prompt? | |------------------------------------------+ | A prompt is an instruction you give | | to Gemini. | | | | +---------+ +---------+ +-------+| | | You ask | -> | Gemini | -> | Answer|| | | (Prompt)| | thinks | | || | +---------+ +---------+ +-------+| | | | Example: | | Prompt: "Write a poem about rain." | | Answer: A beautiful poem about rain! | +------------------------------------------+
Mini summary: A prompt is the instruction you give to the AI. It tells Gemini what you want it to do.
Definition: Prompt engineering is the art and science of designing prompts to get the best possible responses from AI.
Why it's important: The quality of your prompt determines the quality of the answer. A well‑designed prompt saves time and gives better results.
Simple explanation: It's like giving clear directions to a driver. If you say "take me to the market," they might take you to a different market. If you say "take me to the main market on Allen Avenue," you get exactly where you want to go.
Real‑life example: In a business meeting, you get better answers when you ask specific questions.
School example: You get better help from a teacher when you ask a specific question.
Home example: You get better help from a parent when you explain clearly.
Nigerian example: At the market, you get better prices when you bargain clearly.
+------------------------------------------+ | Why Prompt Engineering Matters | |------------------------------------------+ | +-------------------+ | | | Good Prompt | → Great Answer | | +-------------------+ | | +-------------------+ | | | Bad Prompt | → Poor Answer | | +-------------------+ | | | | The better the prompt, the better the | | result! | +------------------------------------------+
Mini summary: Prompt engineering is designing prompts to get the best answers. Good prompts = good answers.
Definition: A good prompt has three parts: clarity (clear instructions), context (background information), and constraints (rules or limits).
Why it's important: These three parts help Gemini understand exactly what you want.
Simple explanation: Think of it like baking a cake. Clarity is knowing you want a cake. Context is knowing the occasion. Constraints are knowing the ingredients you have.
Real‑life example: "Write a birthday message for my friend" (clarity) who loves football (context) in 50 words (constraint).
School example: "Explain photosynthesis" (clarity) for a 6th grader (context) in 3 paragraphs (constraint).
Home example: "Give me a recipe" (clarity) for a quick dinner (context) using only 5 ingredients (constraint).
Nigerian example: "Write a business proposal" (clarity) for a Lagos market (context) in 2 pages (constraint).
+------------------------------------------+ | The Anatomy of a Good Prompt | |------------------------------------------+ | +-------------------+ | | | Clarity | → What do you | | | | want? | | +-------------------+ | | +-------------------+ | | | Context | → What is the | | | | situation? | | +-------------------+ | | +-------------------+ | | | Constraints | → Any rules or | | | | limits? | | +-------------------+ | | | | Good prompt = Clarity + Context + | | Constraints | +------------------------------------------+
Mini summary: A good prompt has clarity (what you want), context (background), and constraints (rules).
Definition: Clarity means being clear and specific about what you want. Don't be vague – be exact.
Why it's important: If you're vague, Gemini might guess wrong. Being specific gives you exactly what you want.
Simple explanation: Instead of saying "tell me about animals," say "tell me about elephants – their size, what they eat, and where they live."
Real‑life example: "Write an email to a customer" vs "Write a friendly email to thank a customer for their order and ask for a review."
School example: "Help me with my homework" vs "Help me solve this math problem: 3x + 5 = 20."
Home example: "Make dinner" vs "Make pasta with tomato sauce."
Nigerian example: "Give me business advice" vs "Give me advice on how to sell more beads at my online store."
+------------------------------------------+ | Clarity Example | |------------------------------------------+ | Vague prompt: | | "Write something about Nigeria." | | → Gemini doesn't know what to write. | | | | Clear prompt: | | "Write a short paragraph about Nigeria's| | capital city, Lagos, and why it is | | important." | | → Gemini knows exactly what to write. | | | | Be clear, be specific! | +------------------------------------------+
Mini summary: Clarity means being specific about what you want. Clear prompts get better answers.
Definition: Context is the background information you give to Gemini so it understands the situation.
Why it's important: Context helps Gemini understand why you're asking and what's important.
Simple explanation: It's like telling a story – you need to set the scene so the listener understands.
Real‑life example: "I'm writing a marketing plan for a new shoe company. Help me come up with a slogan."
School example: "I'm doing a project on climate change. Give me three key facts."
Home example: "We're having a party for my friend. Help me plan the activities."
Nigerian example: "I'm starting a small business in Lagos selling fabrics. Give me marketing ideas."
+------------------------------------------+ | Context Example | |------------------------------------------+ | Without context: | | "Write a speech." | | → Gemini doesn't know the occasion. | | | | With context: | | "Write a 1-minute speech for my | | school's graduation ceremony. I want | | to thank my teachers and parents." | | → Gemini writes a perfect speech. | | | | Context makes everything clear! | +------------------------------------------+
Mini summary: Context is background information that helps Gemini understand the situation.
Definition: Constraints are rules or limits you give to Gemini, like word count, tone, or format.
Why it's important: Constraints help Gemini give you exactly what you need in the right format.
Simple explanation: It's like telling a cook to make a meal in 30 minutes with only 5 ingredients – it gives them clear boundaries.
Real‑life example: "Write a product description in 50 words, friendly tone, and include the price."
School example: "Write a summary of the chapter in 3 sentences."
Home example: "Give me a recipe that takes less than 20 minutes to make."
Nigerian example: "Write a business proposal in 2 pages, formal tone, and include a budget."
+------------------------------------------+ | Constraints Example | |------------------------------------------+ | Without constraints: | | "Write a poem." | | → Gemini writes a long poem. | | | | With constraints: | | "Write a poem about rain, maximum 4 | | lines, and use the word 'water' twice."| | → Gemini writes exactly what you ask. | | | | Constraints give you control! | +------------------------------------------+
Mini summary: Constraints are rules that tell Gemini how to format the answer. They give you control.
Definition: Role prompting is when you ask Gemini to act like a specific person – a teacher, a chef, a business expert, or anyone.
Why it's important: Role prompting changes the tone and style of the answer. It makes Gemini more specialized.
Simple explanation: It's like asking a friend to pretend to be a teacher – they answer differently than if they were just being themselves.
Real‑life example: "Act as a financial advisor. Give me tips on saving money."
School example: "Act as a history teacher. Explain World War II."
Home example: "Act as a chef. Give me a recipe for chicken stew."
Nigerian example: "Act as a Lagos business owner. Give me advice on selling in the market."
+------------------------------------------+ | Role Prompting Example | |------------------------------------------+ | Normal prompt: | | "Give me advice on starting a business."| | → Generic answer. | | | | Role prompt: | | "Act as a successful entrepreneur in | | Nigeria. Give me advice on starting a | | small business in Lagos." | | → Expert advice tailored to your need. | | | | Roles make answers better! | +------------------------------------------+
Mini summary: Role prompting asks Gemini to act like a specific person. It changes the style and tone of the answer.
Definition: Few‑shot prompting is when you give Gemini a few examples of what you want before asking for more.
Why it's important: Examples help Gemini understand the pattern of what you want. It's like showing a child how to do a puzzle before they try.
Simple explanation: You show Gemini two or three examples of the answer you want, and then ask for more in the same style.
Real‑life example: "Here are three product descriptions I like. Now write one for this new product."
School example: "Here are two examples of good essay introductions. Write one for this topic."
Home example: "Here are two recipes I like. Give me one that's similar."
Nigerian example: "Here are two examples of good business slogans. Write one for my business."
+------------------------------------------+ | Few‑Shot Prompting Example | |------------------------------------------+ | Examples: | | 1. "Write a catchy slogan for a shoe | | store: 'Walk in style, walk with | | pride.'" | | 2. "Write a catchy slogan for a bakery:| | 'Fresh bread, happy hearts.'" | | | | Now ask: | | "Write a catchy slogan for a bookstore| | in the same style." | | → Gemini understands the pattern and | | gives a great answer! | +------------------------------------------+
Mini summary: Few‑shot prompting gives Gemini examples of what you want before asking for more.
Definition: Chain‑of‑thought prompting asks Gemini to think step by step, explaining its reasoning along the way.
Why it's important: This technique helps Gemini solve complex problems by breaking them down into smaller steps.
Simple explanation: It's like asking a friend to explain their answer step by step, instead of just giving the final answer.
Real‑life example: "Solve this math problem step by step: 25 + 17 = ?"
School example: "Explain how to write a paragraph step by step."
Home example: "Explain how to cook rice step by step."
Nigerian example: "Explain how to register a business in Nigeria step by step."
+------------------------------------------+ | Chain‑of‑Thought Example | |------------------------------------------+ | Without chain‑of‑thought: | | "What is the capital of France?" | | → "Paris." | | | | With chain‑of‑thought: | | "What is the capital of France? | | Think step by step: France is a country| | in Europe. The capital is a city where | | the government is located. That city is| | Paris." | | → Gemini explains the reasoning. | | | | Step‑by‑step thinking = better answers!| +------------------------------------------+
Mini summary: Chain‑of‑thought prompting asks Gemini to think step by step, explaining its reasoning.
Definition: A prompt library is a collection of tested prompts that you can reuse for common tasks.
Why it's important: Instead of writing a new prompt every time, you can use a stored prompt and save time.
Simple explanation: It's like keeping your favourite recipes in a box. When you need one, you just pull it out.
Real‑life example: A business owner keeps a prompt for writing emails, another for creating ads, and another for analyzing data.
School example: A student keeps prompts for writing essays, summarizing, and explaining topics.
Home example: A parent keeps prompts for recipes, meal planning, and to‑do lists.
Nigerian example: A Lagos business owner keeps prompts for customer service, marketing, and inventory management.
+------------------------------------------+ | Building a Prompt Library | |------------------------------------------+ | Step 1: Identify common tasks. | | Step 2: Write a prompt for each task. | | Step 3: Test each prompt. | | Step 4: Refine and improve. | | Step 5: Store in a document or app. | | | | Examples of prompts to save: | | - Email drafting | | - Idea generation | | - Data analysis | | - Content creation | +------------------------------------------+
Mini summary: A prompt library is a collection of tested prompts you can reuse. It saves time and improves results.
Definition: Refining means improving your prompt based on the answer you get. Iterating means trying again and again until you get it right.
Why it's important: The first prompt isn't always perfect. Refining helps you get better answers.
Simple explanation: It's like cooking – you taste the food, add more salt, taste again, and keep adjusting until it's perfect.
Real‑life example: If Gemini gives you a short answer, add more context and ask again.
School example: If Gemini doesn't explain a topic well, ask it to explain it differently.
Home example: If Gemini gives you a recipe you don't like, ask it to suggest a different one.
Nigerian example: If Gemini gives you business advice that doesn't fit, refine your prompt to add more specific details.
+------------------------------------------+ | Refining and Iterating | |------------------------------------------+ | Prompt 1: "Write about Lagos." | | Answer: Too short. | | | | Prompt 2: "Write a 100-word paragraph | | about Lagos, the commercial capital of | | Nigeria." | | Answer: Better, but still missing | | something. | | | | Prompt 3: "Write a 150-word paragraph | | about Lagos, Nigeria's commercial | | capital. Include information about the | | population, economy, and culture." | | Answer: Perfect! | | | | Keep refining until it's right! | +------------------------------------------+
Mini summary: Refining means improving your prompt. Iterating means trying again and again until you get it right.
Definition: Let's look at some real‑world prompts that businesses use every day.
Why it's important: Seeing real examples helps you understand how to apply prompting in your own work.
Simple explanation: It's like seeing how others cook before you start cooking yourself.
Real‑life example: A business owner uses prompts to write emails, create social media posts, and analyze reports.
School example: A student uses prompts to write essays, summarize texts, and explain concepts.
Home example: A parent uses prompts to plan meals, create shopping lists, and manage schedules.
Nigerian example: A Lagos business uses prompts to handle customer service, create marketing content, and manage inventory.
+------------------------------------------+ | Real‑World Prompting Examples | |------------------------------------------+ | Customer Service: | | "Act as a friendly customer service | | representative. Draft a response to a | | customer who is unhappy with their | | order. Apologize and offer a solution."| | | | Marketing: | | "Write a social media post for my | | business. The post should announce a | | 20% discount and include a call to | | action. Make it exciting!" | | | | Data Analysis: | | "Analyze this sales data and tell me | | the top 3 products and why they are | | selling well." | +------------------------------------------+
Mini summary: Real‑world prompts help businesses with customer service, marketing, and data analysis.
In this module, we learned about prompt engineering – the art of designing prompts to get the best answers from Gemini. We learned that a good prompt has clarity (being specific), context (background), and constraints (rules). We explored advanced techniques like role prompting (acting like someone), few‑shot prompting (showing examples), and chain‑of‑thought prompting (step‑by‑step thinking). We also learned how to build a prompt library and refine prompts through iteration. You are now a prompt master – ready to get the best out of Gemini!
Concept 1: The better the prompt, the better the answer. Good prompts = good results.
Concept 2: A good prompt has clarity, context, and constraints. These three parts make it powerful.
Concept 3: Techniques like role prompting and few‑shot prompting improve results. They help Gemini understand exactly what you want.
Concept 4: Refining and iterating leads to perfect prompts. Keep trying until you get it right.
How to write a good prompt in 5 steps:
How to use role prompting:
We've seen many real‑life examples in the lessons, such as writing emails, creating marketing content, and analyzing data. These show how prompt engineering is used in business every day.
In Nigeria, businesses use prompt engineering to write customer emails, create social media posts, and analyze sales data. Lagos entrepreneurs use prompts to get advice on selling in the market, managing inventory, and growing their businesses.
Imagine you have a robot friend. If you say "move," it might move left or right. If you say "move forward 3 steps," it moves exactly 3 steps forward. That's prompt engineering!
Another fun example: You ask Gemini to "tell me a story" – you get a short story. You ask "tell me a 5-sentence story about a cat who can fly" – you get exactly what you want.
Key points: Emphasize that prompt engineering is a skill that improves with practice. Use lots of examples. Encourage students to experiment with different prompts.
Activity idea: Have students write a prompt for a specific task, test it, and refine it.
Parents can help children practice prompt engineering by asking them to give clear instructions for tasks. Encourage them to be specific and add details. Show them how to ask Gemini for help with homework using well‑designed prompts.
Did you know that the word "prompt" comes from the Latin word "promptus," which means "ready" or "prepared"?
Did you know that some prompts are so powerful they can make an AI act like a human?
+------------------------------------------+ | The Perfect Prompt Formula | |------------------------------------------+ | +-------------------+ | | | Clarity | | | | (What you want) | | | +-------------------+ | | + | | v | | +-------------------+ | | | Context | | | | (Background) | | | +-------------------+ | | + | | v | | +-------------------+ | | | Constraints | | | | (Rules) | | | +-------------------+ | | | | | v | | +-------------------+ | | | Great Answer! | | | +-------------------+ | +------------------------------------------+ +------------------------------------------+ | Prompt Engineering Flow | |------------------------------------------+ | +---------+ | | | Write | | | | Prompt | | | +----+----+ | | | | | v | | +----+----+ | | | Test | | | | with | | | | Gemini | | | +----+----+ | | | | | v | | +----+----+ | | | Check | | | | Answer | | | +----+----+ | | | | | v | | +----+----+ | | | Refine | ← If answer is not good | | | Prompt | | | +----+----+ | | | | | v | | +----+----+ | | | Perfect | | | | Answer | | | +---------+ | +------------------------------------------+
| Prompt Type | What it does | Example |
|---|---|---|
| Basic Prompt | Simple instruction | "Write a poem." |
| Role Prompt | Act like someone | "Act as a chef. Give me a recipe." |
| Few‑Shot | Shows examples | "Here are 2 examples. Now do this." |
| Chain‑of‑Thought | Step‑by‑step | "Think step by step." |
| Prompt Part | Purpose | Example |
|---|---|---|
| Clarity | What you want | "Write a product description" |
| Context | Background | "For a new shoe company" |
| Constraints | Rules | "In 50 words, friendly tone" |
In this module, we mastered the art of prompt engineering. We learned that a prompt is the instruction you give to Gemini, and that good prompts lead to good answers. We discovered the three parts of a great prompt: clarity (being specific), context (giving background), and constraints (setting rules). We explored powerful techniques like role prompting (acting like someone), few‑shot prompting (showing examples), and chain‑of‑thought prompting (step‑by‑step thinking). We learned to build a prompt library and refine prompts through iteration. You are now a prompt master – able to get the best possible answers from Gemini. In the next module, we will dive into using Gemini in Google Workspace – Gmail, Docs, Sheets, and Slides!
Match the term with its definition.
| Term | Definition |
|---|---|
| Clarity | a) Background information |
| Context | b) Being specific |
| Constraints | c) Rules or limits |
| Role Prompting | d) Act like someone |
| Few‑Shot Prompting | e) Giving examples |
Answers: Clarity – b, Context – a, Constraints – c, Role Prompting – d, Few‑Shot Prompting – e
Scenario 1: You need to write a business email to a customer about a new product. Write a prompt that gives Gemini all the information it needs.
Scenario 2: You want Gemini to help you plan a social media campaign for your business. Write a prompt that includes clarity, context, and constraints.
"Prompt Challenge" – In groups of 4, write the best prompt for a specific task (e.g., writing a business plan, creating a logo description, or analyzing sales data). Test your prompt with Gemini and present the results to the class.
Write a prompt for Gemini to help you with a task you do regularly (like writing emails, creating to‑do lists, or planning meals). Test it, refine it, and save it to your prompt library.
"Build Your Prompt Library" – Create a document with 5 prompts for common tasks (email, marketing, data analysis, planning, and creative writing). Test and refine each prompt. Share your library with the class.
Using Gemini, write a prompt that generates a business plan outline for a small business. Test the prompt, refine it, and submit the final prompt and the generated outline.
"Prompt Master Challenge" – Write a prompt that uses all three techniques: role prompting, few‑shot prompting, and chain‑of‑thought prompting. Test it with Gemini and explain how each technique improved the answer.
In Module 3, we will explore Gemini in Google Workspace – Core Applications. You will learn how to use Gemini inside Gmail, Docs, Sheets, and Slides to draft emails, write documents, analyze data, and create presentations. Get ready to see Gemini in action in the tools you use every day!