1. Intro to AI/ML

1. Intro to AI/ML

🎯 Learning Goals

  • Explain the concepts of Artificial Intelligence and Machine Learning and how they relate to each other
  • Identify examples of Machine Learning
  • Describe the difference between supervised and unsupervised learning

📗 Technical Vocabulary

  • Artificial Intelligence
  • Machine Learning
  • Algorithm
  • Model
  • Supervised Learning
  • Unsupervised Learning
🌤️
Warm-Up
Imagine you have an AI assistant that can automate one specific task in your daily life. What would you ask it to do and why?
While AI may not be able to take over your daily chores (yet), it's already capable of some amazing things! In this course, we'll explore how AI and Machine Learning work, what they can (and can't) do, and how they're shaping the world around us!

🤖 What are Artificial Intelligence and Machine Learning?

Have you ever used face ID to unlock your phone, had a conversation with a customer service chatbot, or used GPS to navigate somewhere new? All of these are examples of Artificial Intelligence (AI) and Machine Learning (ML) at work. While you might think of these concepts as more recent developments, the idea has been around for a long time. In 1950, a scientist named Alan Turing wondered if machines could ever "think" like humans. But since "thinking" is hard to define, he came up with a test instead—the Turing Test. His idea? If a computer could have a conversation that felt just like talking to a real person, then it could be considered "thinking" like a human!
In general, artificial intelligence can be thought of as machines thinking like humans and machine learning as the process of machines learning from data to think like humans. More formally, Artificial Intelligence is the ability of a computer to perform tasks commonly associated with intelligent beings and Machine Learning is a machine’s ability to learn from data and improve over time.
Machine learning is a subset of AI. Instead of programming a machine with explicit instructions for every possible scenario, ML allows the machine to learn from data and improve over time.
To understand the difference and where we are today, it’s helpful to look back on some early AI achievements.
  • In 1959, an American computer scientist named Arthur Samuel developed a computer program that could play checkers, but what made it groundbreaking was that it could learn from experience and improve over time. Rather than following a fixed set of rules, the program improved by playing over 10,000 games of checkers and analyzing which moves led to wins or losses.
  • ELIZA is one of the first-ever chatbots, created in the 1960s by Joseph Weizenbaum at MIT. It was designed to simulate human conversation using pattern matching and scripted responses. The chatbot uses a simple rule-based system to mimic a conversation by recognizing keywords in user input and generating pre-programmed responses. Here’s an example of what it might look like:
    • User: "I feel sad."
    • ELIZA: "Why do you feel sad?"
    • User: "Because my friend ignored me."
    • ELIZA: "Tell me more about your friend."
💭
Think About It
Which of these early achievements is an example of machine learning? The checkers-playing game! Instead of pre-programming the machine with if-then rules that determined how the machine should play, the program learned the best moves through practice! In contrast, the ELIZA chatbot made it seem like it was “listening,” but it was just following if-then rules to generate responses based on detected words.
What if the checkers-playing game only played 10 games instead of 10,000? How would that impact its performance? It would be less effective, because it had fewer chances to learn which positions or moves led to wins.

AI or Not?

For each real-world example below, decide whether it is:
  • AI without ML (Rule-Based AI)
  • 🤖 AI with ML
  • 🚫 Not AI at all
Then, explain your reasoning!
✏️
Try-It | AI or Not?
Mystery Example 1 📦
Self-Driving Car
notion image
Mystery Example 2 📦
Spell Check
notion image
Mystery Example 3 📦
Snapchat Filters
notion image
Mystery Example 4 📦
Automatic Doors
Mystery Example 5 📦
Chatbot for Customer Support
notion image
Answer Key 🔑
1️⃣ Self-Driving Car → 🤖 AI with ML: It constantly learns from real-world driving data and responds to those inputs.
2️⃣ Spell Check → ✅ AI without ML (Rule-Based AI): It uses a fixed dictionary and rule-based grammar corrections. It doesn’t improve on its own—it just follows pre-programmed rules to identify errors.
3️⃣ Snapchat Filters → 🤖 AI with ML: It learns through computer vision and facial recognition models that detect facial features and track movements. The filters improve over time, learning from millions of faces to refine accuracy.
4️⃣ Automatic Doors → 🚫 Not AI at All: They use basic motion sensors to detect movement and open/close accordingly. They do not "learn" or make decisions—just respond to motion triggers. AI would be involved if the doors could recognize faces, predict foot traffic patterns, or adapt opening times based on behavior!
5️⃣ Chatbot for Customer Support → ✅ AI without ML (Rule-Based AI) OR 🤖 AI with ML (Depends!): Some chatbots are rule-based and only respond using pre-written scripts. Other chatbots learn from past interactions and use natural language processing (NLP) to improve responses (like ChatGPT or Google’s Gemini).
Image Sources:
💭
Think About It
What are some examples of AI/ML that you have interacted with?
What are the advantages of this technology? Are there any disadvantages?
Do you think AI/ML can or will ever replace human interaction?What are some examples of AI/ML that you have interacted with?
What are the advantages of this technology? Are there any disadvantages?
Do you think AI/ML can or will ever replace human interaction?

Machine Learning Process

Most types of machine learning can be represented by a three-part process: an input (often a dataset), a model, and a prediction.
Let’s define each of these parts:
  • An input is data, often a collection of data or a dataset. This can include anything! While we typically think of data as numbers, it may also extend to images, video, collections of text, etc.
  • A model is what the machine learns. It’s the system that makes predictions or decisions based on patterns it found in the data.
  • A prediction is the output generated by the trained model based on new input data. It could be anything, such as a YouTube video recommendation or the next word in an unfinished sentence.
 
notion image

An Example of Machine Learning

Have you ever noticed how Spotify seems to "know" the kind of music you like? That's machine learning in action!
  1. Input: Every time you listen to a song, the app collects data about the songs you listen to most, the songs you skip, and the genres, artists, or moods you seem to enjoy. All of this information is the input or dataset for creating the machine learning model.
  1. Model: The app uses machine learning algorithms to find patterns in your listening habits. It might notice things like you love upbeat pop songs in the morning or you listen to calming instrumental music while studying.
  1. Prediction: The model generates an output, a prediction about which songs you'll enjoy next based on your patterns!

Types of Algorithms in Machine Learning

In Machine Learning, data and algorithms are used to train models that improve over time by learning from new data. ML programs analyze datasets to identify patterns, group similar data points, and make predictions. Algorithms play a crucial role in this process by extracting meaningful insights from raw data. There are two common types of machine learning algorithms:
🔵
Supervised Learning Algorithms
Relies on labeled data and makes predictions based on known outcomes.
Goal: Make correct predictions with the ML model.

Example:
Email spam filtering is a common example of supervised machine learning. The model is trained on a dataset of emails labeled as “spam” or “not spam.” Once trained, it can classify new incoming emails as spam or legitimate, helping users manage their inboxes.
🔵
Unsupervised Learning Algorithms
Works with unlabeled data and uncovers hidden patterns or structures without predefined outcomes.
Goal: Group data and draw conclusions based on patterns, similarities, and differences.
Example: Fraud detection systems in banks are a great example of unsupervised machine learning. A transaction that could be unusual for one person might be completely ordinary for another! Since there aren’t clearly defined rules for what makes a transaction suspicious, it’s best for the algorithm to learn what is “normal” for the individual user based on historical data and then flag deviations as potentially fraudulent.
Let’s summarize the differences between these two types of machine learning:
  • Supervised learning leverages labeled data to make predictions or classifications based on known outcomes.
  • Unsupervised learning explores unlabeled data to find inherent structures, clusters, or patterns without predefined outcomes.
In many real-world applications, both supervised and unsupervised learning are used together to achieve the end goal. A great example is Natural Language Processing (NLP)—the technology behind virtual assistants, chatbots, and language translation systems. You’re likely already familiar with some of the most advanced and powerful NLP technologies—Large Language Models or LLMs!
To create a Large Language Model (LLM) like ChatGPT or DeepSeek, the training process begins with unsupervised learning, where the model is trained on massive datasets of text from the internet, books, articles, and more! This phase allows the model to develop a broad understanding of language without human-labeled data. Then the model goes through supervised fine-tuning using labeled datasets curated by humans to improve performance on specific tasks like sentiment analysis or question-answering.
By combining both approaches, NLP models can first learn from raw text data and then refine their predictions using labeled examples, resulting in more accurate and intelligent language understanding.
👥
Discuss
Imagine you’re training a machine to organize your photos. Which would require supervised learning: labeling photos by “vacation” or grouping them by similar colors? Why?

AI/ML and KWK

The possibilities of AI/ML are boundless (You could say the limit does not exist!). Over the next two weeks, we will be using supervised learning algorithms to build a type of machine learning model known as a chatbot. Chatbots, like the ones you’ve seen in customer service or virtual assistants, are just one exciting application of AI/ML. Even though we’ll be focusing on this one application of AI/ML in this course, you'll see that the same principles--learning patterns from data and making predictions--can be applied to many areas of your life. Who knows? The skills you gain here might inspire you to design the next big AI system to make life easier, more fun, or more connected!