Vectors & Dot Product
Vectors, weights, and the dot product — the weighted sum every model is built on.
Curriculum
Neural networks, attention, transformers, diffusion, reinforcement learning
Vectors & Dot Product
Vectors, weights, and the dot product — the weighted sum every model is built on.
Linear Classifier
One dot-product scorer per class: scores, argmax, and the straight borders that carve the plane.
Linear Regression
Fit a line to data by minimizing squared error — the simplest learning algorithm.
Logistic Regression
Squash a score through the sigmoid into a probability, then classify.
k-Nearest Neighbors
Classify by the majority vote of the nearest labeled points — no training step.
Decision Tree
Split the data one feature at a time, choosing the split that reduces impurity.
Support Vector Machine
The boundary with the widest margin between classes, set by its support vectors.
K-Means Clustering
Group points into k clusters by alternating assignment and centroid updates.
Principal Component Analysis
Project data onto the directions of greatest variance to shed dimensions.
Naive Bayes
Classify by multiplying per-feature probabilities — naive, fast, surprisingly strong.
Overfitting & Validation
Fit polynomials of rising degree and watch train and test error split into a U-curve.
Cross-Validation
Rotate k folds of held-out data so every point gets scored as unseen.
Confusion Matrix
Precision, recall, and why accuracy lies on imbalanced data.
Perceptron
Single-layer neural network basics
Forward Propagation
How a neural network turns pixels into a prediction
Loss Function
How wrong a prediction is — the surface gradient descent walks downhill.
Softmax & Cross-Entropy
Turn logits into probabilities, then score them against the correct class.
Gradient Descent
Stepping down the loss surface
Backpropagation
Gradient descent and weight updates
MNIST Digit Classifier
Draw digits or load real MNIST samples and watch a trained MLP classify them live
CNN
Convolution, pooling, feature maps
Training Loop
Train a tiny net live in your browser — watch the boundary learn, thrash, underfit and overfit.
RNN / LSTM
Sequential models and hidden state
Vanishing Gradients
Watch one chain-rule product fade through sigmoid layers while an active ReLU path shrinks, survives, or explodes.
Dropout
Randomly mask hidden units during training and watch the regularization tradeoff.
Batch Normalization
Standardize each hidden channel, then isolate how the size of its statistics group changes a deep training run.
Optimizers — SGD, Momentum, Adam
Race three update rules down the same loss surface.
Tokenization
Text preprocessing and encoding
BPE Training
Learn subword merges from a corpus
N-gram Language Models
Predict the next token by counting — the language model before neural nets.
Word Embeddings
Move a real GloVe relationship through 50D space — then audit what else the corpus encoded
Attention Mechanism
Self-attention and transformers
Positional Encoding
Add sine/cosine position vectors to repeated tokens and compare the inputs with encoding on and off.
Transformer Block
The residual stream: each layer adds, never replaces
Next-Token Prediction
From logits to the next token — the objective behind every language model.
Decoding Strategies
Compare Greedy, Top-k, and Top-p on real GPT-2 logits; change temperature and see which tokens remain eligible.
Agent Loop
Every agent is one while-loop: call the model, run the tool it asks for, feed the result back, repeat until it stops. The loop never changes — everything else is harness.
Tool Calling
The model never runs anything — it returns JSON and stops; your code executes and reports back. One tool call, two round trips.
Permission
Before any tool runs, it passes a rule gate: allow runs it, deny blocks it, ask escalates to you. Set boundaries first, then grant freedom.
Hooks
Attach a check before or after tool execution. Change the event and matcher to see a protected write prevented, reported afterward, or missed entirely.
ReAct Loop
Thought → Action → Observation — why checking the world beats reasoning alone, and what written thoughts add to acting alone: a trace you can audit.
Plan Before Acting
Write a plan with completion conditions, then follow a failed check through repair and recheck. Compare the checklist's status with the actual tool results.
Subagents
Hand a big task to a subagent with a clean context: it works in isolation and bubbles back only the conclusion, so noise never leaks into the main conversation.
Context & Memory
Why an agent compacts its context near the limit — what a summary keeps, what it loses, and what a memory file carries into the next session.
System Prompt Assembly
Assemble system sections, tool definitions, and context from runtime sources. Compare listed skills with loaded instructions, and available memory with the contents actually sent.
Error Recovery
A failed call isn't the end — it's the start of a retry chain: try again, compact to make room, escalate the token budget, fall back to another model.
RAG: Retrieval-Augmented Generation
How an LLM answers from docs it never trained on — embed, rank by cosine, top-k into the prompt — and why the answer is decided before generation.
Task System
Big goals break into a dependency graph of small tasks, persisted to disk: each node waits on what blocks it, and finishing one unlocks the next.
Background Tasks
Slow work goes to the background while the agent keeps thinking — a long command runs off to the side, and its completion notification lands at the next turn boundary.
Agent Teams
Teammates keep separate contexts. Follow a contract update through a mailbox, then check whether their API and UI artifacts agree.
MCP Plugin
Discover external tools, register their server routes, and follow a call through MCP. Compare an unavailable tool with a failed lookup.
Edge Detection
Calculate Sobel responses from pixels; test polarity, thresholds, and noise.
Pooling & Feature Maps
Compare max and average pooling, then move a response across a window boundary to see what changes.
Image Classification
One crop → 1,000 scores → one label; then see why crop policy matters
Object Detection
Filter real bounding boxes with score thresholds, IoU, and NMS