01ChangeEdit one meaningful input, value, or piece of code.
02RunExecute the smallest experiment that can answer the question.
03CompareRead the output against the previous state or prediction.
04ExplainSay what changed, what stayed fixed, and why the evidence matters.
Browser · Pyodide
Trace a Pattern into a Prediction
Meet AI: Patterns, Predictions, and Decisions
Open in lesson →Browser · Pyodide
Edit Examples and Labels
Rules, Examples, and Data
Open in lesson →Browser · Pyodide
Compare a Rule with a Learned Threshold
Rules vs Learning
Open in lesson →Browser · Pyodide
Choose Features and Find the Label
Features and Labels
Open in lesson →Browser · Pyodide
Keep a Test Set Untouched
Training Data and Test Data
Open in lesson →Browser · Pyodide
Run Two Controlled Threshold Experiments
Your First AI Experiment
Open in lesson →Browser · Pyodide
Trace Inputs, Outputs, and Labels
Inputs, Outputs, and Predictions
Open in lesson →Browser · Pyodide
Inspect Prediction Errors
Errors: When a Model Gets It Wrong
Open in lesson →Browser · Pyodide
Change One Thing at a Time
Changing One Thing at a Time
Open in lesson →Browser · Pyodide
Compare a Predictor with a Baseline
Fair Comparisons and Baselines
Open in lesson →Browser · Pyodide
Turn Results into an Experiment Explanation
From Experiment to Explanation
Open in lesson →Browser · Pyodide
Debug and Improve a Tiny Predictor
Debug and Improve a Tiny Predictor
Open in lesson →Browser · Pyodide
Compare Prediction Rules by Loss
What Machine Learning Is Really Optimizing
Open in lesson →Browser · Pyodide
Inspect a Dataset as Features and Target
Datasets as Tables
Open in lesson →Browser · Pyodide
Create a Reproducible Train/Test Split
Splitting Data Without Cheating
Open in lesson →Browser · Pyodide
Fit a Linear Regression Model
Linear Regression
Open in lesson →Browser · Pyodide
Compare MAE and MSE
Loss Functions
Open in lesson →Browser · Pyodide
Trace Gradient Descent Steps
Gradient Descent
Open in lesson →Browser · Pyodide
Compare Learning Rates
Learning Rate
Open in lesson →Browser · Pyodide
Scale Features Without Leakage
Feature Scaling
Open in lesson →Browser · Pyodide
Fit Regression with Multiple Features
Multiple Features
Open in lesson →Browser · Pyodide
Build and Inspect a Simple Classifier
Classification
Open in lesson →Browser · Pyodide
Fit Logistic Regression and Inspect Probabilities
Logistic Regression
Open in lesson →Browser · Pyodide
Probe a Logistic Decision Boundary
Decision Boundaries
Open in lesson →Browser · Pyodide
Compute Precision, Recall, and F1
Metrics Beyond Accuracy
Open in lesson →Browser · Pyodide
Measure Variation with Cross-Validation
Cross-Validation
Open in lesson →Browser · Pyodide
Find and Remove Data Leakage
Data Leakage
Open in lesson →Browser · Pyodide
Compare Underfitting and Overfitting
Bias, Variance, and Overfitting
Open in lesson →Browser · Pyodide
Build a Reproducible ML Pipeline
Pipelines and Reproducible Experiments
Open in lesson →Browser · Pyodide
Review a Trustworthy Classifier
Model Review: Build a Trustworthy Classifier
Open in lesson →Browser · Pyodide
Compare a Linear Rule with a Tiny Network
Why Neural Networks
Open in lesson →Browser · Pyodide
Trace a Neuron's Weighted Sum
Neurons as Weighted Sums
Open in lesson →Browser · Pyodide
Compare Activation Functions
Activation Functions
Open in lesson →Browser · Pyodide
Track Layer and Batch Shapes
Layers and Shapes
Open in lesson →Browser · Pyodide
Run a Two-Layer Forward Pass
Forward Pass by Hand
Open in lesson →Browser · Pyodide
Compare Neural-Network Losses
Loss for Neural Networks
Open in lesson →Browser · Pyodide
Probe a Gradient Direction
Backpropagation Intuition
Open in lesson →Browser · Pyodide
Estimate a Derivative Numerically
Derivatives Just in Time
Open in lesson →Browser · Pyodide
Backpropagate One Scalar Parameter
Backpropagation in Code
Open in lesson →Browser · Pyodide
Compare Full and Mini-Batch Gradients
Batching and Mini-Batches
Open in lesson →Browser · Pyodide
Compare SGD and Adam
Optimizers: SGD to Adam
Open in lesson →Browser · Pyodide
Inspect Initialization Symmetry
Initialization
Open in lesson →Browser · Pyodide
Compare L2 Regularization
Regularization
Open in lesson →Browser · Pyodide
Diagnose Training Curves
Training Curves and Debugging
Open in lesson →Browser · Pyodide
Neural Network Debugging Workshop
Neural Network Debugging Workshop
Open in lesson →Browser · Pyodide
Inspect a Learned Representation
Representations: What Networks Learn
Open in lesson →Browser · Pyodide
Slide a Local Convolution Filter
Convolutions and Local Patterns
Open in lesson →Browser · Pyodide
Build a Tiny Image Classifier
Build a Tiny Image Classifier
Open in lesson →Browser · Pyodide
Compare Pooling and Downsampling
Pooling and Downsampling
Open in lesson →Browser · Pyodide
Test Safe and Unsafe Augmentations
Data Augmentation
Open in lesson →Browser · Pyodide
Preserve Order in Sequence Features
Sequence Data and Time
Open in lesson →Browser · Pyodide
Trace Recurrent Memory
Recurrent Models and Memory
Open in lesson →Browser · Pyodide
Measure Long-Context Influence
Why Long Context Is Hard
Open in lesson →Browser · Pyodide
Compare Embedding Geometry
Embeddings as Learned Coordinates
Open in lesson →Notebook · Google Colab
Transfer Learning on Handwritten Digits
Transfer Learning
Open in lesson →Notebook · Google Colab
Inspect a Pretrained Model Contract
Pretrained Models
Open in lesson →Notebook · Google Colab
Fine-Tune a Small Encoder
Fine-Tuning a Small Encoder
Open in lesson →Notebook · Google Colab
Failure Analysis Across Modalities
Failure Analysis Across Modalities
Open in lesson →Notebook · Google Colab
Adaptation Strategy Review
Adaptation Review: Choose, Fine-Tune, Explain
Open in lesson →Browser · Pyodide
Trace Text into Tokens and IDs
Text Is Not Numbers Yet
Open in lesson →Browser · Pyodide
Compare Character, Word, and Subword Pieces
Characters, Words, and Subwords
Open in lesson →Browser · Pyodide
Measure Vocabulary Coverage and Unknown Tokens
Vocabulary and Unknown Tokens
Open in lesson →Notebook · Google Colab
Run the Simple Tokenizer Notebook
Build a Simple Tokenizer
Open in lesson →Browser · Pyodide
Inspect UTF-8 Byte Tokens
Byte-Level Tokenization
Open in lesson →Browser · Pyodide
Learn One Subword Merge from Frequency
Subword Learning
Open in lesson →Browser · Pyodide
Reserve and Verify Special Token IDs
Token IDs and Special Tokens
Open in lesson →Browser · Pyodide
Pad, Truncate, and Build Masks
Padding, Truncation, and Masks
Open in lesson →Browser · Pyodide
Look Up Token Embedding Vectors
Embeddings for Tokens
Open in lesson →Browser · Pyodide
Attach Positions to Token IDs
Position Matters
Open in lesson →Browser · Pyodide
Generate Sinusoidal Position Vectors
Positional Encodings
Open in lesson →Browser · Pyodide
Compare Truncation and Sliding Context Windows
Context Windows
Open in lesson →Browser · Pyodide
Measure Tokenizer Failure Modes
Tokenizer Failure Modes
Open in lesson →Notebook · Google Colab
Run the Tokenizer Evaluation Workshop
Tokenizer Evaluation Workshop
Open in lesson →Browser · Pyodide
Explore Focused Attention
Why Attention
Open in lesson →Browser · Pyodide
Normalize an Attention Row
Words Looking at Words
Open in lesson →Browser · Pyodide
Separate Query, Key, and Value Roles
Queries, Keys, and Values
Open in lesson →Browser · Pyodide
Measure Dot-Product Similarity
Dot Products as Similarity
Open in lesson →Browser · Pyodide
Scale Dot Products Before Softmax
Scaled Dot-Product Attention
Open in lesson →Browser · Pyodide
Mix Weighted Values
Attention Weights and Weighted Values
Open in lesson →Notebook · Google Colab
Run the Causal Self-Attention Notebook
Self-Attention
Open in lesson →Browser · Pyodide
Prove Causal Masking
Causal Masking
Open in lesson →Notebook · Google Colab
Run the Multi-Head Attention Lab
Multi-Head Attention
Open in lesson →Browser · Pyodide
Test Residual Connections
Residual Connections
Open in lesson →Browser · Pyodide
Normalize Token Features
Layer Normalization
Open in lesson →Browser · Pyodide
Build a Position-Wise Feed-Forward Network
Feed-Forward Networks
Open in lesson →Notebook · Google Colab
Run the Putting the Pieces Together Lab
Putting the Pieces Together
Open in lesson →Notebook · Google Colab
Run the Transformer Block Lab
Transformer Block
Open in lesson →Notebook · Google Colab
Run the Stacking Transformer Blocks Lab
Stacking Transformer Blocks
Open in lesson →Notebook · Google Colab
Run the Build a Mini Transformer Lab
Build a Mini Transformer
Open in lesson →Browser · Pyodide
Inspect Causal Decoder Access
Decoder-Only Language Models
Open in lesson →Browser · Pyodide
Build Next-Token Targets
Next-Token Prediction
Open in lesson →Browser · Pyodide
Create Training Windows from Text
Training Examples from Text
Open in lesson →Browser · Pyodide
Validate Tiny LM Configuration Shapes
Model Configuration and Shapes
Open in lesson →Browser · Pyodide
Trace Tiny LM Assembly Shapes
Assemble the Model
Open in lesson →Notebook · Google Colab
Train and Sample the Tiny Language Model
Training Loop
Open in lesson →Browser · Pyodide
Record Reproducible Checkpoint Metadata
Checkpoints and Reproducibility
Open in lesson →Browser · Pyodide
Compare Training and Validation Loss
Validation Loss and Overfitting
Open in lesson →Browser · Pyodide
Sample from a Fixed Token Distribution
Sampling Text
Open in lesson →Browser · Pyodide
Compare Temperature, Top-k, and Top-p
Temperature, Top-k, and Top-p
Open in lesson →Browser · Pyodide
Measure Generation Failure Signals
Generation Failure Modes
Open in lesson →Browser · Pyodide
Evaluate a Tiny Language Model
Evaluate a Tiny Language Model
Open in lesson →Local · local-python
Package a Reproducible Tiny LLM Run
Package the Training Run
Open in lesson →Local · local-python
Run the Tiny LLM Integration Workshop
Tiny LLM Integration Workshop
Open in lesson →Browser · Pyodide
Separate Probabilities from Sampling
How Modern LLMs Behave
Open in lesson →Browser · Pyodide
Build a Prompt Contract
Prompting as Interface Design
Open in lesson →Browser · Pyodide
Keep Roles and Trust Separate
System, User, and Assistant Roles
Open in lesson →Browser · Pyodide
Test Few-Shot Boundary Examples
Few-Shot Examples
Open in lesson →Browser · Pyodide
Separate Extraction from Calculation
Reasoning Tasks Without Magic Words
Open in lesson →Browser · Pyodide
Validate Structured Output
Structured Outputs
Open in lesson →Browser · Pyodide
Move Evidence Through Context
Context Windows and Lost Information
Open in lesson →Browser · Pyodide
Retrieve a Smaller Evidence Set
Long-Context Strategies
Open in lesson →Browser · Pyodide
Control Decoding Randomness
Decoding and Determinism
Open in lesson →Browser · Pyodide
Abstain When Evidence Is Missing
Hallucinations and Uncertainty
Open in lesson →Browser · Pyodide
Preserve Trust Provenance
Prompt Injection Basics
Open in lesson →Browser · Pyodide
Evaluate Prompt Cases
Prompt Evaluation
Open in lesson →Local · local-python
Review a Reliable LLM Workflow
Reliable LLM Workflow Review
Open in lesson →Browser · Pyodide
Choose an Adaptation Lever
When to Fine-Tune
Open in lesson →Browser · Pyodide
Audit Instruction-Tuning Data
Data for Instruction Tuning
Open in lesson →Browser · Pyodide
Split Related Training Records Safely
Cleaning and Formatting Training Data
Open in lesson →Browser · Pyodide
Compute Response-Only SFT Loss
Supervised Fine-Tuning
Open in lesson →Browser · Pyodide
Count PEFT Trainable Parameters
Parameter-Efficient Fine-Tuning
Open in lesson →Browser · Pyodide
Trace LoRA Shapes and Counts
LoRA Intuition
Open in lesson →Browser · Pyodide
Build a Tiny LoRA Adapter
Build a LoRA Adapter
Open in lesson →Browser · Pyodide
Measure Quantization Error
Quantization for Fine-Tuning
Open in lesson →Browser · Pyodide
Audit Preference Pairs
Preference Data
Open in lesson →Browser · Pyodide
Compute Preference Margins
Preference Optimization Concepts
Open in lesson →Browser · Pyodide
Compare Base and Adapted Evaluations
Evaluate Before and After Fine-Tuning
Open in lesson →Browser · Pyodide
Detect Retention Regressions
Catastrophic Forgetting and Drift
Open in lesson →Local · local-python
Validate a Model Card and Training Record
Model Cards and Training Records
Open in lesson →Local · local-python
Run the Fine-Tuning Integration Workshop
Fine-Tuning Integration Workshop
Open in lesson →Browser · Pyodide
Separate Retrieval and Generation Failures
Why Retrieval-Augmented Generation
Open in lesson →Browser · Pyodide
Build Chunks with Metadata
Documents, Chunks, and Metadata
Open in lesson →Browser · Pyodide
Compare Retrieval Embeddings
Embeddings for Retrieval
Open in lesson →Browser · Pyodide
Compute Vector Similarity
Vector Similarity
Open in lesson →Browser · Pyodide
Build a Tiny Vector Index
Build a Vector Index
Open in lesson →Browser · Pyodide
Combine Keyword and Vector Search
Keyword and Hybrid Search
Open in lesson →Browser · Pyodide
Rerank a Candidate Set
Reranking
Open in lesson →Browser · Pyodide
Rewrite Queries Without Losing Intent
Query Rewriting
Open in lesson →Local · local-python
Build a Grounded Prompt Package
Grounded Prompt Construction
Open in lesson →Local · local-python
Validate Citations and Source Support
Citations and Source Attribution
Open in lesson →Local · local-python
Evaluate Retrieval and Grounded Answers
RAG Evaluation
Open in lesson →Local · local-python
Trace Retrieval Failure Boundaries
Failure Modes in Retrieval
Open in lesson →Local · local-python
Validate Freshness and Access Eligibility
Freshness, Access Control, and Updates
Open in lesson →Local · local-python
Integrate an Evidence-Backed RAG System
RAG System Integration Workshop
Open in lesson →Local · local-python
LLMs That Use Tools
LLMs That Use Tools
Open in lesson →Local · local-python
Function Calling and Tool Schemas
Function Calling and Tool Schemas
Open in lesson →Local · local-python
Validate Structured Tool Arguments
Validate Structured Tool Arguments
Open in lesson →Local · local-python
Tool Results Back into Context
Tool Results Back into Context
Open in lesson →Local · local-python
Error Handling and Retries
Error Handling and Retries
Open in lesson →Local · local-python
State Machines for Tool Workflows
State Machines for Tool Workflows
Open in lesson →Local · local-python
Web and API Tool Patterns
Web and API Tool Patterns
Open in lesson →Local · local-python
Code Execution as a Tool
Code Execution as a Tool
Open in lesson →Local · local-python
Vision-Language Inputs
Vision-Language Inputs
Open in lesson →Local · local-python
Audio and Speech Inputs
Audio and Speech Inputs
Open in lesson →Local · local-python
Multimodal Evaluation
Multimodal Evaluation
Open in lesson →Local · local-python
Tool Security Boundaries
Tool Security Boundaries
Open in lesson →Local · local-python
Tool-Using Assistant Integration Workshop
Tool-Using Assistant Integration Workshop
Open in lesson →Local · local-python
Agent Harnesses and Runtime Structure
Agent Harnesses and Runtime Structure
Open in lesson →Local · local-python
Task Queues and Durable State
Task Queues and Durable State
Open in lesson →Local · local-python
Retries, Idempotency, and Recovery
Retries, Idempotency, and Recovery
Open in lesson →Local · local-python
Tracing Agent Decisions
Tracing Agent Decisions
Open in lesson →Local · local-python
Sandboxing and Permissions
Sandboxing and Permissions
Open in lesson →Local · local-python
Memory Retrieval and Compression
Memory Retrieval and Compression
Open in lesson →Local · local-python
Parallel Tool Calls
Parallel Tool Calls
Open in lesson →Local · local-python
Delegation and Subagents
Delegation and Subagents
Open in lesson →Local · docker
Agent Test Fixtures
Agent Test Fixtures
Open in lesson →Local · docker
Simulation-Based Evaluation
Simulation-Based Evaluation
Open in lesson →Local · docker
Cost, Latency, and Reliability
Cost, Latency, and Reliability
Open in lesson →Local · docker
Operating an Agent in Production
Operating an Agent in Production
Open in lesson →Local · docker
Agent Harness Integration Workshop
Agent Harness Integration Workshop
Open in lesson →Local · local-python
Why Interoperability Matters
Why Interoperability Matters
Open in lesson →Local · local-python
Tool and Resource Protocols
Tool and Resource Protocols
Open in lesson →Local · local-python
MCP Concepts: Servers, Clients, and Capabilities
MCP Concepts: Servers, Clients, and Capabilities
Open in lesson →Local · local-python
MCP Server Boundary Preflight
MCP Server Design
Open in lesson →Local · local-python
Connect an MCP Client
Connect an MCP Client
Open in lesson →Local · local-python
Security and Trust in MCP
Security and Trust in MCP
Open in lesson →Local · local-python
Agent-to-Agent Communication Concepts
Agent-to-Agent Communication Concepts
Open in lesson →Local · local-python
A2A Messages, Tasks, and Artifacts
A2A Messages, Tasks, and Artifacts
Open in lesson →Local · docker
Multi-Agent Coordination Patterns
Multi-Agent Coordination Patterns
Open in lesson →Local · docker
Shared State and Conflict Resolution
Shared State and Conflict Resolution
Open in lesson →Local · docker
Multi-Agent Evaluation
Multi-Agent Evaluation
Open in lesson →Local · docker
Interoperable Agent System Workshop
Interoperable Agent System Workshop
Open in lesson →Local · local-python
From Notebook to Service
From Notebook to Service
Open in lesson →Local · local-python
Inference APIs
Inference APIs
Open in lesson →Local · local-python
Batching and Streaming
Batching and Streaming
Open in lesson →Local · local-python
Model Loading and Memory
Model Loading and Memory
Open in lesson →Local · local-python
Quantization for Serving
Quantization for Serving
Open in lesson →Local · local-python
KV Cache and Generation Throughput
KV Cache and Generation Throughput
Open in lesson →Local · docker
Latency, Throughput, and Cost
Latency, Throughput, and Cost
Open in lesson →Local · docker
GPU Scheduling Basics
GPU Scheduling Basics
Open in lesson →Local · docker
Containers and Reproducible Deployments
Containers and Reproducible Deployments
Open in lesson →Local · docker
Observability for AI Systems
Observability for AI Systems
Open in lesson →Local · docker
Rollouts, Canaries, and Rollbacks
Rollouts, Canaries, and Rollbacks
Open in lesson →Local · docker
Capacity Planning and Failure Recovery
Capacity Planning and Failure Recovery
Open in lesson →Local · docker
Production AI Operations Workshop
Production AI Operations Workshop
Open in lesson →Local · local-python
Evaluation as a System
Evaluation as a System
Open in lesson →Local · local-python
Golden Sets and Regression Suites
Golden Sets and Regression Suites
Open in lesson →Local · local-python
Human Evaluation
Human Evaluation
Open in lesson →Local · local-python
Model and System Safety Basics
Model and System Safety Basics
Open in lesson →Local · local-python
Threat Modeling for AI Systems
Threat Modeling for AI Systems
Open in lesson →Local · local-python
Prompt Injection and Data Exfiltration
Prompt Injection and Data Exfiltration
Open in lesson →Local · local-python
Tool and Agent Security
Tool and Agent Security
Open in lesson →Local · local-python
Privacy, Data Governance, and Retention
Privacy, Data Governance, and Retention
Open in lesson →Local · docker
Red Teaming and Abuse Testing
Red Teaming and Abuse Testing
Open in lesson →Local · docker
Frontier Model Capabilities and Limits
Frontier Model Capabilities and Limits
Open in lesson →Local · docker
Emerging Agent Protocols and Ecosystems
Emerging Agent Protocols and Ecosystems
Open in lesson →Local · docker
Research Reading and Reproduction
Research Reading and Reproduction
Open in lesson →Local · docker
Capstone Integration: Ship, Evaluate, and Defend
Capstone Integration: Ship, Evaluate, and Defend
Open in lesson →