Lesson #3: Strengthen an AI Agent with Data

Welcome to the third lesson! You will learn that:

  1. Data are pieces of information that represent our world. They can be numbers, sounds, pictures, text, and more!
  2. Datasets are collections of lots and lots of data.
  3. AI can find patterns in data to make decisions and take actions

For materials, you will need an AI Inventors Notebook and you will use ML4K to create an AI agent that makes predictions about images. You do not need an account – use Try it Now mode. A video resource to help create the model is here.

Key Slide Notes:

  • Data are pieces of information that represent our world (3).
  • Data can be numbers, sound, text, pictures, and more (4).
  • AI agents find patterns in data to make decisions and take actions. Sensors gather gather data -> Program AI to find patterns in data -> to make decisions -> that enable actions (5).
  • AI agents use data to sense their environments. AI agents cannot achieve goals without data (8).
  • Data in AI is like ingredients in a cake. An AI agent without data won’t be able to do anything (A cake without ingredients won’t be a cake). An AI agent with the wrong data won’t be able to do anything correctly (A cake with the wrong ingredients won’t taste right). An AI agent needs different types of data to make a good decision (Many different ingredients go into making a cake) (9).
  • Q: If an AI agent doesn’t have any data, what goal can it achieve? A: Nothing because it needs data to know what to do (14 – 15).
  • Q: An AI agent wants to find patterns in pictures, but it only has text data. What can it do? A: It can find text patterns, but not patterns in pictures (16 – 17).
  • Q: An AI agent wants to guess if a person will like vanilla or chocolate ice cream. It has data about 1000 vanilla and 20 chocolate lovers. It starts making guesses. A: It won’t make as good of guesses about who loves chocolate ice cream and can’t tell you who will like strawberry ice cream (18 – 19).
  • Q: An AI agent has the goal of categorizing written user reviews into “good” or “bad” groups. What patterns in the text data could it look for? A: Different words, different words grouped together, different punctuation, different lengths of reviews (20 – 21).
  • Q: Stop and answer: Which 2 fish are telling the truth? 1) An agent that takes a correct action with a confidence percentage above 95% means it probably understands its world well. 2) If an AI agent is not confident in it’s decision, the action it takes might not be correct. 3) Because AI agents use data, it’s guaranteed the actions they take are correct. A: Choices 1 and 2 are correct. An agent that takes a correct action with a confidence percentage above 95% means it probably understands it’s world well. If an AI agent is not confident, the action it takes might not be correct. AI agents can be wrong, just like human agents. (33)
  • Datasets are many pieces of data (34).
  • Datasets make AI agents better at finding patterns and taking actions (35).
  • Humans use language each day to understand our world. An AI agent needs a dataset of words to understand how they represent the world (36).
  • If we wanted an AI agent to predict something about Mars, it would need a dataset of examples before it could take any actions.
  • AI agents with a lot of data, or datasets, can be programmed to better find patterns and achieve lots of goals (44).


Activity #1: Explore how these AI agents use data:

AI AgentWhat type of data do you notice the AI agent uses? Hint: this could be more than one typeWhat decision is the agent using data to make?What patterns is it finding in the data?
Giant Language Model Test RoomTextIf language was written by a human or notWords that usually follow the word to it’s left
Imaginary SoundscapeText, sound, imagesPredict what sound different locations might haveFinds patterns in how different types of locations sound
AutodrawYour drawings (which are a type of image)Guess what object a user is trying to drawPatterns in the shapes people draw and how they compare to drawings of different objects
X Degrees of SeparationImagesFind visual connections between different works of artColors, shapes, styles of art

Activity #2: Create an AI agent

  • Video tutorial
  • You will: Program an AI agent that has a goal of finding patterns in numbers to decide what preferences a person may have.
  1. Navigate to this link.
  2. Click get started.
  3. Click try it now.
  4. Click add new project.
  5. Name your agent and select what data type your agent will use to find patterns. Make an AI agent that guesses what a person will like. What do you want your agent to guess? Example: For project name, name it to “Club Predictor”. For recognizing select “numbers”.
  6. Click add value. Think of 3 questions people will answer. This can be multiple choice or numbers. Example: 1) Set the name of the values to “hobby”, “news”, and “books”. 2) Set the type of value for “hobby” to multiple choice and the other value types are numbers. 3) For choices for “hobby”, type “nature”, “magazines”, “books”, “tv”, “music” for the choices and for each choice entry hit enter. 4) The values are the data the program will gather to make that decision.
  7. Click create.
  8. Click on the project you just created.
  9. Click train.
  10. Click add new label – type in the different predictions the agent could make. Add these two labels: “book”, “government club”.
  11. Put/add in several data/examples in each label to help agent make decisions.
  12. Click learn and test.
  13. Click train new machine learning model.
  14. Test with new data to see if the agent makes the right decision.

Activity #3: Search the word “Mars” on this site

  1. What is the data?
  2. What patterns is this model programmed to find?
  3. How could the patterns help this model make a decision that enables actions?
  • Notice that the word “Mars” is connected to a lot of different words in the dataset – rover, moon, spacecraft.
  • Not all the connected words to “Mars” in the dataset are planets!
  • If the AI was trying to find a pattern to tell you what Mars is (is it a planet, is it a profession, is it a spacecraft), what mistakes might it make?

Activity #4: What surprises you about data

Make a list of four things in your AI Inventors Notebook that surprise you about AI or data that you’ve learned so far


Q: What is the best explanation for why an agent would predict that cows make sounds like ducks?

  1. It has found a pattern in sound data that makes it decide that cows make quacking duck sounds.
  2. It has found a patterns in sound data that cows make different sounds than ducks.
  3. It has found a pattern that cows look different than ducks.

A: 1) An agent finds patterns in data, so this agent must have found patterns in the data to make it decide that cows make a quaking pattern.