How AI Actually Works: From Data to Predictions
When you unlock your phone with your face, get a song recommendation, or watch a chatbot finish your sentence, you are using artificial intelligence. But AI is not a robot brain that 'understands' the way you do. Under the hood, most modern AI is doing something more down-to-earth: it is a pattern-finding machine that learned from huge amounts of examples. This lesson pulls back the curtain on how that actually happens.
What You'll Learn
By the end of this lesson you will be able to: 1. Define machine learning, training data, and a model. 2. Explain the difference between training a model and using it to make predictions. 3. Describe how a neural network turns inputs into outputs using weights. 4. Identify why biased training data leads to biased AI.
Learning From Examples, Not Rules
Old-fashioned programs follow rules a human writes: 'IF the email contains the word FREE, mark it as spam.' That breaks fast, because spammers just change the words. MACHINE LEARNING flips this around. Instead of writing rules, you show the computer thousands of emails already labeled 'spam' or 'not spam,' and it figures out the patterns itself. The labeled examples are called TRAINING DATA. The pattern-finding result is called a MODEL. Once trained, the model can look at a brand-new email it has never seen and predict which category it belongs to.
Training happens once and is expensive: the model studies millions of examples and adjusts itself. Inference (using the model) happens every time you ask it something and is fast. Your phone does not re-learn faces every morning; it just runs the already-trained model.
Inside a Neural Network
Many AIs use a NEURAL NETWORK, loosely inspired by brain cells. Picture layers of simple math units called nodes. Each connection between nodes has a number called a WEIGHT. An input, say the pixels of a photo, enters the first layer, gets multiplied by weights, and passes forward layer by layer until an output comes out: 'this is a cat, 92% confident.' During training, the network makes a guess, checks how wrong it was, and nudges its weights to be a little less wrong next time. Repeat this millions of times and the weights settle into values that make good predictions. A large model can have billions of these weights.
Match each AI term to its meaning.
Terms
Definitions
Drag terms onto their definitions, or click a term then click a definition to match.
What is the main difference between a rule-based program and machine learning?
Garbage In, Garbage Out
Because a model only knows what its training data showed it, biased data creates biased AI. A famous real case: an AI hiring tool trained mostly on resumes from men learned to downgrade resumes that mentioned women's colleges or clubs, because the past data reflected past bias. The model was not evil; it faithfully copied the patterns it was given. This is why engineers must check what data goes in, and test what predictions come out, especially for decisions that affect people's lives.
An AI trained mostly on photos of one type of face struggles to recognize other faces. Why?
Trace an AI Decision
Pick one AI you use (photo tagging, video recommendations, autocomplete, a voice assistant). Write a half-page analysis with three parts: (1) INPUT, what data does it take in? (2) TRAINING DATA, what examples do you think it learned from, and where might those examples be biased or incomplete? (3) OUTPUT, what prediction does it make, and what is one way it could get that prediction wrong for some users? Share your analysis and compare with a classmate's.
Want to keep learning?
Sign up for free to access the full curriculum โ all subjects, all ages.
Start Learning Free