Interactive Labs
145 interactive visualizations across every ML domain. No lesson required — just open and explore.
Showing 145 labs
Imagine sorting mail — can you write rules for every letter, or let the machine learn the pattern?
A hospital, a factory, and a game designer all use AI differently — explore the three types of machine learning
You're a factory robot repeating the same task on an assembly line — watch how loops automate repetitive work
You have a playlist of 50 songs — grab just tracks 10 through 20 with a single slice expression
You're organizing a library of 10,000 books — which sorting method is fastest?
Searching 1,000 users is fast — but what happens when you hit 1 million? See how algorithms scale
Fly over the terrain your optimizer must navigate — peaks are bad, valleys are good
A photo is just a grid of numbers — reshape, stack, and transform data like a pro
Your boss wants a report by Friday — pick the right chart to tell the story your data is hiding
Follow a patient's medical data from raw spreadsheet to trained model that predicts heart disease risk
Predict house prices based on square footage — drag points and watch the best-fit line adjust
You're blindfolded on a hilly field trying to find the lowest valley — feel the slope and take steps downhill
You're a bank deciding who gets a loan — draw the line that separates approved from denied
You're a marketing team grouping customers by shopping behavior — watch the algorithm find natural groups
Find the widest road you can build between two neighborhoods — that's what SVM does
Walk down a decision tree step by step — see how every question narrows down to the final answer
Squish high-dimensional data into 2D while keeping similar points close — explore how t-SNE reveals clusters
Draw your own data points and watch the model find the best decision boundary in real time
A neuron deciding whether to fire — explore how different activation functions shape the decision
Build a brain layer by layer — add neurons, connect them, and watch data flow through
When the network makes a mistake, blame flows backwards — watch error propagate through each layer
You're training a model live — watch the loss drop, accuracy rise, and spot when overfitting starts
See what a neural network is actually looking for — a map of every feature detector inside a CNN
Peer through the eyes of a convolutional filter — see exactly which patterns it's trained to detect
Trace the mathematical operations as data flows forward — then watch gradients flow back
A free-form neural network playground — wire up any architecture and watch it learn
Two AIs compete: one creates fake art, the other detects fakes — watch them get better together
Start with pure noise and gradually reveal an image — this is how Stable Diffusion works
Step through each noise level of the diffusion process — from crystal-clear image to pure static and back
How does AI read? First it breaks text into tokens — type a sentence and see it split into pieces
Words live in a space where similar meanings are close together — explore king - man + woman = queen
Watch data flow through a transformer step by step — the architecture behind ChatGPT
See which words a transformer pays attention to — a vivid heatmap of what the model focuses on
Train an agent to navigate a maze — it learns from rewards and penalties
Peek inside the agent's brain — a table showing how valuable each action is in each state
A customer asks about your product — watch the AI search docs, find answers, and cite sources
An AI agent observes, thinks, acts, and observes again — watch the reasoning loop in real time
Watch an LLM call external tools — search the web, run code, check weather — and weave results into its response
Drag a query star across an embedding map and watch nearest neighbors update instantly
See how Fixed-Size, Sentence, Paragraph, and Semantic chunking split documents for RAG
You type google.com — trace the journey from your browser through DNS servers to the actual website
10 million users hit your app — watch how traffic is distributed across servers
An API getting hammered — build a rate limiter that protects it without blocking real users
Write SQL queries and see results instantly — SQLite running in your browser with sample data
Write Python code, then step through it line by line watching variables change in real time
Every neural network is just vectors being multiplied by matrices — build the intuition by dragging arrows on a coordinate plane.
Adjust μ, σ, n, p, and λ and watch the bell curve, bar chart, and shaded probability regions update live.
Before training any model, data scientists spend 80% of their time here — exploring distributions, correlations, and outliers.
Drag a point through the latent space and watch the decoder produce different outputs — this is how generative models work.
Token by token, probability by probability — this is exactly how ChatGPT generates text.
Without this, 'dog bites man' and 'man bites dog' look identical to a transformer — see how position information is injected.
Step through every matrix operation in self-attention: Q·K^T, scale, softmax, weighted sum of V.
5 slot machines, hidden rewards, limited pulls — find the best arm without wasting too many pulls on bad ones.
REST, batch, or streaming — the same model deployed three ways has completely different tradeoffs.
Your model was 95% accurate at launch. Three months later: 80%. This is how you catch and fix that.
Type a key, watch the hash compute, see the bucket fill. Feel collisions and load factor in real time.
Visualize the call tree of naive Fibonacci. Duplicate subproblems glow red — toggle memoization and watch exponential collapse to linear.
Watch a Longest Common Subsequence DP table fill cell by cell with dependency arrows, then a green traceback reveals the hidden subsequence.
Click through a Python class inheritance tree and watch the MRO (C3 linearization) animate as methods resolve up the chain.
Step through a Python generator one yield at a time, see the frozen frame, and compare memory against its eager-list twin.
Watch a value flow through stacked Python decorators — peel in on the way down, wrap out on the way back — and see why decorator order matters.
Watch Python list operations animate — append, insert, delete, access — and see how Big-O emerges from your own clicks.
Watch INNER, LEFT, RIGHT, FULL, and CROSS JOINs animate row-by-row. See exactly which rows survive each join — and why LEFT JOIN keeps unmatched rows with NULLs.
See how adding indexes collapses a query plan. Toggle indexes and watch Sequential Scans turn into Index Scans — cost drops from 10,000 to 12.
Animate ROW_NUMBER, RANK, LAG, LEAD, and SUM-OVER row-by-row. Toggle PARTITION BY to watch the function restart at each group boundary.
Transform a denormalized Orders table into clean relational schema step-by-step. Each step animates the change and explains which redundancy it removes.
See how Common Table Expressions break a complex query into named steps. Toggle between CTEs and nested subqueries to feel the readability difference.
Watch the Thought → Action → Observation loop unfold — the same LLM chains tool calls to solve multi-hop questions it couldn't answer in one shot.
Watch a team of specialized agents (Planner, Researcher, Writer, Coder, Critic) coordinate on a task. See how a critic gate rejects weak subtasks and sends them back for revision.
Three memory types in one view — short-term conversation buffer, long-term vector store with top-k retrieval, and task-scoped scratchpad. See how each solves a different problem.
Eight attention heads side-by-side — each specializing in a different linguistic pattern. Hover to enlarge and watch the concatenated output emerge.
Type any sentence and watch it fragment into BPE tokens. Compare English-only, Multilingual, and Character-level vocabularies.
Watch data flow through a single transformer encoder block — multi-head attention, residuals, LayerNorm, and FFN. Toggle residuals off and see gradient flow collapse.
Drag a single slider and reshape the next-token probability distribution in real time — focused, balanced, creative, chaotic.
Watch beam search branch, score, and prune multiple candidate completions in parallel. Compare greedy vs k=3 vs k=5.
Toggle bidirectional (BERT) vs causal (GPT) attention and step through autoregressive generation position-by-position.
Two agents solve the same 5×5 grid side-by-side — one with explicit arrows (policy), one with a value landscape. Inject a bad arrow and watch the value agent still succeed.
Drag ε and flip advantage sign to see PPO's three curves: unclipped, clipped step function, and PPO = min(unclipped, clipped).
Run a 5-state random walk with three estimators — MC, TD(0), and TD(λ). Drag λ from 0 (TD) to 1 (MC) to see the bias-variance dial.
Actor + Critic neural networks learning together. Step through TD error flowing back into both networks on a 3-arm contextual bandit.
Two Q-learning agents on the same 8×8 grid. Sparse reward (+1 only at goal) vs dense reward (distance-based). Dense wins — but beware reward hacking.
Drag sentences, type queries, and watch nearest-neighbor retrieval light up live. See the geometry behind RAG in 2D.
Watch a cross-encoder reranker pull a buried answer from rank 7 to rank 1 after vector search.
See how BM25, vector search, and reciprocal rank fusion rank the same documents — different queries favor different methods.
Drag K and watch Precision@K, Recall@K, and MRR update live on three pre-labeled retrievers.
See how short user queries get rewritten by HyDE and multi-query expansion — and how retrieval quality changes.
Warp a 2D plane with any 2×2 matrix and watch the eigenvectors stay fixed in direction — the axes the transformation preserves.
Drag a point along f(x) to watch its tangent line rotate and trace out f'(x) live. Zoom in until the curve BECOMES its tangent.
Trace df/dx backward through f(g(h(x))) — the mechanical pattern that is literally how backprop works.
Drag a slider and watch a straight line morph into a perfect replica of sin, cos, eˣ, ln(1+x), or 1/(1−x).
Click anywhere on a scalar field and watch a particle slide downhill along the negative gradient — always perpendicular to the contours.
Watch k-fold cross-validation cycle through folds as the test set, with per-fold accuracy bars and mean ± std vs a single train/test split.
Side-by-side training pipelines expose preprocessing contamination. Watch a 99% test score collapse to 51% when the leaky model meets fresh data.
Toggle StandardScaler and MinMaxScaler on a k-NN classifier. Watch the decision boundary swing from horizontal (income dominates) to diagonal (features on equal footing).
Watch SMOTE manufacture synthetic minority samples one at a time — anchor, k-NN lines, interpolate, drop. See the logistic boundary shift as balance is restored.
Drag through a 2D latent space with four semantic anchors. Compare lerp vs slerp and see how latent arithmetic edits attributes.
Compare linear, cosine, and sigmoid diffusion schedules side-by-side. See β(t), ᾱ(t), and visual signal destruction at any timestep.
Drag the CFG scale from 1 to 15 and watch prompt adherence, sample diversity, and over-saturation change. Find the sweet spot.
Watch 50 particles flow from a Gaussian noise cloud to a two-moons target by integrating a learned velocity field.
Step through reverse diffusion one denoising step at a time. Watch structure emerge from pure noise, see the predicted noise the model outputs.
Live production dashboard for an ML model — latency, throughput, accuracy, and distribution shift. Inject drift and watch multi-signal alerting catch problems.
Split traffic between model v1 and v2, watch conversion, latency, and revenue accumulate. Wait for p<0.05 before promoting a winner.
Mirror production traffic to a new model without ever showing its outputs to users. Compare v1 vs v2 in real time and promote only when safe.
See how a centralized feature store eliminates training/serving skew. Toggle between two-pipeline and feature-store architectures.
Dissect the LLM function-calling pipeline — structured JSON, schema validation, dispatch, and result round-trip. See happy path, malformed JSON retry, unknown-tool refusal.
Watch an agent decompose a complex goal into a tree of verifiable leaves, then re-plan gracefully when a constraint fails.
Send adversarial and benign inputs through a 5-stage guardrails pipeline — prompt injection, PII, toxicity, hallucinations. Toggle to reveal what leaks without defenses.
Race three HTTP requests sync vs async. Watch the event loop schedule, yield, and resume — three 1-second requests finish in 1 second, on a single thread.
Step through a `with` statement for file I/O, DB transactions, and locks. Watch __enter__ acquire, the body run, and __exit__ clean up — even when the body raises.
Step through nested try/except as an error bubbles up. Watch the call stack unwind, the new exception chain via __cause__, and Python's 'During handling...' traceback form.
Watch two concurrent transactions collide. Pick Read Uncommitted → Serializable and see exactly what T1 reads, which anomalies fire.
Watch two transactions lock rows in opposite orders and form a wait-for cycle — the database's definition of a deadlock. Flip to consistent ordering and the cycle disappears.
Drag a threshold across 30 scored predictions and watch the ROC curve paint itself. Switch to Precision-Recall for imbalanced data.
Slide the λ knob and watch feature coefficients shrink — smoothly under Ridge, to exact zero under Lasso, mixed under ElasticNet.
Toggle type annotations and watch a mypy-like checker catch bugs before runtime — the kind you'd otherwise hit in production.
Compare hand-written class vs @dataclass. Toggle frozen/slots/default_factory to see generated boilerplate update live.
Compare ABC vs Protocol typing side-by-side. See why Protocol = duck typing + static verification.
Visualize chain, cycle, islice, takewhile, combinations, groupby — one lazy pull at a time.
Traverse a mock filesystem with pathlib — glob, parent, path joining, read_text, exists.
Parametrize tests, inject bugs, add fixtures, watch coverage light up.
Compare %-old / .format / f-strings side-by-side. Drive format specs to see padding, precision, thousands separators live.
Set root level, swap handlers, toggle JSON formatter, walk through pdb.set_trace() with live locals.
Same complex query on 3 tabs — regular view, materialized view, no view. See freshness-vs-speed tradeoff in live timings.
BEFORE INSERT computes tax. AFTER UPDATE writes audit log. Toggle triggers off and see how 'app-level code' forgets.
1M-row orders table split by Range (date) or Hash (customer_id). See why partitioning only helps when filter matches partition key.
Nested JSONB document with 5 ops: ->>, ->, @>, jsonb_set, jsonb_path_query. See the traversed path highlighted.
Full 8-step JSON-RPC flow: initialize → capabilities → tools/list → tools/call. One client, 3 servers (GitHub, Filesystem, Postgres).
Side-by-side non-streaming vs streaming. Watch TTFT drop from 5000ms to 200ms — streaming FEELS 10× faster.
3 composite tasks (CSV→chart, research-summarize, support triage). See small composable tools beat one monolithic tool.
4 agents × 4 benchmarks (HumanEval, GAIA, SWE-bench, MMLU). See no single winner — cost-per-score and failure examples per benchmark.
Click any point on a 2D function. Gradient, Jacobian, Hessian computed live — eigenvalues classify the curvature as bowl/peak/saddle.
Click surfaces to drop particles. Convex = gradient descent always wins. Non-convex = 10 random inits show how initialization decides your fate.
Tic-tac-toe MCTS with the full 4-phase loop: Selection (UCB1) → Expansion → Simulation (rollout) → Backpropagation.
Drag γ from 0 to 0.999 on a 1D chain with a cliff. Watch the optimal policy flip from myopic (γ≈0) to far-sighted (γ≈0.99).
Training vs validation scores over sample size. Three scenarios (underfit/good/overfit) each leave a different fingerprint.
Same dataset, 4 panels: single tree vs bagging vs AdaBoost vs stacking. Animate boosting rounds upweighting misclassified points.
5-layer network with activation distributions evolving across 60 epochs. BN off: wild drift. BN on: stable + trains at 10× learning rate.
Plain vs ResNet vs DenseNet vs Highway. Depth slider 4-40 layers. Animated gradient wavefront — gradients die in Plain, survive in the others.
Target = 8 Gaussians in a ring. Watch generator samples cluster at 1-2 modes (collapse). Stack 4 fixes to see coverage climb toward 8/8.
Drag a latent vector → snaps to nearest of 8 codebook entries (Voronoi cells shown). VAE blurs, VQ-VAE stays sharp.
[batch=4, seq=6, dim=8] tensor. BN highlights columns; LN highlights rows. Toggle variable seq lengths — BN stats rot, LN stays identical.
Step through autoregressive generation. Without cache: quadratic recompute. With cache: one row appended per step.
5 model versions with promote, rollback, compare, and lineage actions. See why a registry is just 'git for models'.
New? Start here
Start with Lab 1: Rules vs Learning