Interactive course

How does ChatGPT actually work?

No maths, no code — just clear explanations and small demos you can try, from the words you type to the answer you get back, including how the model is actually trained.

PromptTokensMeaningContextPrediction

16 lessons + optional extras · about 50 minutes · nothing to install

What's inside

Sixteen short lessons in three parts: how it works (1–7), how it learns (8–12), and how to use it (13–16) — then an optional "going further" chapter and a plain-English glossary. Do them in order for the full story, or jump to whatever you're curious about. Use the Next / Back buttons — or your keyboard's ← → arrow keys.

Companion course · now with code
Want to build one yourself? This guide is the no-code tour of how LLMs work. When you're ready to see every gear turn, Build an LLM from Scratch walks you through writing one — you implement attention, autograd, and the training loop by hand (runnable right in your browser), then assemble and train a real GPT in PyTorch. Every line of code and every formula is explained from zero.