A free beginner course on generative AI: machine learning basics, how LLMs work, tokens, context windows, hallucinations and prompt engineering. Each lesson has a hands-on task and a downloadable solution.
Beginner · 11 lessons
AI and machine learning basics
What Is Artificial Intelligence? - A plain explanation of AI, how it differs from machine learning and deep learning, and a hands-on exercise that compares a rule-based filter with one that learns from examples.
Maths and Statistics You Need for AI - The small set of maths ideas behind AI: vectors, similarity, averages, probability and learning by small steps, explained in easy English with a hands-on page.
Machine Learning Basics - Learn supervised, unsupervised and reinforcement learning, why we split data into training and test sets, what overfitting is, and build a k-nearest-neighbours classifier.
Deep Learning and Transformers - Understand neural networks, layers and training, learn the idea of attention and the transformer, and train a small neural network in your browser.
Generative AI and LLMs
Introduction to Generative AI - Learn what generative AI is, how it differs from predictive AI, what it can create and where it fails, and build a tiny text generator that shows the core idea.
How Large Language Models Work - Understand tokens, the context window, training and sampling settings like temperature, top-k and top-p, with a hands-on page that shows how the next word is chosen.
LLM Architecture and Optimization - Learn the parts of a transformer, parameters, the cache and mixture of experts, and how quantization, batching and smaller models cut memory, cost and delay. Includes a model size calculator.
Prompt engineering
Prompt Engineering Basics - Learn how to write clear prompts with a role, task, context, rules, examples and an output format, and build a prompt builder with a checker.
Advanced Prompting Techniques - Learn step-by-step reasoning, few-shot examples, self-checks and prompt chains, and build a chain runner where the output of each prompt feeds the next.
Structured Outputs and JSON - Learn how to get reliable JSON from a model, check it against a schema and ask the model to repair its mistakes. Build a validator with a repair loop.
Prompt Testing and Security - Learn to test prompts like software with golden test cases, and to defend against prompt injection by separating data from instructions. Build a test runner and an injection detector.