Coming soon
AI Engineering
From your first model API call to RAG, agents, evals and serving models yourself, with every buzzword explained in plain words. 17 units and 152 lessons, from novice to expert, in the same animated, quiz-as-you-go style. Join the list and we'll tell you when the first district opens.
The plan
Level 1: Foundations
District 0 · 7 lessons · Coming soon
Start here
What an AI engineer does, and running code on day one.Show lessonsWhat is AI engineering?
How it differs from ML engineering, data science and research, and what companies hire AI engineers to do
The AI stack
Models, APIs, orchestration, retrieval, evals, serving: the layers and who builds each
AI, ML, deep learning, generative AI
The nested terms untangled, with a short history from rules to transformers
Python for AI engineers
HTTP and JSON, environment variables and secrets, async calls, and project setup with uv
Your first API call
Send a prompt, read the reply, and see tokens and cost on your own screen
Your toolkit
Notebooks, a local model with Ollama, and how to run the course labs
Working with coding agents
Pairing with AI coding tools, reviewing AI-written code, and spec-first development
District 1 · 7 lessons · Coming soon
How LLMs work, intuitively
A mental model good enough to predict what a model will do.Show lessonsTokens and tokenization
Why models see tokens, not words, and what that does to cost, limits and spelling bugs
Next-token prediction
How a model writes one token at a time, logits and probabilities, and why that explains most of its behaviour
Transformers and attention
The architecture in pictures: embeddings, attention, layers, without the maths
How models are trained
Pretraining, then instruction and preference tuning: base vs instruct models (details in Unit 12)
Sampling: temperature, top-p, top-k
How the next token is picked, and which settings to use for which job
The context window and its limits
What fits, what it costs, knowledge cutoffs, hallucinations, and why long context isn't free
Reasoning models and the model landscape
Reasoning models as the 2026 default, open-weight vs closed, sizes, families, and multimodal in one note
District 2 · 11 lessons · Coming soon
Working with model APIs
Calling models well from real code.Show lessonsMessages, roles and parameters
System, user and assistant turns, chat templates, stop sequences and max tokens
Streaming
Server-sent events, time to first token, and streaming UIs
Tokens, pricing and limits
Input vs output pricing, rate limits, quotas, and estimating a feature's cost
Reasoning controls
Effort levels and thinking budgets, and what they do to quality, latency and cost
Structured outputs
JSON mode, schemas, constrained decoding, and validating what comes back
Tool and function calling
Letting a model ask your code to act, and the request-response loop that makes it work
Images, documents and audio as input
Vision, PDFs, transcription, and their token costs
Realtime and voice APIs
Speech-to-speech sessions, turn-taking basics, and when voice is worth it (deep dive in Unit 14)
Prompt caching and batch APIs
Cutting cost and latency for repeated prefixes and offline jobs
Choosing a model
Quality, latency and cost trade-offs, routing, and fallbacks
Build: a CLI assistant
A streaming chat tool with tools and cost tracking
District 3 · 9 lessons · Coming soon
Prompt engineering
Getting reliable output on purpose.Show lessonsAnatomy of a good prompt
Clear tasks, context, constraints, format, and the system prompt
Examples: zero-shot and few-shot
When examples help, how many, and how to pick them
Reasoning vs non-reasoning models
When to pay for a reasoning model, and why "think step by step" is now mostly legacy
Structure with tags and delimiters
XML tags, sections, and separating instructions from data
Prompt chaining
Splitting a task into steps, and passing results between them
Prompt templates and versioning
Treating prompts as code: variables, tests and history
Your first eval eval
Error analysis on real outputs, a small golden set, and pass rates you can compare
Prompt optimisation
Letting tools like DSPy and GEPA tune prompts against your eval
Build: a structured extractor
Turning messy emails into validated JSON, with a test set
Level 2: Builder
District 4 · 9 lessons · Coming soon
Embeddings and vector search
Finding things by meaning.Show lessonsWhat embeddings are
Turning text into vectors where close means similar
Measuring similarity
Cosine similarity, dot product, distance, and normalisation
Choosing an embedding model
Dimensions, languages, benchmarks (MTEB), cost, and matryoshka embeddings
Vector databases
pgvector, Pinecone, Qdrant, Weaviate and friends, and what they add over an array
Approximate nearest neighbour indexes
HNSW and the recall vs speed dial (IVF and PQ in "Go deeper")
Keyword and hybrid search
BM25, why keywords still matter, and combining scores (reciprocal rank fusion)
Reranking and late interaction
Cross-encoders, rerank APIs and ColBERT-style retrieval for a better top 5
Measuring retrieval eval
Recall@k, MRR and nDCG on a labelled query set
Build: semantic search
Search over a docs site, with filters, a reranker and a retrieval eval
District 5 · 10 lessons · Coming soon
Retrieval-augmented generation (RAG)
Answering from your own data.Show lessonsWhy RAG
Fresh and private knowledge without retraining (the full prompt vs RAG vs fine-tune guide is in Unit 12)
Ingestion: parsing and cleaning
HTML, tables and messy sources, and why garbage in is the top RAG failure
Parsing PDFs with vision models
Vision-based document parsing and ColPali-style retrieval, which have replaced most OCR pipelines
Chunking strategies
Fixed, recursive, semantic and structure-aware chunks, overlap and size
The retrieve-then-generate loop
Putting retrieved context into the prompt, with citations
Better queries
Query rewriting, multi-query, HyDE, and decomposing hard questions
Better context
Parent-child chunks, contextual retrieval, metadata and freshness
Agentic RAG
Retrieval as a tool the model calls when it needs it, now the default pattern, plus text-to-SQL and a short look at graph RAG
Faithfulness and groundedness eval
Checking answers against sources, citation accuracy, and why RAG fails
Case study: a docs Q&A assistant
Design, estimates and trade-offs for a company knowledge bot
District 6 · 12 lessons · Coming soon
Agents and tool use
Models that take actions.Show lessonsFrom chatbot to agent
The agent loop: think, act, observe, repeat (ReAct)
Designing tools
Names, descriptions, parameters and errors a model can actually use
Workflows vs agents
Fixed pipelines, routers, orchestrator-workers, and when autonomy pays
Planning and reflection
Plans, sub-goals, self-correction and stopping conditions
Model Context Protocol (MCP)
The standard way to plug tools and data into any model: transports, auth, and agent-to-agent (A2A)
Agent harnesses and SDKs
The loop as a product: subagents, skills, sandboxes, checkpoints and agent SDKs
Long-running and coding agents
How coding agents read repos, run tests and work for hours without losing the plot
Computer and browser use
Agents that click, type and read screens
Human in the loop
Approvals, escalation, and designing where a person must say yes
Multi-agent systems, with caution
Specialists and handoffs, their costs, and why to start with one agent
Task success eval
Measuring agents by outcome, trajectory, tool-call accuracy and cost per task
Case study: a customer support agent
Tools, escalation, evals and failure handling
District 7 · 7 lessons · Coming soon
Context engineering
Deciding what the model sees at every step.Show lessonsFrom prompts to context
Why the 2026 skill is managing the whole context, not one clever prompt
The context budget and context rot
How quality drops as context fills, and how to spend tokens on purpose
Just-in-time retrieval
Letting the agent fetch files, docs and data when needed instead of stuffing them in up front
Trimming tool results
Summaries, pagination and filters so tool output doesn't drown the task
Compaction and summarisation
Keeping long sessions going by compressing history without losing decisions
Memory and notes
Memory files, scratchpads and long-term stores, and what to forget
Build: a long-running research agent
An agent that works through a big task across many context windows
District 8 · 8 lessons · Coming soon
Evaluation
Knowing whether it works, and whether a change made it better.Show lessonsWhy evals are the job
Vibes vs measurement, and the eval-driven development loop
Error analysis in depth
Reading traces, labelling failure modes, and deciding what to measure
Building a test set
Golden examples, edge cases, synthetic data, and how many you need
Code-based checks
Exact match, regex, schema checks, unit tests for outputs
LLM as a judge
Rubrics, pairwise comparison, judge bias, and calibrating against humans
Evaluating RAG and agents end to end
Combining the unit-level evals into one suite, with pass@k for agents
Benchmarks and leaderboards
MMLU, GPQA, SWE-bench and others, contamination, saturation, and reading them sceptically
Evals in CI
Regression suites that run on every prompt or model change
District 9 · 8 lessons · Coming soon
Building AI products end to end
From prototype to something people use.Show lessonsArchitecture of an LLM app
Front end, API, orchestration, retrieval, models, storage and queues
Orchestration frameworks and agent SDKs
LangChain, LlamaIndex, Vercel AI SDK, agent SDKs and plain code, compared
Conversation state
Sessions, history trimming, summarising and storage
Latency
Streaming, parallel calls, smaller models and UX that hides waits
Cost control
Token budgets, exact caching, and cheaper models (semantic caching and routing in Unit 11)
Reliability
Retries, timeouts, fallbacks across providers, and rate limits
UX for AI features
Showing uncertainty, citations, feedback buttons, and undo
Build: a full-stack AI app
A deployed RAG chat app with auth, streaming, evals and cost tracking
Level 3: Practitioner
District 10 · 9 lessons · Coming soon
Safety, security and guardrails
Shipping AI that can't be turned against you.Show lessonsThe threat model
OWASP Top 10 for LLM applications, mapped to real incidents
Prompt injection, direct and indirect
Attacks through user input, documents, web pages and tool results
The lethal trifecta
Private data plus untrusted content plus a way to send data out, and how to break the triangle
Tool and MCP supply-chain attacks
Tool poisoning, rug pulls, and data exfiltration through markdown images and links
Jailbreaks and red teaming
How guardrails get bypassed, and how teams test for it
Data leakage and privacy
PII, secrets in prompts, training on user data, and retention
Guardrails
Input and output filters, moderation models, allow-lists and policy checks
Sandboxing and agent identity
Sandboxed code execution, scoped tokens and OAuth for agents, and least privilege
Responsible AI
Bias, fairness, transparency, and regulation such as the EU AI Act (dated, as its timeline is still moving)
District 11 · 10 lessons · Coming soon
LLMOps and observability
Running AI features in production.Show lessonsTracing LLM calls
Spans for prompts, retrievals and tool calls, and the tools that collect them
OpenTelemetry for GenAI
The standard span conventions, so traces work across vendors
LLM gateways and routing
One front door for many providers: keys, quotas, model routing and semantic caching
Monitoring quality and drift
Online eval scores, drift, and alerting
User feedback and annotation queues
Collecting thumbs and comments, and turning them into labelled data
Prompt and model management
Versioning, rollouts, model upgrades, deprecations and migrations
Cost and usage dashboards
Per-feature and per-customer spend, and anomaly alerts
PII in logs and retention
What to store, what to redact, and for how long
The data flywheel
Turning production traces into test sets and training data
Incidents
When a model regresses or a provider goes down: playbooks and fallbacks
District 12 · 10 lessons · Coming soon
Customising models
When prompting isn't enough.Show lessonsPrompt, RAG or fine-tune?
The one decision guide, by problem type, data and budget
GPU and memory basics for training
Just enough about VRAM and memory math to plan a fine-tune (more in Unit 13)
Data quality and curation
Where fine-tunes really succeed or fail: collecting, cleaning and balancing examples
Supervised fine-tuning
Datasets, formats, epochs, overfitting and evaluation
LoRA, QLoRA and PEFT
Training a small adapter instead of the whole model
Preference tuning with DPO
Tuning on better and worse answer pairs, with RLHF as the concept behind it
RL fine-tuning
RLVR, GRPO, reinforcement fine-tuning APIs, and designing rewards
Distillation
Teaching a small, cheap model to copy a big one
Synthetic data
Generating, filtering and de-duplicating training data
Build: fine-tune a small model
A LoRA fine-tune that beats a prompt on one narrow task, with evals
Level 4: Expert
District 13 · 10 lessons · Coming soon
Inference and serving
Running models fast and cheap.Show lessonsGPUs for engineers
Memory, bandwidth, FLOPs, and why LLM inference is memory-bound
Memory math
Weights, the KV cache, and sizing a GPU for a model and context length
Prefill and decode
The two phases of inference, throughput vs goodput
Batching
Static vs continuous batching, and throughput vs latency
Quantization
FP8, INT8, INT4, GGUF, AWQ and GPTQ, and what they cost in quality
Speeding up decoding
Speculative decoding, prefix caching, paged attention and FlashAttention
Serving stacks
vLLM, SGLang, TensorRT-LLM, llama.cpp and Ollama, managed endpoints, and TGI as legacy
Parallelism
Tensor and pipeline parallelism, and when a model needs more than one GPU
Latency metrics
Time to first token, tokens per second, p99, and SLOs for AI
Self-host or API?
Cost per million tokens, utilisation, privacy, and the break-even point
District 14 · 5 lessons · Coming soon
Beyond text
Vision, speech, generation and small models.Show lessonsVision-language models
Image understanding and document AI
Voice agents in depth
Speech pipelines vs speech-to-speech models, turn-taking and sub-second latency
Image and video generation
Diffusion models, prompts, control and editing
Multimodal retrieval
Image and audio embeddings, and searching across media
Small and on-device models
SLMs, edge and WebGPU, and when a 3 to 8B model is enough
District 15 · 8 lessons · Coming soon
AI system design
Interview-grade case studies that pull everything together.Show lessonsHow to approach an AI design question
Requirements, estimates, model choice, evals and risks
Design a ChatGPT-style chat service
Streaming at scale, history, rate limits, cost per user
Design enterprise search with RAG
Permissions-aware retrieval across many data sources
Design an AI coding assistant
Context gathering, latency budgets, and evals on real repos
Design a deep-research agent
Planning, parallel search, source tracking and long-running context
Design an agentic workflow with approvals
Multi-step automation with human sign-off and audit trails
Design a voice agent
Speech pipeline, turn-taking and sub-second latency
Design an AI content moderation system
Classifiers plus LLMs, queues, humans in the loop, and appeals
District 16 · 5 lessons · Coming soon
Staying expert
Keeping up in a field that changes monthly.Show lessonsReading AI papers
A three-pass method, and where to find the papers that matter
Evaluating new models on your evals
Your own suite as the yardstick, not the leaderboard
The frontier
What's moving now: reasoning, long context, agents and on-device models
Building a portfolio
Projects that show judgement, and writing about them
Career paths and interviews
AI engineer roles, system design rounds and eval take-homes
Side track
Optional side track · 7 lessons · Coming soon
Under the hood
Optional, open any time after Unit 1.Show lessonsNeural networks from scratch
Neurons, layers, activations, loss, epochs and overfitting
Gradient descent and backpropagation
How a network learns, step by step
Attention, with the maths
Queries, keys, values, multi-head attention and positional encodings
Inside a transformer block
Layer norm, MLPs, residuals, and decoder-only models
Mixture of experts
Sparse models, routing, and why they're cheap to run
Scaling laws and test-time compute
Compute, data and parameters, and the newer scaling of thinking at inference time
Training at scale
Data pipelines, mixed precision, and data, tensor and pipeline parallelism
Glossary
Every term the course explains, in plain words, with the unit that teaches it.
- A2A
- Agent-to-agent protocol: a standard for agents to call other agents · Unit 6
- Agent
- A model in a loop that picks tools, acts, observes the result and repeats until done · Unit 6
- Agent harness
- The code around a model that runs the agent loop, tools, permissions and memory · Unit 6
- Agent skills
- Packaged instructions and files an agent loads when a task needs them · Unit 6
- Agentic
- Describes a system where the model decides its own next steps · Unit 6
- Agentic RAG
- Retrieval offered as a tool the model calls when it needs it · Unit 5
- Attention
- The mechanism that lets each token weigh every other token when computing its meaning · Unit 1 and the Under the hood track
- AWQ / GPTQ / GGUF
- Popular ways and file formats for quantizing model weights · Unit 13
- Base vs instruct model
- A raw pretrained model vs one tuned to follow instructions and chat · Unit 1
- Benchmark
- A public test set used to compare models, such as MMLU or SWE-bench · Unit 8
- BM25
- The classic keyword-ranking formula behind most search engines · Unit 4
- Chain-of-thought
- A model reasoning step by step before answering, now built into reasoning models · Unit 3
- Chat template
- The exact format that turns a list of messages into the tokens a model sees · Unit 2
- Chunk overlap
- Repeating a little text between neighbouring chunks so ideas aren't cut in half · Unit 5
- Chunking
- Splitting documents into pieces small enough to embed and retrieve · Unit 5
- Coding agent
- An agent that reads a codebase, edits files and runs tests · Unit 6
- ColBERT / late interaction
- Retrieval that compares every query token with every document token for sharper matches · Unit 4
- Compaction
- Summarising a long session's history so work can continue in a fresh context · Unit 7
- Constitutional AI
- Training a model to follow a written set of principles, using AI feedback · Unit 12
- Constrained decoding / JSON mode
- Restricting which tokens a model may pick so output always matches a format · Unit 2
- Contamination
- When benchmark questions leaked into training data, inflating scores · Unit 8
- Context engineering
- Deciding what goes into the model's context at every step of a task · Unit 7
- Context rot
- Quality dropping as the context fills with more and older material · Unit 7
- Context window
- The maximum tokens a model can read and write in one request · Unit 1
- Contextual retrieval
- Adding a short description of the source to each chunk before embedding it · Unit 5
- Continuous batching
- Adding new requests to a running GPU batch as others finish · Unit 13
- Cosine similarity
- A score for how closely two vectors point the same way · Unit 4
- Data exfiltration
- Tricking an AI system into sending private data to an attacker, for example through a link · Unit 10
- Diffusion model
- A model that generates images by removing noise step by step · Unit 14
- Distillation
- Training a small model to imitate a larger one · Unit 12
- DPO
- Direct Preference Optimization: tuning a model on pairs of better and worse answers · Unit 12
- Drift
- Production inputs or model behaviour slowly changing from what you tested · Unit 11
- DSPy / prompt optimisation
- Tools that rewrite prompts automatically to score better on an eval · Unit 3
- Embedding
- A list of numbers that captures meaning, so similar things sit close together · Unit 4
- Error analysis
- Reading real outputs and sorting failures into types before measuring anything · Units 3, 8
- Eval
- A repeatable test of an AI system's output quality · Units 3, 8
- Faithfulness / groundedness
- Whether an answer is actually supported by the sources it was given · Unit 5
- Few-shot
- Putting a few worked examples in the prompt · Unit 3
- Fine-tuning
- Further training a model on your own examples · Unit 12
- Foundation model
- A large model pretrained on broad data and adapted to many tasks · Units 0, 1
- FP8 / INT4
- Lower-precision number formats that shrink models and speed up inference · Unit 13
- Function calling
- Another name for tool calling · Unit 2
- Golden set
- A small, trusted set of inputs with known good answers · Units 3, 8
- GRPO
- A reinforcement learning method that scores groups of answers against each other · Unit 12
- Grounding
- Tying answers to provided sources so they can be checked · Unit 5
- Guardrails
- Checks around a model that block unsafe inputs or outputs · Unit 10
- Hallucination
- Confident output that isn't true or isn't supported by the sources · Unit 1
- HNSW
- A graph-based index for fast approximate nearest-neighbour search · Unit 4
- Human in the loop
- A person approving or correcting an AI system's actions at set points · Unit 6
- Hybrid search
- Combining keyword and vector search results · Unit 4
- HyDE
- Retrieving with an embedding of an imagined answer instead of the question · Unit 5
- Inference
- Running a trained model to get outputs · Unit 13
- Jailbreak
- A prompt crafted to make a model ignore its safety rules · Unit 10
- Knowledge cutoff
- The date after which a model has no training data · Unit 1
- KV cache
- Stored attention keys and values that make generating each new token cheaper · Unit 13
- Latency (TTFT, TPOT)
- Time to first token, and time per output token · Unit 13
- Lethal trifecta
- Private data, untrusted content and a way to send data out, together in one agent · Unit 10
- LLM
- Large language model: a transformer trained on huge amounts of text · Unit 1
- LLM gateway
- A proxy in front of model providers that handles keys, quotas, routing and logs · Unit 11
- LLM-as-a-judge
- Using a model to grade another model's output against a rubric · Unit 8
- LLMOps
- Practices and tools for running LLM features in production · Unit 11
- Logits / logprobs
- The model's raw scores and probabilities for each possible next token · Unit 1
- LoRA / QLoRA
- Fine-tuning by training small add-on matrices instead of all weights · Unit 12
- Loss, epoch, overfitting
- How wrong a model is, one pass over the data, and memorising instead of learning · Unit 12 and the Under the hood track
- Max tokens / stop sequences
- Limits that end a response at a length or at chosen text · Unit 2
- MCP
- Model Context Protocol: an open standard for connecting models to tools and data · Unit 6
- Mixture of experts (MoE)
- A model where each token uses only a few of many sub-networks · the Under the hood track
- Model / system card
- The document a lab publishes about a model's abilities, limits and safety testing · Unit 16
- Model routing
- Sending each request to the cheapest model that can handle it · Unit 11
- Multimodal
- Handling more than one kind of input or output, like text plus images · Units 1, 14
- On-device model
- A model small enough to run on a phone, laptop or browser · Unit 14
- Open-weight vs open-source
- Downloadable weights vs a licence that also allows full reuse, data and code · Unit 1
- OpenTelemetry / span
- The standard for traces, where each step of a request is one span · Unit 11
- Orchestration frameworks
- Libraries for chaining model calls, RAG and agents, such as LangChain or agent SDKs · Unit 9
- Parameters
- The learned numbers inside a model; "70B" means 70 billion of them · Unit 1
- pass@k
- The chance that at least one of k attempts succeeds · Unit 8
- PEFT
- Parameter-efficient fine-tuning, the family LoRA belongs to · Unit 12
- PII redaction
- Removing personal data such as names and emails from prompts and logs · Unit 11
- Prefill vs decode
- Reading the whole prompt at once, then generating output one token at a time · Unit 13
- Pretraining
- The first, huge training run that teaches a model language and knowledge · Unit 1
- Prompt caching
- Reusing the processed form of a repeated prompt prefix to save cost and time · Unit 2
- Prompt injection
- Untrusted text that hijacks a model's instructions · Units 3, 10
- Quantization
- Storing weights with fewer bits to save memory and speed up inference · Unit 13
- RAG
- Retrieval-augmented generation: fetching relevant data and adding it to the prompt · Unit 5
- ReAct
- The reason-then-act loop that most agents use · Unit 6
- Reasoning effort / thinking budget
- A setting for how long a reasoning model may think before answering · Unit 2
- Reasoning model
- A model trained to think at length before answering, the default in 2026 · Unit 1
- Recall@k, MRR, nDCG
- Scores for how well retrieval puts the right documents near the top · Unit 4
- Reranker
- A model that re-scores retrieved results for relevance · Unit 4
- RFT
- Reinforcement fine-tuning: provider APIs that tune a model against your grader · Unit 12
- RLHF
- Reinforcement learning from human feedback, used to make models helpful and safe · Units 1, 12
- RLVR
- Reinforcement learning from verifiable rewards, like tests that pass or answers that check out · Unit 12
- Sandbox
- An isolated environment where an agent can run code without touching real systems · Units 6, 10
- Scaling laws
- Predictable gains from more compute, data and parameters · the Under the hood track
- Semantic caching
- Reusing an earlier answer when a new question means the same thing · Unit 11
- SLM
- Small language model, roughly under 10 billion parameters · Unit 14
- Speculative decoding
- A small model drafts tokens that a big model checks in one pass · Unit 13
- Structured outputs
- Forcing model output to match a JSON schema · Unit 2
- Subagent
- A helper agent started by another agent for one piece of work, with its own context · Unit 6
- Synthetic data
- Training or test data generated by models · Units 8, 12
- System prompt
- Standing instructions that set a model's role and rules · Units 2, 3
- Temperature
- A setting that makes output more random (high) or more predictable (low) · Unit 1
- Tensor parallelism
- Splitting each layer of a model across several GPUs · Unit 13
- Test-time compute
- Spending more computation while answering, such as longer thinking · Unit 1 and the Under the hood track
- Throughput / goodput
- Tokens served per second, and the share that met the latency target · Unit 13
- Token
- The unit of text a model reads and writes, often a piece of a word · Unit 1
- Tool calling
- A model asking your code to run a function with given arguments · Units 2, 6
- Tool poisoning
- Hidden instructions in a tool's description or output that hijack an agent · Unit 10
- Top-p / top-k
- Sampling settings that limit which next tokens are considered · Unit 1
- Transformer
- The neural network architecture behind modern LLMs · Unit 1 and the Under the hood track
- Vector database
- A database built to store embeddings and search them by similarity · Unit 4
- Vibe coding
- Building software by prompting an AI and accepting its code with little review · Unit 0
- vLLM
- A popular open-source engine for serving LLMs fast · Unit 13
- Zero-shot
- Asking a model to do a task with no examples · Unit 3