All About AI

  • Learn the basics of how artificial intelligence works

These are the activities for this lesson:

HOW DOES AI WORK?

Earlier, you learned how artificial intelligence is being used in different areas to make an extraordinary impact on our daily lives. Let’s go a little deeper into what it is and how it works.

True artificial intelligence is not quite here yet. There doesn’t yet exist a system that completely thinks and acts like a human. When we think of AI in our everyday lives, we are really thinking about machine learning. 

When we talk about AI in this curriculum, we’ll really be talking about two subsets of Artificial Intelligence, Machine Learning and Generative AI.

What are they?

face recognition

Machine Learning

is a subset of AI where a machine (computer) "learns" to identify patterns so it can make predictions.

That's how Youtube can predict the next video you might like to watch, or Facebook can identify your face in an image.

generated girl with robot

Generative AI

can generate text, images, and sounds. It uses Large Language Models to be able to create content based on lots and lots of existing data. 

ChatGPT and DALL-E are current popular examples of generative AI.

Let’s dive deeper into Machine Learning.

MACHINE LEARNING HAS THREE MAIN PARTS

DATASET

FINDS PATTERNS WITH LEARNING ALGORITHM


PREDICTION!

Source: “Learning about Artificial Intelligence: A hub of MIT resources for K-12 students”, MIT Media Lab

DATASETS

AI needs a LOT of data to learn from.  AI uses a dataset, which is just a very large set of data! Technological advancements have allowed more information to be gathered faster than ever before. That’s one reason AI has made such huge advances in the past few years.

AI:

  • learns from the data
  • and eventually can find patterns on its own
  • when it takes in new data
    • it can make a prediction
    • based on the patterns.

STOP AND DISCUSS

Where does AI get its data? Well, it gets a lot from you and me.

In your household, what sorts of data do you create every day through technology?

girls discussing

AN EXAMPLE

Let’s step through how Google Maps uses AI to give you directions to where you want to go. Hover over each box to reveal how Google Maps addresses each part.

DATASET

DATASET

Google Maps takes the following inputs to make a prediction.
  • current location
  • destination
  • mode (walk, car, public transport)
  • traffic

FINDS PATTERNS

FINDS PATTERNS

Google Maps is constantly learning from people who use Google Maps. That data are fed into the learning algorithm so that Google Maps can continue to improve upon its predictions

MAKES PREDICTION

MAKES PREDICTION

Based on its current knowledge, Google Maps predicts the best route for you to take to your destination. It might give you different options. When you choose one, it continues to learn from your choice

STOP AND DISCUSS

Now you try it!

Step through the process with Youtube.

  1. What is the dataset?
  2. How does Youtube learn?
  3. What does it predict?

 

ACTIVITY 1: AI IN ACTION

Estimated time: 15 minutes

Explore some of the websites below to get a taste of what AI can do.

As you explore, consider:
  • Could you take the concept in front of you and apply it in a different context?
  • What sort of data do you think is needed to make these applications work?
Instrument Playground - based on an image, AI generates what it believes you would hear if you were actually there.
AutoDraw - takes your doodling and predicts what it is you’re trying to draw, very quickly!
X Degrees of separation - takes two art pieces and shows us a bridge of similar artworks that connects the two together.

REFLECTION

Now that you have a glimpse of what it takes to create artificial intelligence, you might want to think about the problem you are solving, and how AI might be useful.

Sunset and reflection over lake
Can you think about your problem and possible solution in terms of the three parts of AI - data, pattern, prediction?
How would you address all three parts in your solution?
Previous slide
Next slide

REVIEW OF KEY TERMS

  • Artificial Intelligence (AI) – machines/programming that can do tasks normally thought to be done only by humans
  • Machine Learning – the subset of AI where a technology is trained with data and “learns” to recognize patterns in order to make predictions
  • Generative AI – technology that has the ability to create content like text, images, and and sound
  • Large Language Model – an AI model that predicts and generates text, trained using enormous amounts of data
  • Datasets – information that is used to teach AI to recognize patterns and predict something
  •  

ADDITIONAL RESOURCES

Want to explore some more cool AI?

Find Patterns with AI

  • Train a machine learning model to predict something

These are the activities for this lesson:

3 PARTS OF MACHINE LEARNING

Recall that Articifical Intelligence, specifically Machine Learning, has 3 main parts.

Dataset

Find Patterns

Make Prediction

In this lesson, we’re going to focus on the second part, Find Patterns, by training our own AI model that will be able to make a prediction.

There are many free online platforms where you can train an AI model, using supervised learning. 

Supervised learning is just as it sounds – you supervise how the model learns by telling it the correct answer.

For example, say you want an AI model to tell if a picture is a dog or a cat.

dog's face
cat's face

Your dataset will be lots and lots of pictures of dogs and cats.

You will help train the model by telling it which pictures are dogs and which are cats

PLANNING FOR YOUR MODEL

Your model will predict, or classify something. Often these models are called classification models, for that reason. 

First steps:

  1. What you are classifying? Are they images, text, sounds? This is your data type.
  2. What are the different possible classifications?  For example, dogs and cats. These are your classes. They are also sometimes referred to as labels.
  3. Gather the appropriate data to train your model. Find lots and lots of varied data to represent each class. For example, lots and lots of pictures of different types of dogs and cats!
Teachable Machine screenshot training dogs and cats

RECOMMENDED PLATFORMS

There are many free and open source platforms available to create AI classification models. 

We have curated a list of programs and platforms where you can:

  • build your model to make a prediction
  • then use your model in a mobile or web app to perform an action based on the prediction

Here is a quick overview of what each platform can classify and integrate with.

Platform Classification Types Technovation Integration
Teachable Machine by Google text, sounds, poses App Inventor, Python, other integrations possible
MachineLearningForKids images, sounds, text, numbers App Inventor, Python
MIT App Inventor images, sounds, poses App Inventor
Ximilar images Thunkable, App Inventor, wep apps, using APIs

ACTIVITY 1: TRAIN AN AI MODEL

Estimated time: 45 minutes

Build an AI model to recognize images of rock, paper, scissors to play the game

Before you start

You can follow along with this video or click the button below for written instructions.
Download worksheet

REFLECTION

You’ve made your first AI model! This should give you a glimpse into the process for making an AI model. All the model creation platforms work in a similar way, although the interfaces may differ slightly.

Was your model successful in detecting rock, paper or scissors?
Was it made with a "good" dataset?
How could you make the dataset better?
If a friend or person in a different location from you used your model and project, would it perform as well? Why or why not?
Previous slide
Next slide

REVIEW OF KEY TERMS

  • AI Model – artificial intelligence that is trained on a dataset to recognize patterns to predict or classify something
  • Supervised Learning – machine learning where a model is trained by telling it correct or incorrect result
  • Class – a label that is provided to an AI model so it learns how to classify inputs by its class

ADDITIONAL RESOURCES

AI: Datasets

  • Learn about different types of datasets
  • Start to plan the dataset for your project AI model that will predict something

These are the activities for this lesson:

HEALTHY DATASETS

The first step in creating an AI model that can classify something is to plan the dataset.

Healthy Datasets

right arrow

Lots of data

Different examples of data

The right kind of data

right arrow

Correct actions or decisions

AI NEEDS DATA

Keep the following qualities in mind when gathering examples for your dataset.

QUANTITY

The more examples you can give the model, the better it will perform. Provide at least 50 examples for each class.

balanced scales

BALANCE

You should have about the same number of examples for each class, in order to prevent bias for one over the other.

folders

TEST DATA

Keep a portion of your examples separate to test the trained model. You will need some examples that were not used to train the model to test if your model is accurate.
10-20% of data should be test data.

DIVERSITY

You also want to include varied examples.

For example, say you are creating an AI model to detect if someone is wearing a face mask or not. You should gather images that reflect varied examples:

 

  • Different types and colors of masks
  • Different people – genders, ethnicities, ages
  • Different backgrounds – indoors, outdoors, light, dark
  • Different head angles
  • Different placement of head in frame – close, far, left side, right side

What if you only trained your model using images of white men with blue surgical masks for your mask class? What happens when a female of color wearing a purple mask uses your model? How do you think it will be classified? Will your model perform well or not?

African American woman with mask

TYPES OF DATA

A dataset must also be the right kind of data. Make sure you choose the data type that is right for your project! The options are:

excel icon

Numbers

statistical data, demographic information, sensor data

text document

Text

messages, social media posts, books, articles, websites

sound wave

Sound

music, recordings, voices

image icons

Images

faces, places ... anything!

AI GIVES YOU POWER

Determining what goes into your dataset gives you immense power!

Be careful to use Determining what goes into your dataset gives you immense power!

Be careful to use lots of data, different data, and the right type of data.

Otherwise, your AI model will

  • not be very accurate
  • could make bad predictions
  • take the wrong action.

Taking the time to collect data that will make for a healthy dataset is critical to a successful model.

girl with fist in the air

GATHERING DATA

There are 3 ways to collect data for training your model.

MORE ON SENSORS

There are many low cost sensors that can connect to small microcontrollers and provide your project with data. Here are some sensors that could be used.

camera

Camera

Speedometer

Microphone

Light sensor

Pressure sensor

Air quality sensor

Infrared Thermometer

Proximity sensor

ACTIVITY: PLAN YOUR DATASET

Estimated time: 45 minutes

Follow the instructions in the worksheet to outline:

  • What data you want to collect.
  • Where you will collect the data for your dataset. Will it be community, sensors, or public datasets?
  • How will you collect the data? What will the classes or labels be for your model?
  • How many examples for each class? 50 per class should be a minimum.
Open worksheet

REFLECTION

You now have a plan for your dataset! As you start to gather the examples for your dataset, keep them safe and well organized.

Don’t forget to keep a portion of the dataset for testing! About 10-20% should be kept separate for testing.

reflection in lake

REVIEW OF KEY TERMS

  • Datasets – large sets of data that are used to teach AI to recognize patterns and predict something

  • Sensor – a device that detects changes in the environment and is used to monitor that information within an electronic system

  • Microcontroller – small computer on a single integrated chip, used in larger computers and other systems such as appliances, vehicles, and robots

ADDITIONAL RESOURCES

Hardware and Sensors


For a comprehensive list of sensors, check out this Wikipedia article.

This video gives good information on the microcontroller hardware we recommend for projects using sensors.

This video tutorial shows you how to access a public dataset on Kaggle.