Study the lesson
Work through every section at your own pace, from start to finish.
You have already cleared up one of the biggest confusions in AI: that it is not one thing, but a family of related technologies, each with its own methods and limits. Now comes the question most people do not know they can ask: how does any of this actually work? Not in a hand-wavy sense of 'it learns from data', but in a real sense. What is the model doing when it learns? What happens inside the system when you type a message and press send? Why does it sometimes produce confident, fluent nonsense, and why can it not remember your conversation from yesterday? These are not trick questions. They have clear, non-mathematical answers, and understanding them changes how you use AI tools, how you evaluate claims about them, and how you think about their limits. Here is the central insight this lesson builds towards: modern AI models are not databases that look things up, not rule-following systems executing step-by-step instructions, and not reasoning engines in any philosophical sense. They are pattern-extraction machines, trained to recognise statistical regularities in enormous quantities of data and to use those patterns to generate plausible-seeming outputs. That might sound deflationary, but it is the opposite. The fact that this approach produces systems that can write code, translate languages, analyse images, and hold coherent conversations is genuinely remarkable. This lesson covers the full chain: from the basic logic of machine learning, through the structure of neural networks, to the architectural innovation that made modern large language models possible, and finally to what actually happens when you use one. By the end, you will have a mental model that holds up under scrutiny.
Unlock the full lesson, the quiz, and your verifiable completion.
Continue with GoogleBy continuing you agree to the Institute of AI terms of use and privacy policy.
It is explained in plain English and assumes no technical background. Anyone can start it today.
Section one is open to everyone. Create a free account to work through the rest and take the quiz.
Traditional software is explicit. A programmer writes down the rules: if the email contains the words 'free money' and the sender is not in your contacts, mark it as spam. The rules are human-authored, transparent, and brittle. Spam filters written this way worked reasonably well until spammers started deliberately misspelling words, and adding more rules became an arms race with no clear end. Machine learning takes the opposite approach. Instead of writing rules, you collect thousands of examples of spam and not-spam, show them to the system, and let it figure out the distinguishing patterns. This inversion, inferring the rules from examples rather than writing them, is the foundational idea, and it explains almost everything else about how modern AI behaves. It works because the world has structure: spam emails share patterns, images of cats share patterns, sentences in French share patterns. If reality were truly random, there would be nothing to learn. When we say a model learns, we mean something specific and mechanical. A model is, at its core, a mathematical function with a very large number of adjustable numerical values inside it, called weights or parameters. At the start of training the weights are set randomly and the model produces terrible outputs. Training is the process of improving those weights through iteration. The model receives an input, such as an email, and makes a prediction, such as 'not spam'. The prediction is compared against the correct answer, and the difference is quantified by a loss function, a mathematical measure of how wrong the model was. A higher loss means a worse prediction, and the entire goal of training is to reduce the loss, averaged across millions of examples. The loss function is the compass: it tells the model, in a single number, how far it is from the desired outcome. Common loss functions include mean squared error, the average of squared differences between predicted and actual values, often used for numerical predictions, and cross-entropy loss, which measures how well the model's predicted probability distribution matches the correct answer and is the standard choice when the model is choosing between categories, including the next-token prediction task that language models are trained on. Knowing that the loss is high does not immediately tell you which weights to change, or in which direction. This is where gradient descent comes in. Imagine standing on a hilly landscape in thick fog, able to see only a few metres in any direction, with your goal being the lowest valley. You cannot see the whole map, but you can feel the slope beneath your feet, so you step downhill, pause, feel the slope again, and step again, slowly making your way down. Gradient descent works the same way. The gradient is the direction in which the loss increases most steeply, and the algorithm moves the weights in the opposite direction, the one that reduces the loss, repeating across millions of examples and nudging the weights in small increments each time. In practice it uses a variant called stochastic gradient descent, processing small random batches of examples rather than the whole dataset at once, which introduces some noise but allows training to proceed at a practical speed. There is a trap any learning system can fall into: overfitting. Imagine a student who, rather than understanding the subject, memorises every question from last year's exam paper. They score perfectly on a re-run of that exam but fail entirely on a new set of questions, having learned the specific examples rather than the underlying patterns. The opposite problem is underfitting, where the model is too simple to capture the relevant patterns at all and performs badly on everything. To detect overfitting, practitioners split their data: the training set is what the model learns from, while the test set is held back entirely and used only afterwards to measure how well the model generalises. A third portion, the validation set, is often used during training itself to catch problems early. This is why data matters so much, and why you should treat spectacular benchmark scores with caution: if a model has been tuned on data too similar to the benchmark, the score tells you less than it appears to.
Work through every section at your own pace, from start to finish.
A short set of questions on what you have just covered.
Every completion has a certificate that you can share publicly for anyone to verify.
Pass the quiz and the Institute of AI issues you a record of completion with your score. Every completion has its own public verification page, so the link you put on your CV or LinkedIn profile can be checked by anyone, at any time.
Free lessons, a quiz to test what you have learned, and a completion you can verify publicly. All from the UK's professional body for artificial intelligence.
Every AI lesson is free to start, free to finish, and ends in a completion you can verify publicly.