Hover any neuron, edge, or layer label for an explanation
Architecture
Shape of the network - layers and neurons per layer.
Input neurons β3
Hidden layers β2
Neurons / hidden layer β4
Output neurons β2
Total weights: 36
Each weight is one number the network learns. GPT-4 has ~1.8 trillion.
Input values
Set what data goes into the network (xβ β¦ xβ). Slide to change.
x10.80
x20.40
x30.90
Behaviour
How each neuron decides how strongly to fire.
Activation function β
ReLU: passes positive signals, blocks negatives. Fast and effective.
Legend
Neuron (idle)
Neuron (active)
Positive weight
Negative weight
Hover any neuron, edge, or label for a full explanation.
Interactive 3D ML Playground - Visual Machine Learning for Every Level
The EngineersOfAI Playground contains interactive 3D visualizations for every major concept in the curriculum - from linear algebra through transformer attention, RAG pipelines, and agentic AI. Hover every element for a plain-English explanation. No code required.
Fundamentals
Neural Network Forward Pass - Build a network, adjust weights, and watch activations propagate layer by layer in real-time 3D. Hover every node and edge for a plain-English explanation.
Math for AI
Gradient Descent on a Loss Surface - A 3D loss landscape with a ball rolling downhill. Change learning rate and starting point - watch it converge, diverge, or get stuck in local minima.
Matrix Transformations in 3D - Enter any 3Γ3 matrix and watch how it stretches, rotates, and shears a set of 3D vectors. Understand the geometric meaning behind matrix multiplication.
Eigenvalues & Eigenvectors - Visualise which directions survive a matrix transformation unchanged. See PCA, covariance matrices, and stability analysis come to life.
Vectors in 3D - Explore two 3D vectors with xyz sliders. Visualize sum, cross product, angle arc, and span plane. See dot product and orthogonality live.
SVD Explorer - Watch Singular Value Decomposition transform a unit circle into an ellipse. Adjust singular values and see how U, Ξ£, Vα΅ compose.
PCA Explorer - Generate correlated 2D Gaussian data, see the covariance ellipse, and watch principal component axes emerge. Adjust correlation and spread.
Dot Products & Projections - Two vectors with an animated projection. See uΒ·v = |u||v|cos(ΞΈ) live. Drag angles and lengths, spot orthogonality.
Norms Explorer - See unit balls for L1 (diamond), L2 (sphere), Lβ (cube), and Lp (p slider). Understand how the choice of norm shapes regularization.
Tensor Viewer - Visualize rank 1, 2, and 3 tensors as colored grids. Reshape, transpose, and slice tensors interactively. See shapes like (4,) and (2,3,4).
Derivatives & Gradients - Drag a point along a function curve and see the tangent line (derivative) update live. Compare analytical vs numerical derivative with h slider.
Convex Functions - Roll a ball down convex vs non-convex loss surfaces. See local vs global minima. Understand why convexity guarantees finding the optimum.
Lagrange Multipliers - Minimize a quadratic objective subject to a circular constraint. Watch βf = Ξ»βg animate at the optimum. Adjust objective and constraint live.
Taylor Series - See Taylor approximations of order 1β8 for sin, exp, ln, and more. Watch the approximation improve around an expansion point. Compare to true function.
Automatic Differentiation - Step through forward and backward passes on a computation graph. See how chain rule propagates gradients from output to inputs.
Optimizer Race - Watch SGD, Momentum, RMSProp, and Adam race across a loss surface contour plot. See why adaptive methods converge faster.
Probability Distributions - Explore Normal, Binomial, Poisson, Exponential, Beta, and Gamma distributions. Adjust parameters and see PDF + CDF update live.
Moments Explorer - Drag bars to sculpt a probability distribution. Watch mean, variance, skewness, and kurtosis update live as you reshape the distribution.
Bayes' Theorem Explorer - Medical testing scenario. Adjust base rate, sensitivity, and specificity to see how Bayes' theorem computes P(Disease|Positive test).
Joint Distributions - Interactive bivariate normal heatmap. Adjust correlation Ο and marginals. See conditional distribution as a vertical slice through the joint.
Concentration Inequalities - Compare Markov, Chebyshev, and Hoeffding bounds vs the true tail probability. See how tight each bound is at different deviation values.
Sampling Methods - Watch rejection sampling, importance sampling, and Metropolis-Hastings draw from a target distribution. See acceptance rates and trace plots.
MLE & MAP Explorer - Observe data points and watch the MLE estimate maximize likelihood. Add a prior and see MAP estimation pull the estimate toward the prior.
Hypothesis Testing - Set Ξ±, drag the test statistic, and see p-value, rejection region, Type I and Type II errors shade in real time. One and two-tailed tests.
Confidence Intervals - Watch 50 confidence intervals animate one by one. See what fraction capture the true mean. Adjust n and confidence level to see coverage.
Bootstrap Sampling - Animate resampling with replacement from original data. Watch the bootstrap distribution of any statistic build up. Compute bootstrap CIs.
Regression Explorer - Fit OLS, Ridge, and Lasso to draggable data points. Adjust regularization Ξ» and see coefficient shrinkage. Compare residuals and RΒ².
ANOVA Explorer - Three groups of draggable data points. See between-group and within-group variance decompose into F-statistic and p-value live.
Causal DAG Explorer - Explore directed acyclic graphs with confounders, mediators, and colliders. Check d-separation and see how conditioning opens/closes paths.
Power Analysis - Two overlapping distributions: Hβ and Hβ. Adjust effect size, n, and Ξ±. See Type I error, Type II error, and statistical power shade live.
Entropy Explorer - Drag probability bars to sculpt a distribution. See Shannon entropy H(X) update live. Compare to maximum entropy (uniform distribution).
KL Divergence - Two normal distributions P and Q. See KL(PβQ) β KL(QβP) - the asymmetry of KL divergence. Essential for understanding VAEs and RL.
Cross-Entropy Loss - Drag predicted probability and watch cross-entropy loss update. Compare CE to MSE and see why CE gradients are better for classification.
Mutual Information - Bivariate scatter with adjustable correlation Ο. Watch I(X;Y) computed live and shown in an entropy Venn diagram.
Huffman Coding - Step through Huffman tree construction from symbol probabilities. See optimal codewords, average code length vs entropy, compression efficiency.
Prior to Posterior - Beta-Binomial model: flip coins one by one and watch the posterior update live. Adjust prior beliefs (Ξ±, Ξ²) and see Bayesian learning.
MCMC Explorer - Watch Metropolis-Hastings sample from a 2D target distribution. Step through accept/reject decisions. See the chain converge to the target.
Variational Inference - Watch a Gaussian variational approximation q(z) optimize toward a complex target p(z|x). See ELBO increase as KL decreases.
Gaussian Process - Click to add observations and watch the GP posterior update with mean Β± 2Ο band. Adjust length scale and noise. See uncertainty quantification live.
Hierarchical Models - Plate notation with animated parameter sampling. See shrinkage: individual estimates pulled toward group mean. Understand partial pooling.
PAC Learning - See how sample complexity n scales with accuracy Ξ΅, confidence Ξ΄, and hypothesis class size |H|. Understand what makes learning feasible.
VC Dimension - Place points on a 2D plane and check if halfplanes can shatter them. See why VC dimension = 3 for linear classifiers.
Regularization Path - Watch Ridge and Lasso coefficient paths as Ξ» increases. See Lasso drive coefficients to exactly zero (sparsity) while Ridge shrinks smoothly.
Online Learning - Stream data points one by one. Compare online SGD vs batch GD. Watch models adapt to distribution shifts. See cumulative regret.
Floating Point Arithmetic - See Float32 bits light up for any value. Watch precision loss, overflow, and special values (NaN, Inf) occur. Compare float16/32/64.
Condition Number - Two nearly-parallel lines represent Ax=b. Watch how small perturbations in b cause large changes in x when condition number is high.
Conjugate Gradient - Race CG against steepest descent on a quadratic bowl. CG reaches minimum in 2 steps; GD zigzags. See why CG is preferred for large systems.
Root-Finding Algorithms - Watch Newton-Raphson and bisection find roots of f(x). See Newton's quadratic convergence vs bisection's reliable linear convergence.
Numerical Integration - Compare trapezoid rule, Simpson's rule, and Gaussian quadrature. See error vs n convergence rates. Understand why Gaussian quadrature wins.
Sparse Matrix Methods - Visualize CSR/CSC storage formats for sparse matrices. Animate matrix-vector multiply. Compare memory and compute vs dense format.
Graph Explorer - Click to add nodes and edges. Toggle directed mode. See adjacency matrix, degree sequence, and connected components update live.
Graph Algorithms - Step through BFS, DFS, Dijkstra's shortest path, and PageRank on a graph. Node colors show state: unvisited, frontier, visited, complete.
Spectral Graph Theory - See the graph Laplacian and Fiedler vector. Nodes colored by eigenvector values reveal natural clusters. Perform spectral graph partitioning.
GNN Message Passing - Watch node features aggregate through 3 rounds of message passing in a graph neural network. See how information spreads through the graph.
Stationarity - Compare stationary AR(1) vs random walk vs trend series. Rolling mean and variance reveal non-stationarity. Understand why it matters for modeling.
ACF & PACF - Simulate AR, MA, and ARMA processes and see their ACF and PACF patterns. Use the signature patterns to identify model order.
Fourier Transform - Build composite signals from sine waves. See the frequency spectrum (FFT) update as you add components. Reconstruct from spectrum.
ARIMA Explorer - Simulate ARIMA(p,d,q) time series and generate h-step forecasts with confidence bands. Adjust p, d, q sliders to see model behavior.
Kalman Filter - Watch the Kalman filter track a 1D signal: true state, noisy observations, and posterior estimate. See predict and correct steps animate.
Cointegration - Two non-stationary random walk series that share a stationary spread. Shock them and watch the spread mean-revert. Understand error correction.
Wavelet Transform - Decompose a signal into approximation and detail coefficients at multiple scales. Apply thresholding to denoise. Compare DWT levels.
ML
Confusion Matrix & ROC Curves - Build a confusion matrix with TP/FP/FN/TN sliders. See precision, recall, F1, and AUC update live. Sweep threshold to trace the full ROC curve.
Cross-Validation - Animate k-fold cross-validation: watch each fold rotate between train and test. See variance across folds and understand why CV beats a single train/test split.
Logistic Regression - Click to add data points of two classes and watch logistic regression learn the decision boundary in real time. See the sigmoid function and probability contours.
SVM & Kernel Trick - See how SVM finds the maximum-margin decision boundary. Switch kernels (linear, RBF, polynomial) to handle non-separable data. Visualize support vectors.
Decision Tree - Watch a decision tree split data step by step using Gini impurity or information gain. Drag the max-depth slider to see pruning reduce overfitting.
Random Forest - See how bootstrap sampling creates diverse trees, and how majority voting makes the ensemble more accurate than any single tree. Visualize feature importance.
Gradient Boosting - Watch gradient boosting build trees sequentially on residuals. Each tree corrects the previous ones. See how learning rate and depth control overfitting.
SHAP Values - See how each feature contributes to a prediction using SHAP. Waterfall charts show positive and negative contributions summing to the final prediction.
Ensemble Methods - Compare bagging, boosting, and stacking. Watch how combining weak learners reduces variance and bias. See the bias-variance decomposition for each method.
Activation Functions - Compare ReLU, sigmoid, tanh, GELU, Swish, and LeakyReLU. See gradients, dead neurons, and why ReLU dominates. Test which activations vanish for deep networks.
Batch Normalization - Visualize how batch norm normalizes activations within a mini-batch, then rescales with learnable Ξ³ and Ξ². See how it stabilizes training and reduces covariate shift.
Dropout - Watch neurons randomly masked during training. Toggle training vs inference mode. See how dropout prevents co-adaptation and acts as ensemble averaging.
Weight Initialization - Compare random, Xavier, He, and zero initialization. See how variance propagates through layers - too large explodes, too small vanishes. He init keeps it stable.
Convolution Visualizer - Watch a 2D filter slide across an image, computing dot products to produce a feature map. See how different filters detect edges, corners, and textures.
Transfer Learning - Visualize frozen vs fine-tuned layers in a pretrained network. See how earlier layers learn generic features (edges) and later layers learn task-specific features.
RNN Unrolled - Unroll an RNN through time steps. Watch hidden state carry information forward. See how gradients shrink through the chain (vanishing gradient problem).
LSTM Gates - Animate LSTM forget, input, and output gates. Watch the cell state carry long-range information while gates selectively add and remove. Compare to GRU.
Seq2Seq & Attention - Watch an encoder compress a source sequence into context, then a decoder unroll the output token by token. Enable attention to see alignment weights.
Temporal Convolutional Networks - See dilated causal convolutions stack to achieve exponentially growing receptive fields. Compare TCN vs RNN for sequence modeling efficiency.
Anomaly Detection - Watch an autoencoder learn normal patterns and fail to reconstruct anomalies. Set reconstruction error threshold. Compare statistical vs model-based detection.
Hierarchical Clustering - Watch agglomerative clustering merge nearest clusters step by step. See the dendrogram grow as clusters combine. Choose linkage: single, complete, average.
DBSCAN Clustering - Explore density-based clustering: adjust Ξ΅ and min-points to see which points become core, border, or noise. Watch DBSCAN handle non-convex clusters that K-Means cannot.
t-SNE & UMAP - Watch high-dimensional data compress into 2D. Adjust perplexity (t-SNE) or n-neighbors (UMAP) and see clusters form. Understand why these preserve local structure.
Autoencoder - Encode data to a compressed latent space, then decode back. Visualize the bottleneck. Traverse the latent space and see reconstructions change smoothly.
GAN Training Dynamics - Watch generator and discriminator play a minimax game. See mode collapse, training instability, and convergence. Visualize the generator's improving distributions.
Matrix Factorization - Decompose a user-item ratings matrix into user and item embedding vectors. See how SVD captures latent factors. Predict missing ratings from low-rank approximation.
MDP & Value Functions - Navigate a gridworld MDP with rewards, walls, and terminal states. Watch value iteration compute V(s) for every state. See how policy emerges from value function.
Q-Learning - Watch an agent explore a gridworld and update its Q-table after each step. See Q-values converge and the optimal policy emerge. Adjust Ξ΅ for exploration vs exploitation.
Policy Gradient - Watch REINFORCE update a stochastic policy using trajectory rewards. See the policy distribution shift toward high-reward actions. Understand the score function trick.
PPO - Proximal Policy Optimization - See the PPO clipped surrogate objective prevent large policy updates. Compare to vanilla policy gradient. Watch the importance ratio and clip boundary in action.
RLHF Pipeline - Step through the full RLHF pipeline: SFT β reward model training from preferences β PPO fine-tuning. See how human feedback shapes the policy.
Direct Preference Optimization - See how DPO eliminates the reward model by directly optimizing policy from preference pairs. Compare DPO vs RLHF objectives. Watch the implicit reward update.
LIME Explanations - Watch LIME perturb input features around a prediction and fit a local linear model. See which features drive the local decision - even for black-box models.
Counterfactual Explanations - Ask "what minimal change would flip the prediction?" See the nearest counterfactual for any data point. Understand recourse and actionable explanations.
Feature Engineering - Transform raw feature distributions: log, standardize, one-hot, bin. See how each transformation changes the distribution and model-readiness of the data.
Model Selection - Visualize hyperparameter search: grid search, random search, and Bayesian optimization compared. See validation curves, learning curves, and the model complexity tradeoff.
ML System Pipeline - Animated end-to-end ML pipeline: data ingestion β preprocessing β training β evaluation β deployment β monitoring. See where failures happen in production.
Graph Attention Networks - Watch GAT compute attention weights on edges - different neighbors get different importance scores. Compare to GCN where all neighbors are equal.
Uncertainty Quantification - Compare epistemic (model) vs aleatoric (data) uncertainty. See Monte Carlo dropout, deep ensembles, and calibration plots. Understand when to trust your model.
Conformal Prediction - Generate prediction sets with guaranteed coverage. Adjust Ξ± to see narrower or wider sets. Understand why conformal prediction works distribution-free.
Generative Models Compared - Compare VAEs, GANs, and Diffusion models side by side. See their latent spaces, generation process, and training dynamics. Understand trade-offs in quality vs diversity.
Diffusion Process - Watch the forward diffusion process add noise step by step until the signal is pure noise. Then run reverse denoising to recover the original. Visualize the noise schedule.
Backpropagation Step-by-Step - Watch gradients flow backwards through a network. See the chain rule applied at each edge, with delta values shown on every connection.
K-Means Clustering - Drop points onto a 3D canvas, choose K, and watch centroids initialise, assign, and converge. Understand why initialisation matters.
Embedding Space Explorer - Navigate a 3D word embedding space. Find semantic clusters, explore kingβman+woman=queen analogies, and see how distance encodes meaning.
Bias-Variance Tradeoff - Fit polynomial models of increasing degree to noisy data. See underfitting and overfitting happen live as you drag the complexity slider.
Data Engineering
Streaming Data Pipeline - Animated data flowing source β Kafka β transform β sink. Toggle lag, reorder events, and watch the consumer fall behind then catch up.
Partition & Shuffle - Visualise how Spark distributes data across partitions. See the shuffle phase - the most expensive operation in distributed compute - happen in real time.
Storage Formats Compared - Compare Parquet, ORC, Avro, JSON, and CSV on compression, read/write speed, schema evolution, and columnar vs row-oriented layout.
Kafka Architecture - Visualize Kafka topics, partitions, producer offsets, and consumer group assignments. Produce messages and watch lag accumulate.
Flink Stream Processing - Explore Flink dataflow graphs and window types - tumbling, sliding, and session windows with watermarks and late event handling.
Data Quality Checks - Run Great Expectations-style validation rules on a dataset. Watch rules pass or fail and track an overall data quality score.
Point-in-Time Join - See how naive feature joins cause data leakage vs correct point-in-time lookups that fetch feature values as-of each label timestamp.
LLMs
Transformer Self-Attention - Interactive QΒ·Kα΅ attention heatmap. Type a sentence, pick a token, and see which other tokens it attends to - and why.
Multi-Head Attention Patterns - All 12 attention heads from a real transformer shown simultaneously. See how different heads specialise: syntax, coreference, position.
BPE Tokenisation - Type any text and watch the BPE algorithm split it into subword tokens step-by-step. See why "tokenisation" matters for model input length.
KV Cache Explained - See how autoregressive inference reuses past key-value pairs. Compare cached vs uncached compute. Understand why KV cache size limits context length.
Positional Encoding: Sinusoidal, RoPE & ALiBi - Compare three positional encoding strategies side by side. See how sinusoidal, rotary (RoPE), and ALiBi encodings encode position, and why RoPE enables length generalisation.
Scaling Laws: Compute, Data & Parameters - Explore Chinchilla scaling laws interactively. Drag compute budget, model size, and dataset size to see how loss decreases. Understand the optimal allocation of a fixed FLOPs budget.
Language Modeling: MLM vs CLM - See masked language modeling (BERT-style) and causal language modeling (GPT-style) side by side. Watch how the model predicts masked or next tokens given context.
LoRA: Low-Rank Adaptation - Visualize how LoRA decomposes weight updates into two small matrices A and B. See the rank-r approximation, parameter count reduction, and how PEFT compares to full fine-tuning.
Sampling Strategies: Temperature, Top-K, Top-P - Adjust temperature, top-K, and nucleus (top-P) sampling live. See how each parameter reshapes the probability distribution over the vocabulary and affects diversity vs coherence.
Speculative Decoding - Watch a small draft model generate k tokens, then the large verifier model accept or reject them in parallel. See the acceptance rate and speedup over standard autoregressive decoding.
Attention Complexity & Long Context - See how attention scales as O(nΒ²) in sequence length. Compare full attention vs sparse attention vs sliding window. Understand the quadratic bottleneck at 128k context.
Mixture of Experts (MoE) - See how MoE routes each token to the top-k expert FFN layers. Adjust the number of experts and top-k to see sparsity, parameter counts, and load balancing across experts.
Mamba State Space Model - Compare Mamba SSM vs Transformer attention on long sequences. See the selective state space mechanism, the recurrent hidden state, and why Mamba scales linearly with sequence length.
Model Merging: TIES, DARE & SLERP - Visualize how model merging combines two fine-tuned models without additional training. Compare linear interpolation, TIES (resolving sign conflicts), DARE (pruning), and SLERP.
Matryoshka Representation Learning - See how Matryoshka embeddings encode information at multiple granularities. Truncate the embedding to any dimension and watch retrieval quality degrade gracefully - unlike standard embeddings.
Adversarial Prompts & Red Teaming - Explore jailbreak techniques - prompt injection, role-play bypasses, and token manipulation. See how guardrails defend against each attack type and the cat-and-mouse game of LLM safety.
Constitutional AI & RLHF Alignment - Walk through the Constitutional AI pipeline: AI critique β revision β preference data β RL. Compare supervised constitutional feedback with human RLHF and see how principles shape behavior.
Perplexity & Generation Metrics - See how perplexity measures language model uncertainty token-by-token. Compare BLEU, ROUGE, and BERTScore on generated text. Understand why perplexity does not always correlate with quality.
CLIP Contrastive Learning - See how CLIP aligns image and text embeddings in a shared space using contrastive loss. Watch the InfoNCE loss update as positive pairs are pulled together and negatives pushed apart.
Monte Carlo Tree Search for LLM Reasoning - See how MCTS explores reasoning paths - expanding high-value nodes, using process reward models to score intermediate steps, and backpropagating values. Understand how o1 thinks.
Long Context: Lost in the Middle - See how retrieval accuracy degrades for facts placed in the middle of a long context vs beginning/end. Explore context compression and retrieval-augmented approaches to handle 128k+ tokens.
Inference Batching & Throughput - Requests arrive in real time. Slide batch size and see how GPU utilisation, latency, and throughput change. The classic latency-throughput tradeoff made visual.
Quantisation Effects - Compare float32 vs int8 weight distributions. See rounding error on a 3D weight tensor. Understand why 4-bit matters for serving large models.
Training Dynamics - Live loss curves, learning rate schedules, and batch effects as a model trains. Change warmup steps, weight decay, and watch the curve respond.
Data & Concept Drift - Two distributions - training and production. Slide time forward and watch drift accumulate. See how monitoring detects the point where your model degrades.
ReAct Agent Loop - Thought β Action β Observation cycle animated. Watch the agent reason, call a tool, get a result, and decide what to do next. Step through each iteration.
Multi-Agent Communication - Two agents collaborating on a task. See message passing, handoffs, shared memory, and deadlock - everything that makes multi-agent systems hard.
RAG Pipeline Flow - Query β embed β retrieve β rank β augment β generate, all animated. See how chunk size and top-k affect what context the model receives.
Prompt Routing - A router classifies incoming prompts and dispatches to different models (fast/cheap vs slow/smart). See the decision boundary and routing confidence live.
Embedding Space Explorer - Navigate a 3D word embedding space. Find semantic clusters, explore kingβman+woman=queen analogies, and see how distance encodes meaning.
In-Context Learning & Few-Shot - See how adding examples to the prompt shifts the model output distribution without any weight updates. Compare 0-shot, 1-shot, and 5-shot accuracy on classification tasks.
Chain-of-Thought Reasoning - Step through a multi-hop math or logic problem with and without chain-of-thought prompting. See how intermediate reasoning steps unlock answers that direct prompting misses.
Document Chunking Strategies - Compare fixed-size, recursive, and semantic chunking on the same document. See how chunk size and overlap affect retrieval precision and context quality in RAG.
Vector Search & ANN Algorithms - See how approximate nearest neighbor search (HNSW, IVF, Flat) finds similar vectors in a high-dimensional embedding space. Compare recall vs latency tradeoffs.
Reranking: Cross-Encoder vs Bi-Encoder - See why bi-encoders are fast but imprecise, while cross-encoders are slow but accurate. Watch a reranker reorder retrieval results and improve Recall@1.
Tool Use & Function Calling - See how an LLM decides when to call a function, formats the call as JSON, receives the result, and incorporates it into its response. Animate parallel tool calls.
Agent Memory Systems - Compare short-term (context window), long-term (vector store), episodic (conversation logs), and semantic (knowledge graph) memory in AI agents. See retrieval patterns.
LLM-as-Judge Evaluation - See how LLM-based evaluation works: G-Eval, MT-Bench, and pairwise comparison. Watch the judge model score outputs on helpfulness, factuality, and safety with explicit rubrics.
Beam Search vs Greedy Decoding - Watch beam search explore B candidate sequences simultaneously and prune to the top beam at each step. See why beam search finds better sequences than greedy but misses diverse outputs.
Continuous Batching & PagedAttention - See how continuous batching inserts new requests mid-generation rather than waiting for a full batch to complete. Understand how PagedAttention eliminates KV cache fragmentation.
Vision-Language Model Architecture - See how a vision encoder (ViT) patches an image, projects patch embeddings into the language model space, and attends to both visual and text tokens. Compare LLaVA, GPT-4V, Gemini.
LLM Guardrails & Safety Systems - Walk through a layered safety architecture: input classifier, system prompt injection, output filter, and circuit breaker. See how each layer adds latency but catches different violations.
Context Compression - Compare strategies for fitting more into a fixed context window: extractive compression (keep key sentences), abstractive summarization, and retrieval-augmented compression.
Hybrid Search: Dense + Sparse - See how BM25 (sparse/lexical) and embedding search (dense/semantic) find different but complementary results. Reciprocal Rank Fusion combines both for better retrieval.
Process Reward Models (PRM) - See how PRMs score intermediate reasoning steps rather than just final answers. Compare outcome reward models (ORM) vs PRMs and how they guide tree search.
Test-Time Compute Scaling - See how spending more compute at inference (more search, longer thinking) improves accuracy - especially on hard problems. Understand the accuracy vs compute tradeoff curve.
Fine-Tuning Methods Compared - Compare full fine-tuning, LoRA, QLoRA, and prompt tuning side by side on memory usage, training speed, and performance. See the parameter-efficiency vs performance frontier.
Feed-Forward Network Sub-Layer - Visualize the FFN sub-layer inside a Transformer block: token β Linear1 β GELU β Linear2. Adjust d_model and expansion ratio to see the 4Γ bottleneck and parameter count.
Layer Norm & Residual Connections - Compare Pre-LN vs Post-LN placement in a Transformer block. See how layer normalization stabilizes the residual stream and prevents internal covariate shift.
Encoder vs Decoder vs Encoder-Decoder - Compare the three Transformer architectures: BERT-style encoder-only, GPT-style decoder-only, and T5-style encoder-decoder. See cross-attention, masked attention, and use cases.
BERT Masked Language Modeling - See how BERT predicts masked tokens using bidirectional context. Mask any token in a sentence and watch the top-K predictions with probability scores.
Instruction Tuning - Compare raw pretraining completion vs instruction-tuned responses. See how instruction templates transform a base model into a helpful assistant.
QLoRA: Quantized Fine-Tuning - See how QLoRA combines 4-bit quantization with LoRA adapters to fine-tune 70B models on a single 48GB GPU. Compare memory vs quality tradeoffs across model sizes.
Tree of Thought Reasoning - Watch Tree of Thought explore branching reasoning paths. Compare BFS vs DFS exploration, prune low-scoring branches, and find the optimal reasoning path.
System Prompt Design - Visualize how a context window is split between system, user, and assistant sections. See token budget allocation and how system prompt design affects model behavior.
Structured Output & Constrained Generation - See how JSON schema constraints filter invalid tokens at each generation step. Watch constrained decoding build a valid JSON object token by token.
DSPy: Automatic Prompt Optimization - See how DSPy compiles a program into optimized prompts using bootstrap few-shot selection. Watch the metric curve improve as the optimizer selects better demonstrations.
RAG Evaluation with RAGAS - Evaluate RAG pipeline quality with RAGAS metrics: faithfulness, answer relevance, context recall, and context precision. See how each metric catches different failure modes.
Advanced RAG Patterns - Explore HyDE, parent-child chunking, step-back prompting, and multi-query retrieval. See how each pattern improves over naive RAG for different query types.
Graph RAG - See how Graph RAG extracts entities and relations, builds a knowledge graph, detects communities, and retrieves relevant subgraphs for a query.
Agent Planning & Task Decomposition - Watch an agent decompose a goal into subtasks, build a dependency DAG, execute tasks in order, and replan when a task fails.
Agent Evaluation & Trajectory Scoring - Evaluate agent trajectories step by step. See task completion rates, error categorization, and how trajectory efficiency compares to optimal plans.
LangChain vs LlamaIndex - Compare LangChain and LlamaIndex pipeline components side by side. See equivalent components and which framework excels for different use cases.
BLEU, ROUGE & METEOR Metrics - See how BLEU measures n-gram precision, ROUGE measures recall, and METEOR handles synonyms. Watch n-gram matches highlight between reference and hypothesis.
Human Evaluation & Inter-Rater Agreement - See how human annotation works for LLM evaluation: multi-rater scoring, inter-rater agreement (Fleiss kappa), and aggregating annotations into reliable quality scores.
LLM Benchmark Explorer - Compare GPT-4, Claude, Gemini, Llama-3, and Mistral across MMLU, HumanEval, MATH, HellaSwag, and TruthfulQA on an interactive radar chart.
Safety & Bias Evaluation - Evaluate LLM safety using ToxiGen, BBQ, and WinoBias benchmarks. See bias across gender, racial, and occupational categories with a model comparison heatmap.
Model Parallelism: Tensor & Pipeline - See how tensor parallelism splits layers across GPUs and pipeline parallelism splits the model into stages. Understand the pipeline bubble and GPU memory tradeoffs.
LLM Inference Cost Breakdown - See the compute, memory, and I/O cost breakdown for LLM inference. Explore the batch size vs latency vs throughput tradeoff and find the optimal operating point.
Audio-Language Models (Whisper) - See how audio is converted to log-mel spectrograms, processed by an encoder, and decoded to text tokens. Understand the Whisper architecture and multilingual transcription.
Multimodal RAG - See how image+text queries retrieve across a multimodal corpus using unified embeddings. Compare text-only vs multimodal retrieval quality.
LLM Product Architecture - Trace a request through the full LLM app stack: gateway β cache β router β model β guardrails β response. See how each layer contributes latency and cost.
LLM Caching Strategies - Compare exact match, semantic similarity, and KV prefix caching. See hit rates, latency savings, and eviction policies for production LLM serving.
LLM Observability & Tracing - Visualize a complete LLM request trace: tokenize β retrieve β generate β filter. See latency waterfall, span contributions, token counts, and P95 latency.
o1 Architecture: Thinking Tokens - See how o1-style models generate hidden chain-of-thought scratchpad tokens before answering. Compare accuracy vs compute for direct, CoT, and o1 approaches.
Reasoning Model Evaluation - Explore Pass@k vs compute curves and majority voting accuracy for reasoning benchmarks: AIME, MATH, Codeforces, GPQA, and ARC-Challenge.
MoE Router & Expert Selection - See how a token is routed to top-K experts using router logits. Watch load distribution across experts and how the auxiliary loss prevents expert collapse.
Sparse MoE vs Dense Models - Compare active parameter counts and FLOPs per token for dense vs sparse MoE models. See how MoE achieves more parameters with fewer FLOPs per token.
State Space Model Foundations - Explore the A, B, C, D matrices of a state space model. Toggle between continuous ODE and discrete recurrence mode. See the equivalent convolution kernel.
Mamba vs Transformer - Compare Mamba's O(n) selective scan vs Transformer's O(nΒ²) attention on long sequences. See memory footprint, inference speed, and where Mamba wins.
Hybrid Attention + SSM Architectures - See how models like Jamba and Zamba alternate Transformer attention and SSM layers. Explore the attention:SSM ratio tradeoff on perplexity and compute.
Outlines: Grammar-Constrained Generation - See how Outlines uses a finite state machine (FSM) to constrain token generation to valid JSON, regex, or EBNF grammars. Watch invalid tokens get masked at each step.
LMQL: Constraint-Based Prompting - See how LMQL uses where-clause constraints to control LLM outputs. Watch constraints prune beam variables and guide constrained completion.
Model Soup: Weight Averaging - Visualize how model soups average multiple fine-tuned checkpoint weights without additional training. See why weight-space averaging improves generalization.
SLERP Model Interpolation - Compare SLERP (spherical linear interpolation) vs LERP (linear interpolation) for model weight merging. See how SLERP preserves weight vector norms.
Context Window Extension - See how YaRN, ALiBi, and LongRoPE extend LLMs beyond their trained context length. Compare perplexity degradation curves for each method.
AI Safety Evaluation Suites - Compare model safety across HarmBench, WMDP, CyberSec, TruthfulQA, and ToxiGen. See a model safety heatmap and category breakdown for leading LLMs.
Embedding Fine-Tuning with Contrastive Loss - See how contrastive learning trains embedding models: positive pairs pulled together, negatives pushed apart. Watch cluster separation improve over training steps.
Embedding Model Evaluation (MTEB) - Compare embedding models across MTEB tasks: retrieval (BEIR), STS, classification, clustering, and reranking. See NDCG@10 and Spearman correlation scores.
Embeddings in Production - See the full embeddings production pipeline: batch index build β online serving β drift monitoring. Compare throughput, latency, and cost across index types.
AI Systems
ML System Design Framework - Structured canvas for ML system design interviews: requirements, scale estimation, high-level design, deep dives, and tradeoffs - with templates for 4 system types.
Back-of-Envelope Estimation - Auto-calculate QPS, storage, bandwidth, GPU count, and cost from DAU and model parameters. See how small changes in scale explode infrastructure requirements.
Latency vs Throughput Tradeoffs - Visualize how p50/p95/p99 latency rises as throughput approaches saturation. Explore Little's Law, replica scaling, and caching effects on the latency-throughput curve.
CAP Theorem for ML Systems - Apply CAP theorem to 4 ML system types. See which consistency-availability tradeoff each makes and what happens during a partition.
Data Lake, Warehouse & Lakehouse - Compare data warehouse, data lake, and lakehouse architectures side-by-side. See how Delta Lake and Apache Iceberg combine ACID guarantees with cheap object storage for ML.
Spark Batch Processing for ML - Visualize a Spark job DAG from data read through shuffle to write. See stage boundaries, partition counts, and cluster utilization during feature generation.
Feature Store Architecture - Explore the dual online/offline paths of a feature store. See how Feast, Tecton, and Hopsworks handle point-in-time joins, feature reuse, and serving consistency.
REST vs gRPC for ML Serving - Compare REST (JSON/HTTP1.1) vs gRPC (Protobuf/HTTP2) for model serving. See serialization benchmarks, streaming support, and which to choose for internal vs external APIs.
Sync vs Async Inference - Compare synchronous and asynchronous inference patterns under load. See how async queuing handles long-running inference without blocking clients.
Event-Driven ML Architecture - Stream events through Kafka into feature computation and real-time model inference. Inject backpressure and consumer failures to see how the system responds.
Edge ML Deployment - Compare cloud, edge server, and on-device deployment tiers. Explore model compression (quantization, pruning, distillation) and the accuracy/latency/size tradeoffs per tier.
Lambda vs Kappa Architecture - Compare Lambda (batch + speed layers) vs Kappa (single streaming pipeline) for ML data systems. See which wins for model retraining, backfill, and operational complexity.
Two-Tower Retrieval Model - Visualize the query and item encoder towers, ANN retrieval, and contrastive training. See how hard negatives, embedding dimensions, and distance metrics affect retrieval quality.
Microservices for ML - A 6-service ML mesh: API gateway β feature service β model service β post-processing. Inject failures to see circuit breakers activate and fallback responses kick in.
Cascade & Funnel Architecture - Four-stage ML funnel: retrieval β pre-ranking β ranking β re-ranking. Adjust candidate counts and model types to see how early filtering slashes cost while preserving quality.
Multi-Task Learning Systems - Shared backbone feeding multiple task heads (classification, regression, ranking). Compare hard vs soft parameter sharing and see how task weights affect joint training.
Feedback Loops & Data Flywheels - Visualize the virtuous data flywheel and its dark side: exposure bias in recommendation systems. See how inverse propensity weighting corrects for popularity amplification.
Multi-Tenant ML Platforms - Three tenants sharing one ML cluster with configurable isolation levels: full, namespace, or quota-based. Inject a noisy neighbor to see resource contention and chargeback.
Recommendation System at Scale - End-to-end recommendation pipeline: candidate generation β pre-ranking β ranking β re-ranking. Configure funnel sizes, model types, and feature sources for 1B users.
Fraud Detection System Design - Real-time fraud scoring pipeline: rule engine β ML model β risk score β decision, all in <100ms. Tune decision thresholds and see precision/recall tradeoffs on ROC curve.
Content Moderation System - Multi-layer moderation pipeline: hash matching β ML classifier β confidence thresholding β human review. Tune auto-approve/reject thresholds and see false positive costs.
Ad Click-Through Rate Prediction - CTR prediction pipeline: feature assembly β model β auction. Compare logistic regression vs Deep & Wide, see online learning from click feedback, and trace the ad auction.
ANN Algorithm Comparison - Compare Flat, IVF, HNSW, and LSH for approximate nearest neighbor search. Adjust dataset size and recall target to see how each algorithm balances speed, memory, and accuracy.
FAISS Index Types - Explore IndexFlat, IVFFlat, IVFPQ, and HNSWFlat. Build the right FAISS factory string, compare memory vs recall tradeoffs, and toggle GPU acceleration.
Computer Vision System Design - Full CV pipeline: preprocessing β backbone β feature pyramid β task heads. Configure ResNet/ViT/EfficientNet, FP16 precision, and batch size to see throughput change.
CUDA Programming Model - Visualize GPU thread hierarchy (grids, blocks, warps), memory levels (global/shared/registers), and how shared memory tiling accelerates matrix multiplication.
TPU Architecture - Explore Google TPU's systolic array MXU, compare memory bandwidth and FLOPS against A100/H100, and see when TPUs outperform GPUs for transformer training.
Build vs Buy for ML Infrastructure - Decision matrix across 6 ML components: feature store, model serving, experiment tracking, and more. Calculate total cost of ownership for build vs SaaS vs open source.
Spot Instances for ML Training - Model a training job with spot interruptions. See 70% cost savings vs on-demand, choose optimal checkpoint frequency, and configure multi-AZ fallback strategies.
Ray Architecture - Ray cluster with head node, workers, and object store. Animate task scheduling, see Ray Train vs Ray Tune vs Ray Serve, and configure fractional GPU allocation.
vLLM & PagedAttention - See how PagedAttention eliminates KV cache fragmentation with virtual memory paging. Compare vLLM throughput vs naive serving and visualize continuous batching filling GPU gaps.
MLOps
MLOps Maturity Model - Explore the 4 levels of MLOps maturity - from manual ML to fully automated pipelines. See capability gaps and what it takes to level up.
Experiment Tracking with MLflow - Compare ML experiment runs side-by-side. Sort by any metric, view training curves, and identify the best-performing configuration.
Dataset Lineage & Provenance - Trace data from raw sources through ingestion, preprocessing, and feature store to training dataset. Click any node to highlight its full upstream chain.
Data Contracts & Schema Validation - See how data contracts catch schema violations, null rates, and out-of-range values before they corrupt your model. Toggle healthy vs corrupted data.
Model Registry & Versioning - Browse model versions, compare accuracy and latency, and promote versions through Candidate β Staging β Production lifecycle.
Model Staging & Promotion - Simulate quality gates that a model must pass before reaching production. Adjust thresholds and watch the promotion pipeline respond.
CI/CD Pipeline for ML - Animate an 8-stage ML CI/CD pipeline from code commit to production. Inject failures at any stage and see how the pipeline handles them.
Model Validation Gates - Six production-readiness gates - accuracy, latency, skew, fairness, memory, integration - must all pass before deployment. Adjust sliders to see how gates respond.
Docker for ML - Visualize Docker image layers for ML workloads. Toggle GPU base images, multi-stage builds, and see how each choice affects image size.
ML Pipeline Orchestration - Run a DAG-based ML pipeline (ingest β validate β preprocess β train β evaluate β deploy). Inject failures and switch between Airflow, Prefect, and Kubeflow styles.
Kubernetes for ML - Explore a production ML namespace with Deployments, Services, ConfigMaps, and GPU node pools. Scale replicas and see resource quotas update in real time.
GPU Scheduling & Utilization - Schedule training jobs across a GPU cluster. Compare bin-packing vs spread strategies and see how memory fragmentation affects utilization.
Autoscaling ML Workloads - Watch the Horizontal Pod Autoscaler respond to traffic spikes by scaling model server replicas. Compare CPU-based HPA vs KEDA event-driven scaling.
Model Serving Architecture - Trace a request through a full model serving stack - load balancer, gateway, replicas, and response - with latency breakdown at each stage. Toggle KServe, Triton, and TorchServe.
Infrastructure Monitoring - Live ops dashboard with CPU, GPU, latency p99, and error rate sparklines. Inject CPU spikes and latency degradation events to trigger alerts.
Cloud ML Platforms Compared - Feature matrix comparing AWS SageMaker, Google Vertex AI, and Azure ML across training, pipelines, feature stores, serving, and monitoring - with cost estimates.
A/B Testing for ML Models - Simulate an online controlled experiment. Adjust sample size, effect size, and significance level to see p-values, confidence intervals, and the significance verdict update live.
Shadow Mode Testing - Send 100% of traffic to both production and shadow models simultaneously. Compare predictions side-by-side and toggle to canary mode for gradual rollout.
Multi-Armed Bandit Explorer - Compare Epsilon-Greedy, UCB1, and Thompson Sampling strategies on a 4-arm bandit. Watch cumulative reward and arm selection evolve over hundreds of steps.
Prompt Version Management - Browse a prompt registry with versions v1βv5. Diff any two versions, compare performance scores, and promote prompts to production.
LLM Evaluation Pipeline - Run a full evaluation pipeline: dataset β inference β scoring β baseline comparison β regression detection. Compare models across accuracy, BLEU, ROUGE-L, and cost.
Infrastructure as Code for ML - Visualize a Terraform resource graph: VPC β EKS β node groups β S3 β ECR. Apply, plan, and destroy resources and see the dependency graph update.
GitOps for ML Deployments - Watch ArgoCD detect drift between Git desired state and cluster actual state, then sync automatically. Introduce config drift and trigger rollbacks.
Feature Selection Methods - Compare Random Forest, Lasso, Mutual Information, and RFE feature importance. Adjust top-K threshold and remove correlated features to see the selected set change.
Automated Feature Engineering - See how automated feature engineering transforms 5 raw features into 20+ engineered ones via datetime extraction, categorical encoding, and interaction terms.
ML Cost & Unit Economics - Break down ML spend across training, storage, serving, and experimentation. Adjust model size, inference volume, and GPU type to see cost-per-prediction change.
LLM Token Cost Monitor - Monitor daily token usage, cost by use case, and projected monthly spend. Compare GPT-4o, Claude Sonnet, and Llama 3.1 70B costs for the same workload.
Agentic AI
Agent Loop: Observe-Think-Act - Animate the core agent loop - observe environment, think with LLM, act with tools. Step through cycles manually or watch an agent work through a task.
Agent vs Chatbot vs Workflow - Side-by-side comparison of three approaches to the same task. See how agents differ from fixed workflows in decision-making, adaptability, and failure handling.
Agentic Design Patterns - Explore 5 core agentic patterns - ReAct, Plan-and-Execute, Reflection, Tool-Use, Multi-Agent - each with an interactive flow diagram and tradeoff analysis.
MCP Architecture - Visualize the Model Context Protocol: host, client, and server layers. Animate a JSON-RPC request through Tools, Resources, and Prompts primitives.
MCP Security & Permissions - Explore the MCP permission matrix across servers. Simulate prompt injection attacks and see how permission scoping and trust levels protect against over-privileged agents.
Computer Use Agents - Walk through a computer use agent loop: screenshot β vision model β plan β click/type β repeat. Trace actions on a mock browser and compare WebArena/OSWorld benchmarks.
Agent Sandboxing - Layer-by-layer security model for agent code execution. Toggle restrictions on network, filesystem, and subprocess access. Simulate dangerous actions and see what the sandbox blocks.
Coding Agent Loop - Watch a coding agent read files, analyze errors, write fixes, and run tests in a loop until passing. Step through manually or auto-run a full debug cycle.
Human-in-the-Loop Agents - Simulate an agent that pauses for human approval at high-risk actions. Compare interrupt-always, interrupt-on-risk, and fully-autonomous strategies.
Agent Checkpointing & Recovery - Long-horizon task with checkpoints saved at each step. Inject a failure mid-task and choose between resume-from-checkpoint, restart, or resume-with-context strategies.
Episodic Memory with Vector Store - See how agents retrieve relevant past experiences via embedding similarity. Search the memory bank, adjust top-K and similarity thresholds, and watch context window usage.
Procedural Memory & Agent Skills - Explore an agent skill library - reusable procedures extracted from successful task completions. Simulate learning new skills and invoking stored ones.
Agent Communication Protocols - Visualize hub-and-spoke, peer-to-peer, and broadcast communication patterns across a 4-agent system. Inject message failures and watch agents handle delivery errors.
Parallel Agent Execution - Fan out a task across 3+ parallel agents and fan in the results. Compare wall-clock time vs sequential and see how a slow or failing agent affects the overall outcome.
LangGraph Stateful Agents - Visualize a LangGraph execution graph with state snapshots at each node. Animate agent β tools β agent cycles and explore conditional edges and human-in-the-loop checkpoints.
Agent Trajectory Evaluation - Score a completed agent trajectory step-by-step on task completion, efficiency, and safety. Compare against an optimal trajectory and see the evaluator's reasoning per step.
Agent Risk & Minimal Footprint - Risk matrix of agent actions by reversibility and blast radius. Score actions, apply minimal footprint principles, and simulate threat scenarios including prompt injection.
AI Engineering
LLMOps Pipeline - Visualize the LLMOps lifecycle: dataset curation, fine-tuning, evaluation, deployment, monitoring, and retraining triggers.
Semantic Caching for LLMs - See how semantic caching stores query embeddings and returns cached responses when similarity exceeds a threshold - saving tokens and cost.
Model Fallback & Retry - Simulate a fallback chain across GPT-4o, Claude Sonnet, and Llama models. Inject failures and watch requests cascade with exponential backoff.
Synthetic Data Generation - Explore Self-Instruct, Evol-Instruct, and distillation pipelines for generating fine-tuning datasets from LLMs.
Knowledge Distillation - Visualize teacher-to-student knowledge transfer. Compare hard vs soft label training, compression ratios, and accuracy-latency tradeoffs.
Streaming LLM Responses - Compare streaming vs non-streaming UX. Measure TTFT, token generation rate, and total latency across model speed tiers.
Active Learning Loop - Interactive active learning: watch uncertainty sampling select the most informative unlabeled points to annotate and improve a classifier.
Break Into AI
AI Skills Radar - An interactive radar chart across 8 AI engineering skill dimensions. Mark your level, see the gap to different roles (MLE, AI Engineer, MLOps), get a learning path.
AI Learning Path Graph - A directed graph of every topic in the curriculum and its prerequisites. Click any node to see what to learn first. Find the critical path to your target role.