Course index
AI Engineering, From First Principles to Production
A course built on one rule: no term is used before it is explained. Every concept arrives with its history, the approaches it replaced, the alternatives that still compete with it, and a worked example from an online retail store.
A How this course works
Most AI material fails beginners in the same way: it defines a term using three other terms you also do not know. This course is structured to make that impossible.
Nothing before its time
Concepts are introduced in dependency order. Tokens before context windows. Context windows before RAG. If a term appears, it has already been defined.
Always the alternatives
Every technique is presented with what came before it, why that hit a wall, and which competing approaches are still the better choice in some situations.
Dated, not timeless
Ideas carry the year they appeared. Knowing that transformers arrived in 2017 and RAG in 2020 tells you a great deal about why systems look the way they do.
One running example
An online retail store threads through every chapter. Abstract ideas land better attached to a product catalogue, a support queue and a monthly bill.
Diagrams that carry weight
Figures are drawn to explain a specific mechanism, not to decorate. Each has a caption stating what you should take from it.
Concept first, interview after
Each chapter teaches the material properly, then closes with drills in the form interviewers actually ask, including the follow-up questions.
B Track 1: AI and generative AI
The first track builds the AI stack from nothing to a fleet of models serving real traffic. Chapters are designed to be read in order, because each depends on the last.
Generative AI & LLM Foundations
What a model actually is, tokens, context windows, inference, temperature, hallucinations and grounding. The vocabulary everything else is built on.
Available 20 sections 18 drills ~55 min CHAPTER 2Transformer Architecture
Attention from first principles. Queries, keys and values, multi-head attention, positional encoding, and why transformers displaced RNNs in 2017.
Available 19 sections 14 drills ~50 min CHAPTER 3Embeddings & Vector Space
Turning text into vectors, similarity metrics, and why keyword search cannot find "waterproof jacket" when the page says "rainproof coat".
Available 19 sections 8 drills ~2 hours CHAPTER 4Vector Databases at Billion Scale
Sizing, HNSW tuning, quantization, TurboQuant and Matryoshka truncation for 1.3 billion vectors in Qdrant across four markets, plus a step-by-step optimisation runbook. Deeply technical, with the arithmetic shown.
Available 21 sections 15 drills ~90 min CHAPTER 5Retrieval-Augmented Generation
The full RAG pipeline: chunking, hybrid search, reranking, generation and evaluation. Naive through to agentic, corrective, graph and contextual RAG.
Available 39 sections 8 drills ~3 hours CHAPTER 6Serving with vLLM
Production vLLM 0.27.1 on H100 hardware: memory budgeting, chunked prefill, prefix caching, parallelism, and speculative decoding with MTP and assistant draft models.
Available 26 sections 8 drills ~3 hours CHAPTER 7Orchestrating Inference with Ray
Tasks, actors, named actors, actor pools and placement groups, then autoscaling a caller fleet as vLLM GPU replicas scale up and down at runtime.
Available 20 sections 8 drills ~2.5 hours CHAPTER 8AI Agents & Tool Calling
Tool-calling mechanics, MCP, planning and memory, then context and harness engineering — why the loop is trivial and everything around it isn't — multi-agent orchestration, a Google ADK deep dive, and the approval gates, spend controls and evaluation methods that keep an acting agent honest.
Available 28 sections 10 drills ~3.5 hours CHAPTER 9APIs and API Design
Designing a contract for a React frontend backed by both ordinary CRUD and streaming LLM inference: resources, validation, errors, FastAPI mechanics, and why request/response breaks the moment a generation call joins the same API surface.
Available 25 sections 10 drills ~2.5 hours CHAPTER 10Building Agents with Google ADK
Chapter 8's harness, built for real: grounded loops with a three-tier hallucination validator and entailment checking, sequential, parallel and loop agents composed in one pipeline, sub-agents versus tools, skills as a cross-vendor standard, autonomous agents, and a multi-agent flow run over every row of a batch.
Available 27 sections 12 drills ~3.5 hoursC Track 2: Frontend and interface
The layer a real person actually touches, built directly on top of the API from chapter 9 — including the part most frontend material skips entirely: consuming a token stream honestly.
D Track 3: Data layer
Every system in the tracks above ultimately reads from and writes to something. This track covers what that something should be, and why — organised around scenarios and decisions rather than a tour of product feature lists.
E Track 4: How teams actually work
Everything above assumes you can collaborate on a shared codebase without losing work or blocking a teammate. That skill is mostly Git, and it is mostly learned by accident — which is why this track teaches it by scenario instead of by command list.
F Track 5: Platform and delivery
The last track takes everything built so far and gets it running somewhere other than a laptop: containers, orchestration, pipelines, and the operational concerns specific to serving models on expensive hardware.
G Track 6: Security and governance
A capstone track, not a bolt-on: it touches every chapter above, because the failure mode it addresses — an LLM cannot reliably tell instructions from content — cuts through RAG, agents, APIs and the platform underneath all of them at once.
H Track 7: Architecture and system design
Every other track builds a component. This one is about the seams between them, and about defending the whole shape out loud — which is the form the senior interview actually takes. Read it last: it assumes the systems the earlier chapters built.
I Track 8: Statistics and machine learning
The measurement layer under everything else. Placed last deliberately: these ideas land far better attached to systems you have already built than as abstract preliminaries. Chapter 19 is the only technique in the course that establishes causation.
Statistics for AI Engineers
Why the mean lies about latency, percentiles that don't average, confidence intervals on every metric, what a p-value is not, effect size against significance, multiple comparisons and peeking, Simpson's paradox, and the base rate problem that makes a 95%-accurate detector wrong nine times in ten.
Available 23 sections 12 drills ~3 hours CHAPTER 18Machine Learning Foundations
Supervised and unsupervised learning, bias and variance, regularisation, the leakage that scores 79% on pure noise, why accuracy is theatre on imbalanced data, PR-AUC against ROC-AUC, calibration, model decay, feedback loops, and when a trained model beats an LLM.
Available 22 sections 12 drills ~3 hours CHAPTER 19A/B Testing and Experimentation
Randomisation and assignment, primary metrics and guardrails, sample size and duration, A/A tests, sample ratio mismatch, novelty effects, sequential testing, CUPED variance reduction, switchback and interleaving, and how to experiment on a non-deterministic LLM feature.
Available 24 sections 12 drills ~3 hours CHAPTER 20Probability Theory and Distributions
Probability from the three axioms up, expectation and variance derived from first principles, full step-by-step derivations of nine named distributions, and a mental map (five diagnostic questions, an identification table, and the trick phrasings that mislead) for recognising which one a new problem needs.
Available 23 sections 12 drills ~3.5 hours CHAPTER 21Regression, Trees, and the Metrics That Judge Them
The deep dive behind chapter 18: loss functions and what each one fears, linear and logistic regression from the assumptions up, ridge, lasso and elastic net, variable selection and when to remove a variable, the whole tree family from one stump to gradient boosting, and how to choose between ROC-AUC, PR-AUC and F-beta by reasoning about the cost of being wrong.
Available 39 sections 14 drillsJ Track 9: Interview preparation
Everything above builds systems and the judgement to run them well. This track turns that into interview readiness specifically: algorithms organised by pattern rather than by problem, the probability-and-simulation questions that recur across data science and applied science loops, and a researched breakdown of the Google applied scientist and machine learning engineer process, round by round, mapped back to the chapters above.
Data Structures and Algorithms by Pattern
Eleven patterns covering the overwhelming majority of coding interview questions, organised by the structural signal that identifies each rather than by data structure: the invariant that makes it correct, working verified code, and what a strong candidate says out loud while solving one.
Available 27 sections 12 drills ~4.5 hours CHAPTER 23Statistical and Simulation Coding
Estimating pi by Monte Carlo, fair bits from biased coins, waiting-time coin puzzles, card probability, the birthday problem, coupon collector, Monty Hall, rejection and reservoir sampling — every result derived exactly and confirmed by simulation.
Available 20 sections 12 drills ~3 hours CHAPTER 24The Google Applied Scientist and MLE Loop
Researched from practitioner and interviewer accounts: what each round in the loop assesses, how hiring committee scoring actually works, and a from-scratch preparation plan mapping every round back to the chapters of this course, with an honest list of what it does not cover.
Available 21 sections 12 drills ~2.5 hoursK Reading conventions
Colour carries meaning consistently across every chapter, so you can skim for the kind of information you want.
| Marker | Meaning |
|---|---|
| Definition | A precise definition. Read these even when skimming. |
| History | When something appeared, and what it replaced. |
| Retail | A worked example from the running store, usually with numbers. |
| Why better | Advantages over the previous approach. |
| Gotcha | A trap that catches teams in production. |
| Interview | How the topic gets asked, with a model answer. |
Light blue strips marked In plain English restate any dense passage in ordinary language. If a section is heavy going, skip to that strip, then re-read.
[+] Every chapter is a single self-contained file
Each chapter inlines its own styling and behaviour. You can email one to a colleague, drop it on a USB stick, or open it with no internet connection and it will render exactly as intended. There are no external stylesheets, no content delivery networks and no web fonts to fetch.