Hiring Partners
Segilola Resources Operating LimitedTaviatech TechnologiesFCMBMTN NigeriaAdvans La Fayette Microfinance BankAboki AfricaFirst Bank of NigeriaOPay
← Artificial Intelligence Fundamentals · Lesson 3 of 8

Module Two

📖 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.
3
Module 2 · How AI Works

Module Two · How AI Works

Hello, AI explorer! In Module 1, we learned what Artificial Intelligence is. Now, we are going to look inside the AI machine to understand how it actually works. How does a computer learn to recognise a cat? How does it understand your voice? How does it decide what movie to recommend? In this module, we will uncover the secrets of how AI thinks, learns, and makes decisions. We will learn about data, algorithms, and training – the three things every AI needs. Let us open the hood and see the magic!

🎯 Learning Objectives

By the end of this module, you will be able to:

  • Explain how AI makes decisions.
  • Understand what data is and why it is important.
  • Describe what an algorithm does.
  • Explain how AI is trained.
  • Understand the difference between training and testing.

📖 Warm‑up Story: The AI That Learned to Recognise Apples

Adebayo loves apples. He wanted to teach his computer to recognise apples, just like he does. He showed the computer 1,000 pictures of apples and 1,000 pictures of oranges. The computer looked at them carefully, trying to find differences. It noticed that apples are usually red or green, and oranges are orange! It learned that apples often have a stem, and oranges are round. After seeing many pictures, the computer could tell the difference. Adebayo tested the computer with a new picture – and it guessed correctly! The computer had learned from data. This is exactly how AI works – you teach it with examples, and it learns!

📘 Main Lessons

Lesson 1: How AI Makes Decisions

AI makes decisions by looking at data, finding patterns, and making predictions. It is like how you recognise your friend from far away – you see their height, the way they walk, and you know it is them.

Why important? Understanding how AI decides helps us trust it.

Simple explanation: AI is like a detective that finds clues in data.

Real-life example: A spam filter decides if an email is spam based on patterns.

School example: You solve a math problem by looking for patterns.

Home example: You know it is time to eat because you see the clock.

Nigerian example: AI in a bank decides if a transaction is fraud by looking for suspicious patterns.

  DATA ----> PATTERNS ----> DECISION

Mini summary: AI makes decisions by finding patterns in data.

Lesson 2: What is Data?

Data is information. It can be numbers, words, pictures, sounds, or anything that can be stored on a computer. AI needs data to learn.

Why important? Without data, AI cannot learn anything.

Simple explanation: Data is like food for AI – without it, AI is hungry and useless.

Real-life example: A recipe is data for cooking.

School example: Your test scores are data for your teacher.

Home example: Your family's grocery list is data.

Nigerian example: Weather data helps farmers decide when to plant.

  DATA = INFORMATION
  Examples: pictures, words, numbers, sounds

Mini summary: Data is information that AI uses to learn.

Lesson 3: Types of Data

There are two main types of data: structured and unstructured. Structured data is organised – like a table with rows and columns. Unstructured data is not organised – like a photo or a video.

Why important? Different types of data need different ways to be processed.

Simple explanation: Structured data is like a neat shelf; unstructured data is like a messy pile.

Real-life example: Spreadsheets have structured data; photos have unstructured data.

School example: Your timetable is structured; your drawings are unstructured.

Home example: A budget list is structured; family photos are unstructured.

Nigerian example: Bank records are structured; social media videos are unstructured.

  STRUCTURED DATA = ORGANISED (e.g., tables)
  UNSTRUCTURED DATA = NOT ORGANISED (e.g., images, videos)

Mini summary: Data can be organised (structured) or messy (unstructured).

Lesson 4: What is an Algorithm?

An algorithm is a set of step‑by‑step instructions that tells a computer what to do. It is like a recipe for cooking or a set of directions to a place.

Why important? Algorithms are the steps that AI follows to solve problems.

Simple explanation: It is like a map that guides AI.

Real-life example: A recipe for making jollof rice.

School example: The steps to solve a long division problem.

Home example: Instructions to assemble a piece of furniture.

Nigerian example: An algorithm helps sort through bank transactions.

  ALGORITHM = STEP‑BY‑STEP INSTRUCTIONS

Mini summary: Algorithms are instructions that guide AI.

Lesson 5: Training AI – Learning from Examples

Training is the process of teaching AI by showing it many examples. The AI looks at the examples, finds patterns, and learns. It is like how you learn to recognise animals by seeing them.

Why important? Training makes AI smart.

Simple explanation: It is like practicing until you get it right.

Real-life example: AI learns to recognise dogs by seeing thousands of dog pictures.

School example: You learn multiplication by practicing many problems.

Home example: You learn to cook by watching your parent and trying.

Nigerian example: AI is trained on Nigerian voices to understand accents.

  TRAINING = TEACHING AI WITH EXAMPLES

Mini summary: Training teaches AI using examples.

Lesson 6: Testing – Checking If AI Works

After training, AI must be tested with new examples that it has never seen before. This shows if it really learned or just memorised.

Why important? Testing ensures AI is correct and reliable.

Simple explanation: It is like taking a test to see if you really understood the lesson.

Real-life example: AI is tested with new pictures to see if it can recognise them.

School example: Your teacher gives you a quiz to check your learning.

Home example: You test a new recipe by cooking it.

Nigerian example: An AI model is tested with new Nigerian data.

  TESTING = CHECKING IF AI LEARNED CORRECTLY

Mini summary: Testing checks if AI learned correctly.

Lesson 7: Overfitting – When AI Memorises Too Much

Overfitting happens when AI memorises the training data but cannot handle new data. It is like studying only one version of a test and failing if the questions change.

Why important? Overfitting makes AI unreliable.

Simple explanation: It is like learning a song perfectly but not knowing how to sing any other song.

Real-life example: AI can recognise a specific cat but not other cats.

School example: You remember the answer to one question but not the topic.

Home example: You can cook one dish but not any other.

Nigerian example: AI trained on only Lagos data may not work in Kano.

  OVERFITTING = AI MEMORISES, DOESN'T UNDERSTAND

Mini summary: Overfitting means AI memorised instead of learning.

Lesson 8: Underfitting – When AI Does Not Learn Enough

Underfitting happens when AI does not learn enough from the data. It is like not studying enough for a test and failing because you did not know the answers.

Why important? Underfitting means AI is not smart enough.

Simple explanation: It is like not practicing enough to get better.

Real-life example: AI that cannot tell dogs from cats because it did not see enough examples.

School example: You fail a test because you did not study.

Home example: You cannot cook because you never tried.

Nigerian example: AI cannot understand Nigerian accents because it was not trained on enough samples.

  UNDERFITTING = AI DIDN'T LEARN ENOUGH

Mini summary: Underfitting means AI did not learn enough.

Lesson 9: Features – What AI Looks For

Features are the important details that AI uses to make decisions. For example, when recognising a dog, features might be ears, tail, fur, and nose.

Why important? Features help AI tell things apart.

Simple explanation: It is like looking for clues.

Real-life example: AI looks at the shape of letters to read text.

School example: You look at key words to answer a question.

Home example: You look at the colour of fruit to know if it is ripe.

Nigerian example: AI looks at patterns in traffic to predict congestion.

  FEATURES = IMPORTANT DETAILS AI USES

Mini summary: Features are the details AI uses to decide.

Lesson 10: Labels – Giving AI the Answers

Labels are the correct answers we give to AI during training. For example, if we show AI a picture of a dog, we label it "dog". This helps AI learn.

Why important? Labels teach AI what is correct.

Simple explanation: It is like giving the answers so you can learn.

Real-life example: A teacher tells you the correct answer after you try.

School example: Your teacher marks your work with correct answers.

Home example: Your parent tells you the right way to do something.

Nigerian example: An AI learns Yoruba words with labels.

  LABELS = THE CORRECT ANSWERS FOR AI

Mini summary: Labels are the correct answers AI learns from.

Lesson 11: Supervised Learning – Learning with Answers

Supervised learning is when AI learns with labelled data – the correct answers are given. It is like a teacher helping you learn.

Why important? Supervised learning is the most common type of AI training.

Simple explanation: It is like learning with a teacher.

Real-life example: AI learns to recognise objects with labelled pictures.

School example: Your teacher tells you the correct answer.

Home example: Your parent teaches you how to cook.

Nigerian example: AI learns to understand Nigerian languages with labelled examples.

  SUPERVISED LEARNING = LEARNING WITH LABELS

Mini summary: Supervised learning is learning with correct answers.

Lesson 12: Unsupervised Learning – Learning Without Answers

Unsupervised learning is when AI finds patterns without any labels. It is like exploring and discovering things on your own.

Why important? Unsupervised learning helps find hidden patterns.

Simple explanation: It is like exploring without a map.

Real-life example: AI groups customers by shopping habits.

School example: You discover a pattern in numbers on your own.

Home example: You find new ways to organise your room.

Nigerian example: AI finds patterns in market data.

  UNSUPERVISED LEARNING = FINDING PATTERNS WITHOUT LABELS

Mini summary: Unsupervised learning finds patterns without labels.

Lesson 13: Reinforcement Learning – Learning by Trying

Reinforcement learning is when AI learns by trying and getting rewards or penalties. It is like learning to play a game – you get points when you win and lose points when you lose.

Why important? Reinforcement learning helps AI learn complex tasks.

Simple explanation: It is like learning by trial and error.

Real-life example: AI learns to play chess by playing many games.

School example: You learn by making mistakes and correcting them.

Home example: You learn to ride a bike by falling and trying again.

Nigerian example: AI learns to optimise traffic lights by trying different timings.

  REINFORCEMENT LEARNING = LEARNING BY TRIAL AND ERROR

Mini summary: Reinforcement learning is learning by trying and getting feedback.

Lesson 14: The Role of Human Feedback

Sometimes, AI needs human feedback to improve. People check AI's answers and tell it if it is right or wrong. This helps AI get better.

Why important? Human feedback makes AI more accurate.

Simple explanation: It is like having a teacher guide you.

Real-life example: People correct AI when it misidentifies something.

School example: Your teacher gives you feedback on your work.

Home example: Your parent tells you how to improve.

Nigerian example: Nigerians provide feedback to improve AI that understands their language.

  HUMAN FEEDBACK = PEOPLE HELPING AI IMPROVE

Mini summary: Human feedback helps AI learn better.

Lesson 15: Review – How AI Works

AI works by learning from data using algorithms. It is trained with examples, tested with new data, and improved with human feedback. Understanding how AI works helps us use it better.

Why important? Knowing how AI works empowers us.

Simple explanation: It is like knowing how a car works before driving it.

Real-life example: You trust AI more when you understand it.

School example: You do better when you understand the material.

Home example: You fix things better when you know how they work.

Nigerian example: Understanding AI helps you use it to solve Nigerian problems.

  AI = DATA + ALGORITHM + TRAINING

Mini summary: AI works by learning from data using algorithms.

📚 Key Vocabulary

  • Data – Information that AI uses to learn.
  • Algorithm – A set of step‑by‑step instructions.
  • Training – Teaching AI with examples.
  • Testing – Checking if AI learned correctly.
  • Overfitting – When AI memorises instead of learns.
  • Underfitting – When AI does not learn enough.
  • Features – The important details AI uses.
  • Labels – The correct answers for AI.
  • Supervised learning – Learning with labels.
  • Unsupervised learning – Learning without labels.
  • Reinforcement learning – Learning by trial and error.

💡 Important Concepts

  • AI uses data to learn.
  • Algorithms are the instructions AI follows.
  • Training and testing are essential steps.
  • Overfitting and underfitting are problems to avoid.
  • There are different types of learning: supervised, unsupervised, and reinforcement.

🧩 Step‑by‑Step Explanations

How AI learns (step by step):

  1. Collect data (e.g., pictures of cats and dogs).
  2. Label the data (tell AI which is which).
  3. Choose an algorithm (a method for learning).
  4. Train the AI (show it the data).
  5. Test the AI (give it new data).
  6. Check results – did it get it right?
  7. If not, adjust and retrain.
  8. Repeat until AI is accurate.

How to recognise overfitting:

  1. AI performs well on training data.
  2. AI performs poorly on new data.
  3. This means it memorised, not learned.
  4. Solution: use more diverse data.

🌍 Real‑life Examples

  • USA: AI in self‑driving cars learns from many driving examples.
  • UK: AI in hospitals learns to detect diseases from medical images.
  • China: AI learns to recognise faces from millions of photos.
  • India: AI learns to predict crop yields from weather data.

🇳🇬 Nigerian Examples

  • Lagos: AI learns traffic patterns to manage congestion.
  • Abuja: AI learns from government data to improve services.
  • Ibadan: AI learns from agricultural data to help farmers.
  • Port Harcourt: AI learns from oil and gas data.
  • Kano: AI learns from market data to support businesses.

🎈 Fun Examples for Children

  • Video games: AI learns to be a better opponent the more you play.
  • Voice assistants: They learn your voice over time.
  • Smart toys: They learn how you play and adapt.
  • Recommendations: They learn what you like.

🏠 Everyday Examples

  • Spell check: AI learns from your typing patterns.
  • Maps: AI learns traffic patterns to give directions.
  • Music apps: AI learns what songs you like.
  • Smart home: AI learns your daily routines.

🧑‍🏫 Teacher Notes

  • Use the warm‑up story to show how AI learns.
  • Demonstrate the difference between training and testing.
  • Use analogies like cooking or sports to explain concepts.
  • Emphasise that data is the key to AI.
  • Discuss Nigerian examples to make it relevant.

👪 Parent Tips

  • Show your child how AI learns from your phone.
  • Discuss how you learn new skills – similar to AI.
  • Encourage your child to think about what data AI might use.
  • Explore AI tools together.

🧐 Interesting Facts

  • AI can learn to play games just by watching humans play.
  • Some AI models take weeks to train.
  • AI can learn to understand speech in multiple languages.
  • Nigeria has AI research groups working on local problems.
  • AI can generate new images from what it has learned.

🤔 Did You Know?

  • Did you know that AI can learn to translate languages with enough data?
  • Did you know that AI can compose music?
  • Did you know that AI learns faster with more data?
  • Did you know that Nigerian companies are training AI for local needs?

🔔 Remember This

  • AI learns from data.
  • Algorithms are the instructions AI follows.
  • Training and testing are both important.
  • Overfitting and underfitting are problems to avoid.
  • There are different types of learning.

⚠️ Common Mistakes

  • Mistake: Thinking AI is always correct. Correction: AI can make mistakes.
  • Mistake: Confusing training and testing. Correction: Training is learning; testing is checking.
  • Mistake: Believing AI does not need data. Correction: Data is essential.
  • Mistake: Thinking AI is magic. Correction: AI works through clear steps.

✅ Best Practices

  • Use diverse data for training.
  • Always test AI on new data.
  • Watch for overfitting and underfitting.
  • Use human feedback to improve.
  • Keep learning about AI advancements.

🖼️ ASCII Diagrams & Tables

Diagram: AI Learning Cycle

  COLLECT DATA
       |
       V
  LABEL DATA
       |
       V
  TRAIN AI
       |
       V
  TEST AI
       |
       V
  IMPROVE
       |
       V
  REPEAT

Flowchart: Types of Learning

  LEARNING
       |
       +-- SUPERVISED (with labels)
       |
       +-- UNSUPERVISED (without labels)
       |
       +-- REINFORCEMENT (trial and error)

Timeline: AI Training Process

  Week 1: Collect and label data
  Week 2: Choose algorithm
  Week 3: Train AI model
  Week 4: Test and evaluate
  Week 5: Improve and retrain
  Week 6: Deploy AI

📊 Comparison Tables

Table 1: Types of Learning

Type Has Labels? Example
Supervised Yes Recognising objects
Unsupervised No Finding patterns in data
Reinforcement Rewards/Penalties Playing games

Table 2: Training vs Testing

Stage What Happens Purpose
Training AI learns from data Teach AI
Testing AI is checked on new data Verify learning

📝 End‑of‑Module Summary

In this module, we explored how AI works. We learned that AI uses data to learn, algorithms to process information, and training to improve. We discovered the difference between training and testing, and learned about overfitting and underfitting. We also explored the different types of learning: supervised, unsupervised, and reinforcement. We saw how features and labels help AI make decisions, and how human feedback improves AI. With this knowledge, you can now understand the inner workings of AI and how it learns from the world around it.

❓ Frequently Asked Questions (FAQ)

  1. What does AI need to learn? AI needs data.
  2. What is an algorithm? A set of step‑by‑step instructions.
  3. What is training? Teaching AI with examples.
  4. What is testing? Checking if AI learned correctly.
  5. What is overfitting? When AI memorises instead of learns.
  6. What is underfitting? When AI does not learn enough.
  7. What is supervised learning? Learning with labels.
  8. What is unsupervised learning? Learning without labels.
  9. What is reinforcement learning? Learning by trial and error.
  10. Can AI make mistakes? Yes, AI is not perfect.

📌 Review Questions

  1. What is data?
  2. What is an algorithm?
  3. What is training?
  4. What is testing?
  5. What is overfitting?
  6. What is underfitting?
  7. What is supervised learning?
  8. What is unsupervised learning?
  9. What is reinforcement learning?
  10. What are features?
  11. What are labels?
  12. Why is human feedback important?
  13. How does AI make decisions?
  14. What is the difference between training and testing?
  15. Why is data important for AI?

📝 Fill‑in‑the‑Blank

  1. ________ is information that AI uses to learn.
  2. A ________ is a set of step‑by‑step instructions.
  3. ________ is teaching AI with examples.
  4. ________ happens when AI memorises instead of learns.
  5. ________ learning has labels.

✅ True or False

  1. AI needs data to learn. (True)
  2. An algorithm is a type of data. (False)
  3. Testing is more important than training. (False)
  4. Overfitting means AI learned well. (False)
  5. Supervised learning has labels. (True)

🔘 Multiple Choice Questions

  1. What does AI use to learn?
    a) Data b) Magic c) Only pictures
    Answer: a
  2. What is an algorithm?
    a) Step‑by‑step instructions b) A type of data c) A computer
    Answer: a
  3. What is training?
    a) Teaching AI with examples b) Testing AI c) Building AI
    Answer: a
  4. What is testing?
    a) Checking if AI learned b) Teaching AI c) Collecting data
    Answer: a
  5. What is overfitting?
    a) AI memorises b) AI learns well c) AI does not learn
    Answer: a
  6. What is underfitting?
    a) AI does not learn enough b) AI memorises c) AI is perfect
    Answer: a
  7. What is supervised learning?
    a) Learning with labels b) Learning without labels c) Learning by trying
    Answer: a
  8. What is unsupervised learning?
    a) Learning without labels b) Learning with labels c) Learning by rewards
    Answer: a
  9. What is reinforcement learning?
    a) Learning by trial and error b) Learning with labels c) Learning without labels
    Answer: a
  10. What are features?
    a) Important details AI uses b) Labels c) Data types
    Answer: a
  11. What are labels?
    a) Correct answers b) Features c) Algorithms
    Answer: a
  12. Why is human feedback important?
    a) To improve AI b) To confuse AI c) To slow AI down
    Answer: a
  13. How does AI make decisions?
    a) By finding patterns b) By guessing c) By using magic
    Answer: a
  14. What is the difference between training and testing?
    a) Training is learning; testing is checking b) They are the same c) Testing comes first
    Answer: a
  15. Why is data important for AI?
    a) AI learns from it b) It is not important c) It is only for storage
    Answer: a

🔗 Matching Exercises

Match the term on the left with the correct definition.

Term Definition
Data Information AI uses
Algorithm Step‑by‑step instructions
Training Teaching with examples
Testing Checking learning
Labels Correct answers

✏️ Short Answer Questions

  1. What is data and why is it important for AI?
  2. Explain the difference between training and testing.
  3. What is overfitting and why is it a problem?
  4. What is the difference between supervised and unsupervised learning?
  5. How does reinforcement learning work?

🎭 Scenario‑based Exercises

Scenario 1: You are training an AI to recognise faces. You give it 100 pictures of your family. It does well on those pictures but fails on new pictures. What could be the problem?

Scenario 2: You are training an AI to understand Nigerian Pidgin. What kind of data would you need?

Scenario 3: An AI is supposed to recommend songs. It keeps recommending the same song. What might be wrong?

👥 Group Activity

Train a Simple AI: In groups, use a no‑code AI tool (like Teachable Machine) to train an AI to recognise three different objects. Present your results and explain the process.

🧑‍💻 Individual Activity

Write a short paragraph explaining how you would train an AI to recognise your favourite animal. What data would you use? How would you test it?

🗣️ Classroom Discussion Questions

  1. Why do you think data is the most important part of AI?
  2. Can you think of a situation where AI might make a mistake?
  3. What is the difference between learning and memorising?
  4. How can we make AI more accurate?
  5. What Nigerian problems could AI help solve with data?

🛠️ Mini Project

AI Data Collection: Collect 20 pictures of a specific object (e.g., chairs). Organise the data and explain how you would use it to train an AI.

📋 Practical Assignment

Find an example of AI in your daily life. Write a short report on what data the AI might be using to learn.

🏆 Challenge Exercise

Design a simple AI project for a Nigerian problem. Describe what data you would collect, how you would label it, and how you would test the AI.

📖 Quiz Answers

(Multiple choice answers are provided with each question above.)

Fill‑in‑the‑Blank Answers:

  1. Data
  2. algorithm
  3. Training
  4. Overfitting
  5. Supervised

True or False Answers:

  1. True
  2. False
  3. False
  4. False
  5. True

🔑 Key Takeaways

  • AI learns from data.
  • Algorithms are the instructions AI follows.
  • Training teaches AI; testing checks it.
  • Overfitting and underfitting are common problems.
  • There are different types of learning: supervised, unsupervised, and reinforcement.

🔜 Preparation for the Next Module

In the next module, we will explore Machine Learning Fundamentals. We will dive deeper into supervised, unsupervised, and reinforcement learning. We will learn about real‑world applications and how machine learning is used in Nigeria. Get ready for an exciting journey into the heart of AI! See you in Module 3.


Excellent work! You have completed Module Two on How AI Works. You now understand the inner workings of AI and how it learns. Keep this knowledge as we move to the next module. See you soon!

🏆 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.
→