Lozo AI Course. AI engineering, with notes for owners.
Every phase and lesson of AI Engineering from Scratch, the free open course, in one reader. On top of each lesson, a note from Lozo in plain English: what it is, and where it shows up in a business.
Start with lesson 1
Phase 0, Lesson 1 of 13Dev EnvironmentStart here
If you run a business
Nine parts of the course an owner can use, in plain English, with the sources behind them.
01Phases 7, 10
How a model works
A language model writes one word at a time, picking what most likely comes next from patterns in a huge pile of text. It has no memory between chats and sees nothing of your business unless you hand it over.
Why it matters Know this and you stop expecting it to know your stock or last week's orders.
02Phase 11
Prompting and context
The prompt is your instructions. The context is everything the model can see when it answers: the prompt, your notes, a file, the last few messages.
Why it matters Most weak answers come from thin context, not a weak model.
Sources the course links 3
- DocsPrompting best practicesplatform.claude.comAnthropic's guide: be direct, show examples. (opens in a new tab)
- DocsPrompt engineeringdevelopers.openai.comOpenAI's guide to instructions and examples. (opens in a new tab)
- PaperChain-of-Thought Promptingarxiv.orgAsking for the steps first improves hard answers. (opens in a new tab)
03Phases 11, 13
Tools and function calling
A model can ask your software to do something: look up an order, book a slot, save a draft. You describe each tool, the model picks one and fills in the details, and your code runs it.
Why it matters This is the step from a chat window to AI that does work inside your systems.
Phase 11: LLM Engineering Phase 13: Tools & Protocols
Sources the course links 3
- DocsTool use with Claudeplatform.claude.comHow a model asks your code to act. (opens in a new tab)
- DocsFunction callingdevelopers.openai.comThe same idea in OpenAI's API. (opens in a new tab)
- DocsModel Context Protocolmodelcontextprotocol.ioAn open standard for plugging AI into your tools. (opens in a new tab)
04Phase 11
Knowledge bases (RAG)
Retrieval-augmented generation: before the model answers, the system finds the right passages in your own documents and hands them over. The answer then rests on your policy, not a guess.
Why it matters It is how an assistant answers from your handbook, menu or FAQ.
05Phase 14
Agents
An agent is a model in a loop: it plans, uses a tool, checks the result and goes again until the job is done or it needs you.
Why it matters Agents fit open-ended jobs. When the steps never change, a fixed workflow is cheaper and safer.
Sources the course links 3
- GuideBuilding effective agentsanthropic.comWhen to use an agent, and when a workflow is enough. (opens in a new tab)
- PaperReActarxiv.orgThink, act, look at the result: the loop most agents run. (opens in a new tab)
- DocsOpenAI Agents SDKopenai.github.ioA small open toolkit for agents and handoffs. (opens in a new tab)
06Phase 16
Teams of agents
Several agents split one job. A lead plans and hands parts to helpers that work side by side, then pulls their results together.
Why it matters Worth it for wide research work. For a single task, one agent is simpler.
Phase 16: Multi-Agent & Swarms
Sources the course links 3
- GuideHow we built our multi-agent research systemanthropic.comAnthropic on a lead agent and its helpers. (opens in a new tab)
- DocsAgent2Agent protocola2a-protocol.orgAn open standard for agents from different makers to work together. (opens in a new tab)
- GuideOrchestrating agentsdevelopers.openai.comRoutines and handoffs, in plain code. (opens in a new tab)
07Phase 11
Evals
An eval is a fixed set of real questions with the answers you expect. Run it each time you change a prompt, a model or a tool, and you see what got better or worse.
Why it matters Without one, every change is a guess you test on customers.
Sources the course links 3
- PaperJudging LLM-as-a-Judgearxiv.orgUsing a strong model to grade answers, and where it slips. (opens in a new tab)
- GuideThe evaluation guidebookhuggingface.coHugging Face's practical guide to testing models. (opens in a new tab)
- Toolpromptfoopromptfoo.devAn open-source tool to test prompts side by side. (opens in a new tab)
08Phases 11, 18
Guardrails and safe use
The checks around the model: what it may read, which actions wait for a person to approve, and filters on what goes in and what comes out.
Why it matters One wrong action, like an email to the wrong list, undoes the time AI saved.
Phase 11: LLM Engineering Phase 18: Ethics, Safety & Alignment
Sources the course links 3
- GuideOWASP Top 10 for LLM Applicationsgenai.owasp.orgThe common ways AI apps go wrong, and the fixes. (opens in a new tab)
- DocsModerationdevelopers.openai.comOpenAI's free check for harmful text. (opens in a new tab)
- RulesAI Actdigital-strategy.ec.europa.euThe EU's rules for AI, by level of risk. (opens in a new tab)
09Phases 13, 17
Shipping and running it
Once it works, it has to stay fast, affordable and visible: reuse what repeats, log every call, and watch cost and errors week to week.
Why it matters A build nobody watches drifts. The logs show what customers really ask.
Phase 13: Tools & Protocols Phase 17: Infrastructure & Production
The full course
Every phase, every lesson
Tap a phase to see its lessons. Each lesson keeps the course's own text, figures and quiz, with a short note for owners on top.
Setup & Tooling0/13 13 lessons
For owners. The engineer's workbench. Skim it so you know what a tidy, repeatable setup looks like when you hire one.
- 01Dev Environment
- 02Git & Collaboration
- 03GPU Setup & Cloud
- 04APIs & Keys
- 05Jupyter Notebooks
- 06Python Environments
- 07Docker for AI
- 08Editor Setup
- 09Data Management
- 10Terminal & Shell
- 11Linux for AI
- 12Debugging and Profiling
- 13Python for AI Engineering
Math Foundations0/22 22 lessons
For owners. The math under every model. You can skip it; the engineers you hire should know it.
- 01Linear Algebra Intuition
- 02Vectors, Matrices & Operations
- 03Matrix Transformations
- 04Calculus for Machine Learning
- 05Chain Rule & Automatic Differentiation
- 06Probability and Distributions
- 07Bayes' Theorem
- 08Optimization
- 09Information Theory
- 10Dimensionality Reduction
- 11Singular Value Decomposition
- 12Tensor Operations
- 13Numerical Stability
- 14Norms and Distances
- 15Statistics for Machine Learning
- 16Sampling Methods
- 17Linear Systems
- 18Convex Optimization
- 19Complex Numbers for AI
- 20The Fourier Transform
- 21Graph Theory for Machine Learning
- 22Stochastic Processes
ML Fundamentals0/21 21 lessons
For owners. Classic prediction, such as scoring leads or forecasting a busy week. Often simpler and cheaper than a chat model.
- 01What Is Machine Learning
- 02Linear Regression
- 03Logistic Regression
- 04Decision Trees and Random Forests
- 05Support Vector Machines
- 06K-Nearest Neighbors and Distances
- 07Unsupervised Learning
- 08Feature Engineering & Selection
- 09Model Evaluation
- 10Bias-Variance Tradeoff
- 11Ensemble Methods
- 12Hyperparameter Tuning
- 13ML Pipelines
- 14Naive Bayes
- 15Time Series Fundamentals
- 16Anomaly Detection
- 17Handling Imbalanced Data
- 18Feature Selection
- 19ML System Design — From Problem to Deployed Model
- 20Monitoring Models in Production — Data Drift and Concept Drift
- 21Feature Stores and Training-Serving Skew
Deep Learning Core0/13 13 lessons
For owners. How a neural network learns from examples. Background for everything after it; skim the notes.
- 01The Perceptron
- 02Multi-Layer Networks and Forward Pass
- 03Backpropagation from Scratch
- 04Activation Functions
- 05Loss Functions
- 06Optimizers
- 07Regularization
- 08Weight Initialization and Training Stability
- 09Learning Rate Schedules and Warmup
- 10Build Your Own Mini Framework
- 11Introduction to PyTorch
- 12Introduction to JAX
- 13Debugging Neural Networks
Computer Vision0/28 28 lessons
For owners. Software that reads images: receipts, shelf photos, damage photos, scanned forms.
- 01Image Fundamentals — Pixels, Channels, Color Spaces
- 02Convolutions from Scratch
- 03CNNs — LeNet to ResNet
- 04Image Classification
- 05Transfer Learning & Fine-Tuning
- 06Object Detection — YOLO from Scratch
- 07Semantic Segmentation — U-Net
- 08Instance Segmentation — Mask R-CNN
- 09Image Generation — GANs
- 10Image Generation — Diffusion Models
- 11Stable Diffusion — Architecture & Fine-Tuning
- 12Video Understanding — Temporal Modeling
- 133D Vision — Point Clouds & NeRFs
- 14Vision Transformers (ViT)
- 15Real-Time Vision — Edge Deployment
- 16Build a Complete Vision Pipeline — Capstone
- 17Self-Supervised Vision — SimCLR, DINO, MAE
- 18Open-Vocabulary Vision — CLIP
- 19OCR & Document Understanding
- 20Image Retrieval & Metric Learning
- 21Keypoint Detection & Pose Estimation
- 223D Gaussian Splatting from Scratch
- 23Diffusion Transformers & Rectified Flow
- 24SAM 3 & Open-Vocabulary Segmentation
- 25Vision-Language Models — The ViT-MLP-LLM Pattern
- 26Monocular Depth & Geometry Estimation
- 27Multi-Object Tracking & Video Memory
- 28World Models & Video Diffusion
NLP, Foundations to Advanced0/29 29 lessons
For owners. Working with text: sorting email, pulling details out of documents, reading reviews at scale.
- 01Text Processing — Tokenization, Stemming, Lemmatization
- 02Bag of Words, TF-IDF, and Text Representation
- 03Word Embeddings — Word2Vec from Scratch
- 04GloVe, FastText, and Subword Embeddings
- 05Sentiment Analysis
- 06Named Entity Recognition
- 07POS Tagging and Syntactic Parsing
- 08CNNs and RNNs for Text
- 09Sequence-to-Sequence Models
- 10Attention Mechanism — The Breakthrough
- 11Machine Translation
- 12Text Summarization
- 13Question Answering Systems
- 14Information Retrieval and Search
- 15Topic Modeling — LDA and BERTopic
- 16Text Generation Before Transformers — N-gram Language Models
- 17Chatbots — Rule-Based to Neural to LLM Agents
- 18Multilingual NLP
- 19Subword Tokenization — BPE, WordPiece, Unigram, SentencePiece
- 20Structured Outputs & Constrained Decoding
- 21Natural Language Inference — Textual Entailment
- 22Embedding Models — The 2026 Deep Dive
- 23Chunking Strategies for RAG
- 24Coreference Resolution
- 25Entity Linking & Disambiguation
- 26Relation Extraction & Knowledge Graph Construction
- 27LLM Evaluation — RAGAS, DeepEval, G-Eval
- 28Long-Context Evaluation — NIAH, RULER, LongBench, MRCR
- 29Dialogue State Tracking
Speech & Audio0/17 17 lessons
For owners. Calls turned into text and text turned into a voice: the base of an AI phone line.
- 01Audio Fundamentals — Waveforms, Sampling, Fourier Transform
- 02Spectrograms, Mel Scale & Audio Features
- 03Audio Classification — From k-NN on MFCCs to AST and BEATs
- 04Speech Recognition (ASR) — CTC, RNN-T, Attention
- 05Whisper — Architecture & Fine-Tuning
- 06Speaker Recognition & Verification
- 07Text-to-Speech (TTS) — From Tacotron to F5 and Kokoro
- 08Voice Cloning & Voice Conversion
- 09Music Generation — MusicGen, Stable Audio, Suno, and the Licensing Earthquake
- 10Audio-Language Models — Qwen2.5-Omni, Audio Flamingo, GPT-4o Audio
- 11Real-Time Audio Processing
- 12Build a Voice Assistant Pipeline — The Phase 6 Capstone
- 13Neural Audio Codecs — EnCodec, SNAC, Mimi, DAC and the Semantic-Acoustic Split
- 14Voice Activity Detection & Turn-Taking — Silero, Cobra, and the Flush Trick
- 15Streaming Speech-to-Speech — Moshi, Hibiki, and Full-Duplex Dialogue
- 16Voice Anti-Spoofing & Audio Watermarking — ASVspoof 5, AudioSeal, WaveVerify
- 17Audio Evaluation — WER, MOS, UTMOS, MMAU, FAD, and the Open Leaderboards
Transformers Deep Dive0/16 16 lessons
For owners. The design inside today's chat models. The owner notes say what that means for what a model can do.
- 01Why Transformers — The Problems with RNNs
- 02Self-Attention from Scratch
- 03Multi-Head Attention
- 04Positional Encoding — Sinusoidal, RoPE, ALiBi
- 05The Full Transformer — Encoder + Decoder
- 06BERT — Masked Language Modeling
- 07GPT — Causal Language Modeling
- 08T5, BART — Encoder-Decoder Models
- 09Vision Transformers (ViT)
- 10Audio Transformers — Whisper Architecture
- 11Mixture of Experts (MoE)
- 12KV Cache, Flash Attention & Inference Optimization
- 13Scaling Laws
- 14Build a Transformer from Scratch — The Capstone
- 15Attention Variants — Sliding Window, Sparse, Differential
- 16Speculative Decoding — Draft, Verify, Repeat
Generative AI0/15 15 lessons
For owners. Making images, audio and video. Handy for drafts, with a person checking each one before it goes out.
- 01Generative Models — Taxonomy & History
- 02Autoencoders & Variational Autoencoders (VAE)
- 03GANs — Generator vs Discriminator
- 04Conditional GANs & Pix2Pix
- 05StyleGAN
- 06Diffusion Models — DDPM from Scratch
- 07Latent Diffusion & Stable Diffusion
- 08ControlNet, LoRA & Conditioning
- 09Inpainting, Outpainting & Image Editing
- 10Video Generation
- 11Audio Generation
- 123D Generation
- 13Flow Matching & Rectified Flows
- 14Evaluation — FID, CLIP Score, Human Preference
- 15Visual Autoregressive Modeling (VAR): Next-Scale Prediction
Reinforcement Learning0/12 12 lessons
For owners. How a model learns from feedback and rewards. Mostly for engineers.
- 01MDPs, States, Actions & Rewards
- 02Dynamic Programming — Policy Iteration & Value Iteration
- 03Monte Carlo Methods — Learning from Complete Episodes
- 04Temporal Difference — Q-Learning & SARSA
- 05Deep Q-Networks (DQN)
- 06Policy Gradient — REINFORCE from Scratch
- 07Actor-Critic — A2C and A3C
- 08Proximal Policy Optimization (PPO)
- 09Reward Modeling & RLHF
- 10Multi-Agent RL
- 11Sim-to-Real Transfer
- 12RL for Games — AlphaZero, MuZero, and the LLM-Reasoning Era
LLMs from Scratch0/24 24 lessons
For owners. Building a language model end to end. It shows why a model knows nothing of your business until you hand it over.
- 01Tokenizers: BPE, WordPiece, SentencePiece
- 02Building a Tokenizer from Scratch
- 03Data Pipelines for Pre-Training
- 04Pre-Training a Mini GPT (124M Parameters)
- 05Scaling: Distributed Training, FSDP, DeepSpeed
- 06Instruction Tuning (SFT)
- 07RLHF: Reward Model + PPO
- 08DPO: Direct Preference Optimization
- 09Constitutional AI and Self-Improvement
- 10Evaluation: Benchmarks, Evals, LM Harness
- 11Quantization: Making Models Fit
- 12Inference Optimization
- 13Building a Complete LLM Pipeline
- 14Open Models: Architecture Walkthroughs
- 15Speculative Decoding and EAGLE-3
- 16Differential Attention (V2)
- 17Native Sparse Attention (DeepSeek NSA)
- 18Multi-Token Prediction (MTP)
- 19DualPipe Parallelism
- 20DeepSeek-V3 Architecture Walkthrough
- 21Jamba — Hybrid SSM-Transformer
- 22Async and Hogwild! Inference
- 23Speculative Decoding and EAGLE
- 24Gradient Checkpointing and Activation Recomputation
LLM Engineering0/17 17 lessons
For owners. Putting models to work: prompts, knowledge bases, evals and guardrails. The phase most worth an owner's time.
- 01Prompt Engineering: Techniques & Patterns
- 02Few-Shot, Chain-of-Thought, Tree-of-Thought
- 03Structured Outputs: JSON, Schema Validation, Constrained Decoding
- 04Embeddings & Vector Representations
- 05Context Engineering: Windows, Budgets, Memory, and Retrieval
- 06RAG (Retrieval-Augmented Generation)
- 07Advanced RAG (Chunking, Reranking, Hybrid Search)
- 08Fine-Tuning with LoRA & QLoRA
- 09Function Calling & Tool Use
- 10Evaluation & Testing LLM Applications
- 11Caching, Rate Limiting & Cost Optimization
- 12Guardrails, Safety & Content Filtering
- 13Building a Production LLM Application
- 14Model Context Protocol (MCP)
- 15Prompt Caching and Context Caching
- 16Agent State Machines — Graphs, Nodes, Checkpoints
- 17Agent Framework Tradeoffs — Graph, Role, and Actor Orchestration
Multimodal AI0/25 25 lessons
For owners. Models that take a photo, a voice note and text together, such as reading a photo of an invoice.
- 01Vision Transformers and the Patch-Token Primitive
- 02CLIP and Contrastive Vision-Language Pretraining
- 03From CLIP to BLIP-2 — Q-Former as Modality Bridge
- 04Flamingo and Gated Cross-Attention for Few-Shot VLMs
- 05LLaVA and Visual Instruction Tuning
- 06Any-Resolution Vision: Patch-n'-Pack and NaFlex
- 07Open-Weight VLM Recipes: What Actually Matters
- 08LLaVA-OneVision: Single-Image, Multi-Image, Video in One Model
- 09Qwen-VL Family and Dynamic-FPS Video
- 10InternVL3: Native Multimodal Pretraining
- 11Chameleon and Early-Fusion Token-Only Multimodal Models
- 12Emu3: Next-Token Prediction for Image and Video Generation
- 13Transfusion: Autoregressive Text + Diffusion Image in One Transformer
- 14Show-o and Discrete-Diffusion Unified Models
- 15Janus-Pro: Decoupled Encoders for Unified Multimodal Models
- 16MIO and Any-to-Any Streaming Multimodal Models
- 17Video-Language Models: Temporal Tokens and Grounding
- 18Long-Video Understanding at Million-Token Context
- 19Audio-Language Models: the Whisper to Audio Flamingo 3 Arc
- 20Omni Models: Qwen2.5-Omni and the Thinker-Talker Split
- 21Embodied VLAs: RT-2, OpenVLA, π0, GR00T
- 22Document and Diagram Understanding
- 23ColPali and Vision-Native Document RAG
- 24Multimodal RAG and Cross-Modal Retrieval
- 25Multimodal Agents and Computer-Use (Capstone)
Tools & Protocols0/45 45 lessons
For owners. How AI connects to the tools you already use: the calendar, the inbox, the order system.
- 01The Tool Interface — Why Agents Need Structured I/O
- 02Function Calling Deep Dive — OpenAI, Anthropic, Gemini
- 03Parallel Tool Calls and Streaming with Tools
- 04Structured Output — JSON Schema, Pydantic, Zod, Constrained Decoding
- 05Tool Schema Design — Naming, Descriptions, Parameter Constraints
- 06MCP Fundamentals: Stateless Requests and JSON-RPC
- 07Building an MCP Server: Stateless Python and TypeScript
- 08Building an MCP Client: Discovery, Routing, and Dual-Era Fallback
- 09MCP Transports: stdio and Stateless Streamable HTTP
- 10MCP Resources and Prompts: Addressable Context for Stateless Servers
- 11MCP Model Input: Sampling Migration and Stateless MRTR
- 12Explicit Scope and Stateless Elicitation
- 13MCP Tasks Extension: Durable Work on a Stateless Core
- 14MCP Apps on the Stateless Protocol
- 15MCP Security: Poisoned Metadata, Routing, and MRTR State
- 16MCP Authorization: CIMD, Issuer Binding, PKCE, and Step-Up
- 17Stateless MCP Gateways and Registry Admission
- 18MCP Auth in Production: Issuer-Bound Enrollment and Tokens
- 19A2A — Agent-to-Agent Protocol
- 20OpenTelemetry GenAI — Tracing Tool Calls End-to-End
- 21LLM Routing Layer — LiteLLM, OpenRouter, Portkey
- 22Agent Skills: Portable Contract and Runtime Boundary
- 23Capstone: Stateless Tool Ecosystem
- 24Skill Discovery and Progressive Disclosure
- 25Skill Invocation and Routing
- 26Skill Permissions, Sandboxes, and Trust
- 27Skill Evals, Packaging, and Portability
- 28MCP Tool Contracts and Content
- 29MCP Reliability, Cancellation, and Flow Control
- 30MCP Registry Supply Chain: Admission, Drift, and Rollback
- 31MCP Conformance Engineering: Versioning, Evidence, and Operations
- 32Program Anatomy: An ELF Reader From Scratch
- 33Disassembly and Control Flow: From Bytes to a Graph You Can Check
- 34Lifting to Pseudocode: IR, SSA, and Structuring From Scratch
- 35Evidence, Confidence, and Unknowns in Binary Analysis
- 36Rebuild and Prove Equal: Differential Tests, Byte Comparison, and the Evidence Loop
- 37The Reverse Engineering Landscape: History, Tool Families, and How a Decompiler Is Built
- 38Calling Conventions and Stack Frames: System V, Windows x64, and AArch64
- 39Compiler Idioms: What Optimization Does to Your Code and How to Read It Back
- 40Linking, Loading, and Stripped Binaries: PLT, GOT, Imports, Fixups, and Function Identification
- 41Recovering Data and Types: Structs, Arrays, C++ Objects, and DWARF
- 42Dynamic Analysis of Your Own Program: Debuggers, Traces, and Confirming Static Claims
- 43Beyond Native Code: Python, JVM, .NET, and WebAssembly Bytecode
- 44Binary Diffing and Symbolic Execution: Matching Functions and Solving for Inputs
- 45AI-Assisted Reverse Engineering: LLM Decompilers, Analysis Agents, and Ground Truth
Agent Engineering0/54 54 lessons
For owners. Agents that take steps on their own. Read the notes before you let one act for your business.
- 01The Agent Loop: Observe, Think, Act
- 02ReWOO and Plan-and-Execute: Decoupled Planning
- 03Reflexion: Verbal Reinforcement Learning
- 04Tree of Thoughts and LATS: Deliberate Search
- 05Self-Refine and CRITIC: Iterative Output Improvement
- 06Tool Use and Function Calling
- 07Agent Memory — Virtual Context and Memory Paging
- 08Memory Blocks and Sleep-Time Compute
- 09Hybrid Memory: Vector + Graph + KV
- 10Skill Libraries and Lifelong Learning (Voyager)
- 11Planning with HTN and Evolutionary Search
- 12Anthropic's Workflow Patterns: Simple Over Complex
- 13Stateful Graph Orchestration — Durable Execution and Checkpoints
- 14The Actor Model for Agents — Async Messages and Typed Runtimes
- 15Role-Based Agent Teams — Roles, Tasks, Processes
- 16OpenAI Agents SDK: Handoffs, Guardrails, Tracing
- 17The Harness as a Library — Subagents and Session Store
- 18Production Agent Runtimes — Fast Instantiation and Typed Workflows
- 19Benchmarks: SWE-bench, GAIA, AgentBench
- 20Benchmarks: WebArena and OSWorld
- 21Computer Use: Claude, OpenAI CUA, Gemini
- 22Voice Agents: Pipecat and LiveKit
- 23OpenTelemetry GenAI Semantic Conventions
- 24Agent Observability: Langfuse, Phoenix, Opik
- 25Multi-Agent Debate and Collaboration
- 26Failure Modes: Why Agents Break
- 27Prompt Injection and the PVE Defense
- 28Orchestration Patterns: Supervisor, Swarm, Hierarchical
- 29Production Runtimes: Queue, Event, Cron
- 30Eval-Driven Agent Development
- 31Agent Workbench Engineering: Why Capable Models Still Fail
- 32The Minimal Agent Workbench
- 33Agent Instructions as Executable Constraints
- 34Repo Memory and Durable State
- 35Initialization Scripts for Agents
- 36Scope Contracts and Task Boundaries
- 37Runtime Feedback Loops
- 38Verification Gates
- 39Reviewer Agent: Separate Builder from Marker
- 40Multi-Session Handoff
- 41The Workbench on a Real Repo
- 42Capstone: Ship a Reusable Agent Workbench Pack
- 43Frame the Task Before the Agent Writes Code
- 44Build an Evidence-Backed Execution Plan
- 45Delegate Agent Work with Isolation and Merge Contracts
- 46Turn Every Agent Correction into a System Improvement
- 47Define the Outcome Before You Choose the Output
- 48Discover the Workflow People Actually Perform
- 49Map Assumptions and Resolve the Riskiest One First
- 50Choose the Smallest Slice That Can Change the Decision
- 51Write Specifications That Preserve Judgment
- 52Design Success Metrics Before the Result Exists
- 53Choose Prototype, Pilot, or Production Deliberately
- 54Build a Feedback Ratchet with Ownership and Retirement
Autonomous Systems0/22 22 lessons
For owners. Agents that run without a person watching. The limits matter more than the features.
- 01The Shift from Chatbots to Long-Horizon Agents
- 02STaR, V-STaR, Quiet-STaR — Self-Taught Reasoning
- 03AlphaEvolve — Evolutionary Coding Agents
- 04Darwin Godel Machine — Open-Ended Self-Modifying Agents
- 05AI Scientist v2 — Workshop-Level Autonomous Research
- 06Automated Alignment Research (Anthropic AAR)
- 07Recursive Self-Improvement — Capability vs Alignment
- 08Bounded Self-Improvement Designs
- 09The Autonomous Coding Agent Landscape (2026)
- 10Permission Modes for Autonomous Agents
- 11Browser Agents and Long-Horizon Web Tasks
- 12Long-Running Background Agents: Durable Execution
- 13Action Budgets, Iteration Caps, and Cost Governors
- 14Kill Switches, Circuit Breakers, and Canary Tokens
- 15Human-in-the-Loop: Propose-Then-Commit
- 16Checkpoints and Rollback
- 17Constitutional AI and Rule Overrides
- 18Llama Guard and Input/Output Classification
- 19Anthropic Responsible Scaling Policy v3.0
- 20OpenAI Preparedness Framework and DeepMind Frontier Safety Framework
- 21METR Time Horizons and External Capability Evaluation
- 22CAIS, CAISI, and Societal-Scale Risk
Multi-Agent & Swarms0/25 25 lessons
For owners. Several agents splitting one job. Worth it for big jobs, with more parts to check.
- 01Why Multi-Agent?
- 02Heritage of FIPA-ACL and Speech Acts
- 03Communication Protocols
- 04The Multi-Agent Primitive Model
- 05Supervisor / Orchestrator-Worker Pattern
- 06Hierarchical Architecture and Its Failure Mode
- 07Society of Mind and Multi-Agent Debate
- 08Role Specialization — Planner, Critic, Executor, Verifier
- 09Parallel / Swarm / Networked Architectures
- 10Group Chat and Speaker Selection
- 11Handoffs and Routines — Stateless Orchestration
- 12A2A — The Agent-to-Agent Protocol
- 13Shared Memory and Blackboard Patterns
- 14Consensus and Byzantine Fault Tolerance for Agents
- 15Voting, Self-Consistency, and Debate Topology
- 16Negotiation and Bargaining
- 17Generative Agents and Emergent Simulation
- 18Theory of Mind and Emergent Coordination
- 19Swarm Optimization for LLMs (PSO, ACO)
- 20MARL — MADDPG, QMIX, MAPPO
- 21Agent Economies, Token Incentives, Reputation
- 22Production Scaling — Queues, Checkpoints, Durability
- 23Failure Modes — MAST, Groupthink, Monoculture, Cascading Errors
- 24Evaluation and Coordination Benchmarks
- 25Case Studies and the 2026 State of the Art
Infrastructure & Production0/29 29 lessons
For owners. Keeping an AI build fast, affordable and watched once it is live.
- 01Managed LLM Platforms — Bedrock, Vertex AI, Azure OpenAI
- 02Inference Platform Economics — Fireworks, Together, Baseten, Modal, Replicate, Anyscale
- 03GPU Autoscaling on Kubernetes — Karpenter, KAI Scheduler, Gang Scheduling
- 04Serving Engine Internals — PagedAttention, Continuous Batching, Chunked Prefill
- 05EAGLE-3 Speculative Decoding in Production
- 06Prefix-Cache Serving — RadixAttention and KV Reuse
- 07Hardware-Specialized Inference Compilation — FP8 and NVFP4 on Blackwell
- 08Inference Metrics — TTFT, TPOT, ITL, Goodput, P99
- 09Production Quantization — AWQ, GPTQ, GGUF K-quants, FP8, MXFP4/NVFP4
- 10Cold Start Mitigation for Serverless LLMs
- 11Multi-Region LLM Serving and KV Cache Locality
- 12Edge Inference — Apple Neural Engine, Qualcomm Hexagon, WebGPU/WebLLM, Jetson
- 13LLM Observability Stack Selection
- 14Prompt Caching and Semantic Caching Economics
- 15Batch APIs — the 50% Discount as Industry Standard
- 16Model Routing as a Cost-Reduction Primitive
- 17Disaggregated Prefill/Decode — NVIDIA Dynamo and llm-d
- 18Production Serving Stack — KV Offloading and Cache-Aware Routing
- 19AI Gateways — LiteLLM, Portkey, Kong AI Gateway, Bifrost
- 20Shadow Traffic, Canary Rollout, and Progressive Deployment for LLMs
- 21A/B Testing LLM Features — GrowthBook, Statsig, and the Vibes Problem
- 22Load Testing LLM APIs — Why k6 and Locust Lie
- 23SRE for AI — Multi-Agent Incident Response, Runbooks, Predictive Detection
- 24Chaos Engineering for LLM Production
- 25Security — Secrets, API Key Rotation, Audit Logs, Guardrails
- 26Compliance — SOC 2, HIPAA, GDPR, PCI-DSS, EU AI Act, ISO 42001
- 27FinOps for LLMs — Unit Economics and Multi-Tenant Attribution
- 28Self-Hosted Serving Selection — Matching Engine to Hardware and Scale
- 29Model Demo Interfaces — From a Function to a Shareable App
Ethics, Safety & Alignment0/30 30 lessons
For owners. Using AI safely: privacy, fairness, and where a person has to decide.
- 01Instruction-Following as Alignment Signal
- 02Reward Hacking and Goodhart's Law
- 03The Direct Preference Optimization Family
- 04Sycophancy as RLHF Amplification
- 05Constitutional AI and RLAIF
- 06Mesa-Optimization and Deceptive Alignment
- 07Sleeper Agents — Persistent Deception
- 08In-Context Scheming in Frontier Models
- 09Alignment Faking
- 10AI Control — Safety Despite Subversion
- 11Scalable Oversight and Weak-to-Strong Generalization
- 12Red-Teaming: PAIR and Automated Attacks
- 13Many-Shot Jailbreaking
- 14ASCII Art and Visual Jailbreaks
- 15Indirect Prompt Injection — Production Attack Surface
- 16Red-Team Tooling — Garak, Llama Guard, PyRIT
- 17WMDP and Dual-Use Capability Evaluation
- 18Frontier Safety Frameworks — RSP, PF, FSF
- 19Anthropic's Model Welfare Program
- 20Bias and Representational Harm in LLMs
- 21Fairness Criteria — Group, Individual, Counterfactual
- 22Differential Privacy for LLMs
- 23Watermarking — SynthID, Stable Signature, C2PA
- 24Regulatory Frameworks — EU, US, UK, Korea
- 25EchoLeak and the Emergence of CVEs for AI
- 26Model, System, and Dataset Cards
- 27Data Provenance and Training-Data Governance
- 28Alignment Research Ecosystem — MATS, Redwood, Apollo, METR
- 29Moderation Systems — OpenAI, Perspective, Llama Guard
- 30Dual-Use Risk — Cyber, Bio, Chem, Nuclear Uplift
Capstone Projects0/85 85 lessons
For owners. Full projects that pull the course together. A good test for an engineer you plan to hire.
- 01Capstone 01 — Terminal-Native Coding Agent
- 02Capstone 02 — RAG over Codebase (Cross-Repo Semantic Search)
- 03Capstone 03 — Real-Time Voice Assistant (ASR to LLM to TTS)
- 04Capstone 04 — Multimodal Document QA (Vision-First PDF, Tables, Charts)
- 05Capstone 05 — Autonomous Research Agent (AI-Scientist Class)
- 06Capstone 06 — DevOps Troubleshooting Agent for Kubernetes
- 07Capstone 07 — End-to-End Fine-Tuning Pipeline (Data to SFT to DPO to Serve)
- 08Capstone 08 — Production RAG Chatbot for a Regulated Vertical
- 09Capstone 09 — Code Migration Agent (Repo-Level Language / Runtime Upgrade)
- 10Capstone 10 — Multi-Agent Software Engineering Team
- 11Capstone 11 — LLM Observability & Eval Dashboard
- 12Capstone 12 — Video Understanding Pipeline (Scene, QA, Search)
- 13Capstone 13: Stateless MCP Server with Registry and Governance
- 14Capstone 14 — Speculative-Decoding Inference Server
- 15Capstone 15 — Constitutional Safety Harness + Red-Team Range
- 16Capstone 16 — GitHub Issue-to-PR Autonomous Agent
- 17Capstone 17 — Personal AI Tutor (Adaptive, Multimodal, with Memory)
- 18Agent Harness Loop Contract
- 19Tool Registry with Schema Validation
- 20JSON-RPC 2.0 Over Newline-Delimited Stdio
- 21Function Call Dispatcher
- 22Plan-Execute Control Flow
- 23Capstone Lesson 25: Verification Gates and the Observation Budget
- 24Capstone Lesson 26: Sandbox Runner with Denylist and Path Jail
- 25Capstone Lesson 27: Eval Harness with Fixture Tasks
- 26Capstone Lesson 28: Observability with OTel GenAI Spans and Prometheus Metrics
- 27Capstone Lesson 29: End-to-End Coding Agent on the Harness
- 28BPE Tokenizer From Scratch
- 29Tokenized Dataset with Sliding Window
- 30Token and Positional Embeddings
- 31Multi-Head Self-Attention
- 32Transformer Block from Scratch
- 33GPT Model Assembly
- 34Training Loop and Evaluation
- 35Loading Pretrained Weights
- 36Capstone Lesson 38: Classifier Fine-Tuning by Head Swap
- 37Capstone Lesson 39: Instruction Tuning by Supervised Fine-Tuning
- 38Capstone Lesson 40: Direct Preference Optimization from Scratch
- 39Capstone Lesson 41: Full Evaluation Pipeline
- 40Large Corpus Downloader
- 41HDF5 Tokenized Corpus
- 42Cosine LR with Linear Warmup
- 43Gradient Clipping and Mixed Precision
- 44Gradient Accumulation
- 45Checkpoint Save and Resume
- 46Distributed Data Parallel and FSDP from Scratch
- 47Language Model Evaluation Harness
- 48Hypothesis Generator
- 49Literature Retrieval
- 50Experiment Runner
- 51Result Evaluator
- 52Paper Writer
- 53Critic Loop
- 54Iteration Scheduler
- 55End-to-End Research Demo
- 56Vision Encoder Patches
- 57Vision Transformer Encoder
- 58Projection Layer for Modality Alignment
- 59Cross-Attention Fusion
- 60Vision-Language Pretraining
- 61Multimodal Evaluation
- 62Chunking Strategies, Compared
- 63Hybrid Retrieval with BM25 and Dense Embeddings
- 64Cross-Encoder Reranker
- 65Query Rewriting: HyDE, Multi-Query, and Decomposition
- 66RAG Evaluation: Precision, Recall, MRR, nDCG, Faithfulness, Answer Relevance
- 67End-to-End RAG System
- 68Task Spec Format
- 69Classical Metrics
- 70Code Exec Metric
- 71Perplexity and Calibration
- 72Leaderboard Aggregation
- 73End-to-End Eval Runner
- 74Collective Ops From Scratch
- 75Data Parallel DDP From Scratch
- 76ZeRO Optimizer State Sharding
- 77Pipeline Parallel and Bubble Analysis
- 78Sharded Checkpoint and Atomic Resume
- 79End-to-End Distributed Training
- 80Capstone 82 — Jailbreak Taxonomy
- 81Capstone 83 — Prompt Injection Detector
- 82Capstone 84 — Refusal Evaluation
- 83Capstone 85 — Content Classifier Integration
- 84Capstone 86 — Constitutional Rules Engine
- 85Capstone 87 — End-to-End Safety Gate
Lessons from AI Engineering from Scratch by Rohit Ghumare and contributors, MIT license. Notes for owners by Lozo. License
Next step
Rather have it built for you?
Reading is optional. Tell me what's stuck and I'll build it into the business you already run.