// 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.

01

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.

Intermediate 35 min neural networks gradient descent ReLU universal approximation read →
02

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.

Beginner–Intermediate 25 min hands-on exercise gradient descent spreadsheet loss functions read →
03

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.

Intermediate 30 min AI agents agent loop tool use permissions sub-agents read →
04

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.

Intermediate–Advanced 35 min transformer attention embeddings context window GPT PyTorch read →
05

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.

Intermediate–Advanced 35 min training loss curves self-supervision overfitting sampling PyTorch read →
06

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.

Intermediate–Advanced 30 min post-training instruction tuning RLHF sycophancy alignment clinical AI read →
07

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.

Intermediate–Advanced 30 min embeddings vector search RAG grounding provenance clinical AI read →
08

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.

Advanced 40 min RAG evaluation recall@k chunking hands-on exercise clinical AI read →
curriculum.sh
$ echo "More lessons in progress"
New lessons are added regularly — from fundamentals through to advanced agent internals.
Check back, or start at Lesson 01 and work forward.