Twelve projects and a language model of your own
Each phase ends in something you build and run yourself, in Python, in your browser. Alongside the course, Baby AI grows from an alphabet into a small transformer.
Ad-copy reviewer
Combine files, functions, JSON and an LLM call into one small tool.
- Break a real task into load, check, report and generate steps
- Write rule checks as small functions that return a list of problems
- Save results as a JSON report other tools can read
Read the tutorial · See the lesson Free
Research agent
A marketing research agent with retrieval, tools and evals.
- Combine retrieval, tools and an agent loop into one assistant
- Make every claim traceable to a source the agent actually looked at
- Grade the agent automatically with code checks on a small eval set
Cross-entropy and KL divergence
The loss function language models are trained on.
- Compute cross-entropy between a true distribution and a model's prediction
- Show that with one correct answer, cross-entropy is −log of the probability given to it
- Compute KL divergence and explain it as the extra cost of using the wrong distribution
Churn prediction
Predict which customers will leave, and measure it properly.
- Run a complete ML project: framing, baselines, model comparison, one honest test
- Translate model scores into a campaign: lift, a cost-based contact list and its expected value
- Explain what drives the predictions and check whether the probabilities can be trusted
Train a classifier
Build, train and debug a network end to end.
- Prepare tabular data for a neural network without leaking test information
- Run the sanity checks before trusting a training run
- Train a regularized network with early stopping on a validation metric
Build a tiny GPT
Write and train a small GPT from scratch.
- Prepare a corpus for a language model: tokenize, split, and batch with shifted targets
- Train a small GPT from scratch and watch its loss fall
- Generate text from it and judge what it has and hasn't learned
A tuned, evaluated assistant
Fine-tune, evaluate and deploy a specialist assistant.
- Run a release review: train a candidate, evaluate it on every criterion, and apply release gates
- Diagnose a failed candidate and fix it by changing the training data
- Explain why a single headline metric, or a raw loss, can hide regressions
A command-line app
Design, build and test a complete program with a database.
- Turn a short brief into requirements, a data model and a layered design
- Build a command-line interface with argparse, exit codes and clear errors
- Store data with a repository class over SQLite
A complete API
An authenticated, validated, paginated API with tests.
- Design a small API end to end: resources, routes, schemas, errors and auth
- Combine authentication, scopes and object-level checks on every endpoint
- Wire validation, persistence, cursor pagination and idempotency into one service
A production MCP server
A complete, tested server for the practice shop.
- Plan an MCP server: which tools, resources and prompts, and how each is described
- Wire the pieces of this phase into one dispatcher that follows the 2026-07-28 rules
- Serve it over stdio framing and test it end to end through a client
Build a coding agent
A harness that edits a project, runs its tests and stops when they pass.
- Combine the loop, tools, permissions, a stop check and an event log into one coding agent
- Give the agent file tools that stay inside the project and refuse to change the tests
- Make the harness, not the model, decide when the work is done: when the tests pass
Ship a production AI service
An AI-backed service with validation, caching, rate limits, fallbacks, logging and evals.
- Combine authentication, rate limiting, validation, caching, fallbacks and logging in one service
- Treat model output as untrusted: parse it, check it against allowed values, and fall back
- Log every request in a structured way, without keys or customer text
Grow your own language model
Six stages, each adding one real component of a modern language model. It trains on text you choose, right in your browser.
- Stage 1 · Newborn Your AI has just been born.
- Stage 2 · Infant The simplest way to guess what comes next: look back at the training text and count.
- Stage 3 · Toddler Counting works for pairs of characters, but it can't grow into longer memories.
- Stage 4 · Child One character of memory isn't much.
- Stage 5 · Juvenile A fixed window treats every earlier character the same.
- Stage 6 · Adolescent This is the architecture behind every modern large language model, in miniature: the transformer.