Phase 0 · about 12 hours of study
Python, the terminal and calling APIs. 24 lessons, all free to try. About this phase
24 lessons
- Your first program FreeRun Python, print output, and read an error message without panicking.
- Variables FreeGive values names so your program can remember and reuse them.
- Numbers and arithmetic FreeIntegers, decimals, rounding, and the math behind every metric.
- Strings and f-strings FreeWork with text: join it, slice it, clean it, and format it.
- Decisions with if/else FreeCompare values and choose what happens next.
- Lists FreeKeep many values in order, then index, slice and change them.
- Loops FreeRepeat work over every item without copy-pasting code.
- Dictionaries FreeLook values up by name: the shape of almost all real-world data.
- Functions FreePackage steps into reusable, testable pieces with inputs and outputs.
- Comprehensions FreeFilter and transform a whole collection in one readable line.
- Errors and exceptions FreeRead tracebacks, and handle the failures you expect.
- Modules and imports FreeUse Python's standard library instead of reinventing it.
- Classes and objects FreeBundle data with the functions that work on it.
- JSON FreeThe text format APIs and LLMs use to exchange structured data.
- Files and CSV data FreeRead and write files, and turn a spreadsheet export into Python data.
- NumPy arrays FreeDo math on whole columns at once, the foundation of every ML library.
- The terminal FreeNavigate folders and run programs by typing commands.
- Version control with git FreeSave snapshots of your work, undo mistakes, and share code.
- Packages and environments FreeInstall libraries with pip and keep projects isolated with venv.
- How APIs work FreeRequests, responses, methods, status codes and headers.
- Calling APIs from Python FreeSend requests, read JSON responses, and handle failures.
- API keys and secrets FreeAuthenticate safely and keep keys out of your code.
- Your first LLM call FreeSend messages to a model and read its reply, tokens and stop reason.
- Capstone: ad-copy reviewer FreeCombine files, functions, JSON and an LLM call into one small tool.
Phase 1 · about 17 hours of study
Prompting, retrieval, tools, agents and evals. 31 lessons, 1 free to try. About this phase
31 lessons
- What an LLM actually does FreeNext-token prediction, and why that produces useful behavior.
- Tokens and the context windowHow text becomes tokens, and what fits in one request.
- Prompt fundamentalsClear instructions, context and constraints: the 80% of prompting.
- System prompts and rolesSet behavior once, separately from the conversation.
- Examples in promptsShow the model what good looks like (few-shot prompting).
- Structured outputGet reliable JSON back that your code can use.
- Prompt chainingBreak big tasks into a pipeline of smaller model calls.
- Choosing a modelTrade capability, speed and cost across model families.
- Reasoning models and effortWhen models think before answering, and how to control it.
- Streaming responsesShow output as it's generated instead of waiting.
- Conversations and memoryAPIs are stateless: how chat history and memory really work.
- Images and documentsSend screenshots, PDFs and charts as input.
- EmbeddingsMeaning as a list of numbers, so text can be compared.
- Similarity searchFind the most relevant text by comparing embeddings.
- Chunking documentsSplit long documents so the right piece can be retrieved.
- Vector databasesStore and search millions of embeddings quickly.
- Retrieval-augmented generationAnswer from your own documents instead of the model's memory.
- Making RAG goodHybrid search, reranking and citations.
- Hallucinations and groundingWhy models make things up, and how to design against it.
- Tool useLet the model call your functions (function calling).
- The agent loopModel → tool → result → model, until the task is done.
- Model Context ProtocolA standard way to plug tools and data into any AI app.
- Agent design patternsRouting, orchestrator-workers and when not to build an agent.
- LLMs in automationsPut models inside scripts and workflow tools that run on their own.
- Prompt injection and securityHow untrusted text hijacks models, and how to limit the damage.
- EvalsMeasure output quality with test sets instead of vibes.
- LLM-as-judgeGrade open-ended output with rubrics and a second model.
- Cost and latencyPrompt caching, batching and routing to cheaper models.
- Logging and monitoringSee what your LLM app actually did in production.
- Shipping an LLM appDeploy, secure keys, rate-limit and handle failures.
- Capstone: research agentA marketing research agent with retrieval, tools and evals.
Phase 2 · about 15 hours of study
The linear algebra, calculus and probability models run on. 29 lessons, 1 free to try. About this phase
29 lessons
- Vectors FreeA list of numbers as a point or an arrow in space.
- Vector arithmetic and lengthAdd, scale and measure vectors.
- Dot product and cosine similarityThe one operation behind similarity search and attention.
- MatricesTables of numbers that hold datasets and model weights.
- Matrix multiplicationMany dot products at once: what a neural network layer computes.
- Matrices as transformationsA matrix stretches, rotates and projects space.
- Transpose, identity and inverseThe matrix operations you'll see in every formula.
- TensorsArrays with more axes: batches, sequences, heads.
- Eigenvectors (intuition)The directions a transformation leaves pointing the same way.
- SVD and PCACompress data to its most important directions.
- Functions and graphsRead a graph and see how an output depends on an input.
- Exponentials and logarithmsGrowth, decay, and why logs turn products into sums.
- DerivativesThe slope at a point: how fast the output changes.
- Derivative rulesPower, sum and product rules, so you rarely compute from scratch.
- The chain ruleDerivatives of functions inside functions: the heart of backprop.
- Partial derivativesChange one input at a time when there are many.
- GradientsThe vector of all partial derivatives: which way is uphill.
- Optimization by walking downhillRepeatedly step against the gradient to find a minimum.
- Probability basicsEvents, outcomes and the rules for combining them.
- Conditional probability and BayesUpdate beliefs when new evidence arrives.
- DistributionsRandom variables and the shapes their outcomes take.
- Mean, variance and spreadExpected value, variance and standard deviation.
- The normal distributionThe bell curve, and why it shows up everywhere.
- Samples and confidenceEstimate from a sample and say how sure you are.
- A/B tests and significanceTell a real lift from noise.
- Maximum likelihoodChoose the parameters that make the data most probable.
- SoftmaxTurn any list of scores into probabilities.
- Entropy and surpriseMeasure uncertainty in bits.
- Cross-entropy and KL divergenceThe loss function language models are trained on.
Phase 3 · about 14 hours of study
Learning from data, and knowing when it worked. 24 lessons, 1 free to try. About this phase
24 lessons
- What machine learning is FreePrograms that learn rules from examples instead of being told them.
- Features and labelsSupervised learning: inputs, targets and predictions.
- Preparing dataClean, encode and scale data before a model sees it.
- Feature engineeringTurn raw data into signals a model can use.
- Train, validation and test setsHold data back so you can trust your results.
- Linear regressionFit a line, and predict numbers from features.
- Loss functionsOne number that says how wrong the model is.
- Training with gradient descentAdjust weights step by step to reduce the loss.
- Learning rateStep size, convergence and divergence.
- Logistic regressionPredict probabilities for yes/no outcomes.
- Multiclass classificationSoftmax and cross-entropy for more than two classes.
- Decision treesLearn a flowchart of yes/no questions.
- Random forests and boostingMany weak models voting beat one strong one.
- Nearest neighborsPredict from the most similar examples.
- Overfitting and underfittingMemorizing versus learning.
- RegularizationPenalize complexity so models generalize.
- Bias and varianceThe two ways a model can be wrong.
- Precision, recall and F1Accuracy lies; these don't.
- ROC curves and AUCJudge a classifier across every threshold.
- Cross-validationReuse limited data for more reliable estimates.
- ClusteringGroup similar items without labels (k-means).
- Dimensionality reductionVisualize and compress high-dimensional data.
- The scikit-learn workflowFit, predict and evaluate with the standard ML library.
- Capstone: churn predictionPredict which customers will leave, and measure it properly.
Phase 4 · about 15 hours of study
Neural networks, backprop and training them well. 23 lessons, 1 free to try. About this phase
23 lessons
- The artificial neuron FreeWeighted sum plus a nonlinearity.
- Activation functionsReLU, sigmoid, GELU, and why nonlinearity matters.
- Multi-layer networksStack layers to learn complex functions.
- The forward passFollow numbers through a network to a prediction.
- Computation graphsEvery calculation as a graph of small operations.
- BackpropagationThe chain rule applied backwards to get every gradient.
- Build an autograd engineWrite backprop yourself in ~100 lines (micrograd).
- Weight initializationStart weights at the right scale.
- The training loopForward, loss, backward, step, repeat.
- Mini-batches and SGDTrain on small random batches instead of everything at once.
- OptimizersMomentum and Adam.
- Normalization layersBatch and layer norm keep training stable.
- DropoutRandomly switch off neurons to prevent overfitting.
- Vanishing and exploding gradientsWhy deep networks were hard to train.
- Debugging trainingRead loss curves and fix what's wrong.
- Residual connectionsSkip connections that let gradients flow.
- Convolutional networksPattern detectors for images.
- Recurrent networksProcess sequences step by step, and their limits.
- Embedding layersLearned lookup tables that turn tokens into vectors.
- PyTorch tensorsNumPy-like arrays that run on GPUs.
- PyTorch autograd and modulesLet PyTorch compute gradients; build models with nn.Module.
- GPUs and computeWhy deep learning runs on graphics cards.
- Capstone: train a classifierBuild, train and debug a network end to end.
Phase 5 · about 14 hours of study
Attention, GPT from scratch and pretraining. 21 lessons, 1 free to try. About this phase
21 lessons
- Language modeling FreePredict the next token, and score it with cross-entropy.
- Tokenization and BPEHow tokenizers are built from data.
- A bigram modelThe simplest language model, built from counts.
- Sampling strategiesTemperature, top-k and top-p: turning probabilities into text.
- Neural language modelsWhy counting fails, and what embeddings fix.
- Attention: the intuitionEach token decides which other tokens matter to it.
- Queries, keys and valuesThe three projections behind attention.
- Scaled dot-product attentionThe attention formula, line by line.
- Causal maskingStop tokens from seeing the future.
- Multi-head attentionSeveral attention patterns in parallel.
- Positional encodingsTell the model where each token sits.
- The transformer blockAttention, MLP, residuals and norms together.
- The GPT architectureA stack of decoder blocks that predicts the next token.
- Build a tiny GPTWrite and train a small GPT from scratch.
- Encoders and embedding modelsBERT-style models and where they fit.
- Pretraining at scaleData, compute and what models learn from the internet.
- Scaling lawsHow loss falls predictably with size, data and compute.
- Inference and the KV cacheWhy generation is fast after the first token.
- Long contextEfficient attention and million-token windows.
- Mixture of expertsRoute each token to a few specialist sub-networks.
- Multimodal transformersHow models see images and hear audio.
Phase 6 · about 16 hours of study
Post-training, fine-tuning, serving and safety. 22 lessons, 1 free to try. About this phase
22 lessons
- Base models vs assistants FreeWhat post-training adds to a pretrained model.
- Supervised fine-tuningTeach behavior from example conversations.
- Instruction and preference dataThe datasets that shape assistant behavior.
- RLHFReward models and reinforcement learning from human feedback.
- DPO and direct preference methodsPreference training without a separate reward model.
- Constitutional AITraining with AI feedback guided by written principles.
- Training reasoning modelsReinforcement learning on verifiable problems.
- Prompting vs RAG vs fine-tuningPick the cheapest approach that works.
- LoRAFine-tune a big model by training small low-rank updates.
- Fine-tune an open modelRun a real fine-tune and evaluate the result.
- DistillationTrain a small model to imitate a large one.
- QuantizationStore weights in fewer bits to run models cheaply.
- Serving modelsBatching, throughput and latency in production.
- Speculative decodingDraft with a small model, verify with a big one.
- Running open models locallyDownload, quantize and run a model on your own machine.
- Benchmarks and their limitsWhat leaderboards measure, and what they miss.
- InterpretabilityLooking inside models to see what they compute.
- Alignment and safetyMaking capable models behave as intended.
- Multi-agent systemsCoordinating many agents on one large job.
- Evaluating agentsMeasure multi-step, tool-using behavior.
- Reading AI papersGet the idea out of a research paper in 30 minutes.
- Capstone: a tuned, evaluated assistantFine-tune, evaluate and deploy a specialist assistant.
Phase 7 · about 12 hours of study
How software is built, from bits to tested, well-designed programs. 16 lessons, 1 free to try. About this phase
16 lessons
- How computers run code FreeBits, memory, the processor, and what really happens when Python runs.
- Algorithm complexityCount the work code does, and see why some programs stop scaling.
- Concurrency and asyncDo many things at once: processes, threads and the event loop.
- Performance and profilingMeasure before you optimize, then fix the part that matters.
- Core data structuresArrays, linked lists, stacks, queues and the hash table behind every dict.
- Recursion, trees and graphsFunctions that call themselves, and the shapes most real data takes.
- Searching, sorting and dynamic programmingThe classic algorithms, and the ideas behind them.
- Testing your codeAutomated tests that prove code works and keep it working.
- Debugging systematicallyFind any bug with a method instead of guesswork.
- Readable code and refactoringWrite code people can understand, and improve it safely.
- Types and data modelingType hints, dataclasses and checking data at the edges of a program.
- Software designModules, interfaces and dependencies that keep big programs changeable.
- Databases and SQLStore, query and join data with the language every database speaks.
- Secure codingInjection, escaping, secrets and passwords: the mistakes attackers look for.
- Projects, packaging and CILay out a real project, pin its dependencies and test it on every push.
- Capstone: a command-line appDesign, build and test a complete program with a database.
Phase 8 · about 10 hours of study
Design, build, secure and scale web APIs from first principles. 13 lessons, 1 free to try. About this phase
13 lessons
- HTTP from the wire up FreeWhat really travels between client and server: bytes, headers and bodies.
- API stylesREST, RPC, GraphQL, gRPC and streaming: what each is for.
- Build an API server from scratchRouting, handlers and responses, with no framework.
- A web framework, from the insideDecorators, middleware and error handling: how Flask and FastAPI work.
- Designing a REST APIResources, methods, status codes, errors and pagination done well.
- Validating requests with schemasCheck every request against a JSON Schema and say exactly what's wrong.
- A database-backed APICRUD endpoints on SQLite, with safe concurrent updates.
- Authentication and authorizationAPI keys, sessions, tokens and OAuth: who's calling, and what may they do?
- Rate limits, retries and idempotencyKeep an API up under load and make retries safe.
- Webhooks and eventsPush events to other systems: signed, retried and deduplicated.
- Documenting APIs with OpenAPIA machine-readable contract for docs, SDKs and AI tools.
- Running APIs in productionVersioning, CORS, caching, request ids and health checks.
- Capstone: a complete APIAn authenticated, validated, paginated API with tests.
Phase 9 · about 11 hours of study
Build MCP servers, clients and hosts, from the wire format to production. 14 lessons, 1 free to try. About this phase
14 lessons
- JSON-RPC 2.0 in depth FreeRequests, notifications, errors and a dispatcher built from scratch.
- Versions and stateless requestsRevisions by date, the legacy handshake, per-request _meta and version negotiation.
- Discovery, capabilities and the two erasserver/discover, declared capabilities, and talking to legacy and modern software alike.
- Transports I: stdioNewline-delimited JSON over a subprocess's standard streams.
- Transports II: Streamable HTTPOne endpoint, required headers, JSON or event-stream replies.
- Build a server: toolsTool definitions, schemas from type hints, results and two kinds of error.
- Resources and promptsReadable data, URI templates and reusable prompt templates.
- Progress, subscriptions and multi-round-trip requestsLong-running work, change notifications and asking the user mid-call.
- Build a clientMetadata on every request, version fallback, paging and caching.
- Hosts: connecting servers to a modelMany servers, one agent: namespacing, routing and approvals.
- Securing remote servers with OAuthProtected resource metadata, PKCE, audiences and scope challenges.
- MCP securityTool poisoning, rug pulls, confused deputies and local-server risks.
- Testing, designing and shipping serversConformance checks, tool design for models, SDKs and deployment.
- Capstone: a production MCP serverA complete, tested server for the practice shop.
Phase 10 · about 10 hours of study
Build the software around a model that turns it into a capable, safe agent. 14 lessons, 1 free to try. About this phase
14 lessons
- What an agent harness is FreeThe software around a model that turns it into an agent.
- The core loop, built properlyStop reasons, parallel tool calls, errors and turn budgets.
- A tool registry for agentsSchemas from functions, validation, output limits and helpful errors.
- File and search toolsRead, write, edit by exact replacement, glob and grep inside one folder.
- Running code safelyExecution tools, step limits, output caps and real sandboxes.
- Permissions and approvalsRules, modes and approval prompts that keep a person in control.
- Hooks and skillsExtend a harness at lifecycle events, and load know-how on demand.
- Managing the context windowBudgets, clearing old tool results, compaction and a cacheable prefix.
- Memory, plans and long tasksTo-do lists, progress notes, memory files and checkpoints.
- SubagentsHand a focused task to a fresh context with fewer tools.
- Streaming, interrupts and sessionsLive output, stopping safely, and saving and resuming transcripts.
- Evaluation harnessesRun agents on tasks in fresh environments and grade what they leave behind.
- Tracing, budgets and guardrailsSee what an agent did, cap what it spends, and stop it when it loops.
- Capstone: build a coding agentA harness that edits a project, runs its tests and stops when they pass.
Phase 11 · about 10 hours of study
Design, ship and run real systems, work well in a team, and get hired. 13 lessons, 1 free to try. About this phase
13 lessons
- System design fundamentals FreeRequirements, rough numbers, the standard parts and where systems break.
- Caches, queues and background jobsSpeed reads with caches, and move slow work to queues that retry safely.
- Designing AI systemsLatency, cost, routing, fallbacks and guardrails for features built on models.
- Containers and deploymentPackage an app as an image, configure it with the environment, and roll out safely.
- CI/CD pipelinesTest every change automatically, and ship with gates, flags and rollbacks.
- Reliability and incidentsSLOs, error budgets, alerts, on-call and blameless postmortems.
- Git for teamsBranches, pull requests, rebasing and how a three-way merge finds conflicts.
- Code reviewWhat to look for, how to give and take feedback, and automating the routine checks.
- Reading unfamiliar codeFind your way around a big codebase fast, with tools that map it for you.
- Working with AI coding toolsGive agents good context, keep tasks small, and check every change they make.
- Writing for engineersREADMEs, design docs, commit messages and bug reports people can act on.
- Interviews and your portfolioShow your work, and solve interview problems the way professionals do.
- Capstone: ship a production AI serviceAn AI-backed service with validation, caching, rate limits, fallbacks, logging and evals.