Generative AI

Four levels, twelve lessons, from next-token prediction to a system you can ship

Taught by Lena Novak 16 lessons 3 hr 10 min Published 13 Oct 2026

Generative AI is the part of machine learning that produces something rather than classifying it. A churn model answers yes or no; a language model writes the paragraph, the summary, the SQL query or the reply. The task is the same shape as every other model in this track - learn a pattern from examples, apply it to something new - but the output is open-ended, and that changes everything about how you build with it and how you check it.

Overview

The core of it is simpler than its reputation suggests. A language model predicts the next token, over and over, each prediction conditioned on everything before it. There is no plan, no lookup, and no internal fact store you can query. Almost every surprising behaviour in this field - why examples in a prompt work so well, why the model invents a citation, why it gets better when you give it the document - follows directly from that one mechanism.

That is why this course spends as long on the system around the model as on the model itself. The hard engineering is not calling the API; it is deciding what goes into the context, measuring whether a change helped when there is no single right answer, keeping the cost per request sane, and making sure text from a stranger cannot redirect what your application does.

Introduction

A complete path through building with generative models, in four levels. Level 1 is the machinery: tokens and next-token prediction, what attention and the context window actually are, and an honest account of what these models are good at and where they confidently make things up. Level 2 is direction: prompting as a specification rather than a wish, getting structured output you can parse, tool calls, and treating the context window as the program you are really writing. Level 3 is grounding and proof: embeddings and vector search, retrieval-augmented generation end to end, and how to evaluate a system whose output has no single correct answer. Level 4 is production: choosing between prompting, retrieval and fine-tuning; cost, latency and caching; and prompt injection, which is the security problem unique to this architecture.

It assumes the Machine Learning course in this track for the vocabulary of training, overfitting and evaluation, and the Deep Learning course for what a neural network and a transformer are. It does not assume you have trained a model yourself, and nothing here requires a GPU - every example is an API call and a few lines of Python.

Each level is three lessons and a Level Check quiz, with an Expert Exam at the end. The examples are deliberately provider-neutral: the shapes shown here are the shapes every major API uses.

By the end you will be able to explain why a model hallucinates and what reduces it, write prompts that hold up on inputs you did not anticipate, build a retrieval pipeline over your own documents, measure whether a change to it was an improvement, and argue about cost and safety with numbers rather than vibes.

What you will be able to do

  • Explain next-token prediction, tokens and the context window, and what follows from them
  • Write prompts that specify a task rather than merely describe it
  • Get structured, parseable output and wire up tool calls
  • Build a retrieval-augmented pipeline over your own documents
  • Evaluate an open-ended system with a test set and a scoring method
  • Choose between prompting, retrieval and fine-tuning for a given problem
  • Reason about cost per request, latency and caching
  • Recognise and defend against prompt injection

What each level covers

4 levels · 16 lessons

  1. Level 1 - Basic

    What the thing in the middle is. A language model predicts the next token and nothing else; this level builds that picture carefully, because every later decision - why examples help, why the context window is the real constraint, why a confident citation can be fiction - is a consequence of it. It ends with a plain account of what these models do well and where they fail, which is the most useful thing to know before you build anything.

    4 lessons 41 min of reading

    Start with What a Generative Model Actually Does →
  2. Level 2 - Intermediate

    Directing the model. A prompt is not a request, it is a specification - and this level treats it like one: stating the task, the format, the constraints and the escape hatch, then getting output structured enough to parse, then letting the model call your functions. It closes on the idea that ties the level together: the context window is the real program, and assembling it is the work.

    4 lessons 44 min of reading

    Start with Prompting as Specification →
  3. Level 3 - Advanced

    Grounding and proof. First embeddings, which turn meaning into coordinates so that text can be searched by what it is about rather than which words it contains. Then retrieval-augmented generation end to end, which is how a model answers from your documents. Then the part that most teams skip and then regret: evaluating a system whose output has no single right answer.

    4 lessons 46 min of reading

    Start with Embeddings: Meaning as Coordinates →
  4. Level 4 - Expert

    Putting it in production. Choosing between prompting, retrieval and fine-tuning with reasons rather than fashion; the arithmetic of cost, latency and caching that decides whether the thing is viable at scale; and prompt injection, which is the security problem this architecture creates and which no amount of prompt wording fixes. It ends with the Expert Exam over the whole course.

    4 lessons 59 min of reading

    Start with Prompt, Retrieve or Fine-Tune →

Guides and articles

Longer reading about this subject, written alongside the course.

Course guide

Before you start

  • The Machine Learning and Deep Learning courses in this track, or equivalent
  • Python, and comfort reading JSON
  • No GPU and no model training required

Common questions

What does the Generative AI course cover?
It is 4 levels and 16 lessons: Level 1 - Basic; Level 2 - Intermediate; Level 3 - Advanced; Level 4 - Expert. Each level ends with a quiz, and the last one is an exam over the whole course.
How long does it take?
About 190 minutes of reading and exercises - roughly 3.2 hours. It is self-paced with no cohort and no start date, so you can leave and come back and the site remembers where you were.
What do I need to know first?
The Machine Learning and Deep Learning courses in this track, or equivalent. Python, and comfort reading JSON. No GPU and no model training required.
Is it free?
Yes. Every lesson, example and quiz in this course is free to read, and you do not need an account to read them. Signing in only adds progress tracking and quiz results.
What will I be able to do afterwards?
Explain next-token prediction, tokens and the context window, and what follows from them. Write prompts that specify a task rather than merely describe it. Get structured, parseable output and wire up tool calls. Build a retrieval-augmented pipeline over your own documents. Evaluate an open-ended system with a test set and a scoring method. Choose between prompting, retrieval and fine-tuning for a given problem. Reason about cost per request, latency and caching. Recognise and defend against prompt injection.