// lessons
A structured curriculum for teaching yourself how LLMs and AI agents actually work — from first principles to advanced internals. Each lesson is a self-contained deep dive. Work through them in order.
How Deep Neural Networks Really Work
The foundations. What a neural network actually is, why stacking ReLUs can approximate any function, and how gradient descent tunes millions of parameters. Start here.
Build a Neural Network in a Spreadsheet
Theory into practice. Build a working neural network from scratch in a spreadsheet — no code, no libraries, just arithmetic you can see and touch. Train it on real Titanic passenger data.
Anatomy of an AI Coding Agent
From models to agents. What separates a chatbot from an agent, the six building blocks every production coding agent shares, how a single request flows from keystroke to output, and how permission systems keep an autonomous loop safe.
Inside the Transformer
The machine in the middle. How a language model turns a transcript into the next token: tokens and embeddings, why attention was the breakthrough, what a context window physically is — and a complete tiny GPT in PyTorch you can read in one sitting.
Train Your Own GPT
The hands-on payoff. Take the TinyGPT from Lesson 4, feed it a laptop-sized corpus, write the training loop yourself, and watch generated text condense out of randomness — from noise, to word-shaped noise, to fluent (and confidently wrong) sentences. Complete runnable script included.
From Predictor to Assistant
The shaping pass. How a raw next-token predictor becomes an assistant: instruction tuning, preference-based refinement, why the same weights can host such different behaviours — and how the post-training pipeline explains sycophancy, polished hallucination, and miscalibrated refusals in deployed clinical tools.
Meaning as Geometry: Embeddings, Retrieval, and RAG
Grounding the model. How text becomes coordinates, why nearest-neighbour search finds meaning rather than keywords, the full RAG pipeline in twenty lines — and the retrieval failure modes (superseded guidance, similar-but-opposite passages) that matter most in clinical deployments.
The Capstone: Build a Grounded Assistant
Everything, assembled. Build a working retrieval assistant over a folder of your own documents — local embeddings, the twenty-line retriever, grounded answers with citations — then measure it honestly with a recall@k evaluation harness. Complete runnable script included.