FROM MODEL TO SYSTEM
AI Engineering.
Understand the mechanisms. Experiment. Build systems and verify what they do.
542 lessons · 51 Python exercises · 78 projects
Choose what you want to build.
Each path connects concepts to concrete work. Start at the level that fits you.
- Building and Deploying AI ApplicationsBuild an AI feature from prompt and structured output through retrieval, evaluation, production serving, observability, and release.
- Product Judgment and DeliveryTurn evidence into outcomes, assumptions, testable slices, executable specifications, measurement plans, and owned feedback loops.
- Software Engineering FundamentalsBuild the repository, debugging, testing, interface, security, release, and operational foundations AI systems depend on.
- Agent-Assisted EngineeringFrame, plan, execute, delegate, verify, review, and improve coding-agent work inside real repositories.
UNDERSTAND THE MODEL
Build an LLM ↗
A small Transformer trained here, in your browser. Six experiments to understand its calculations before building the system around it.
All learning paths 13
- Agent Skills EngineeringBuild, route, secure, evaluate, package, and verify Agent Skills in real hosts.
- Agent Systems EngineeringEngineer tool-using agent loops with explicit context, memory, orchestration, safety, evaluation, and production control.
- AI Data SystemsBuild reliable data, feature, embedding, retrieval, evaluation, and observability pipelines for AI systems.
- Developer Experience and EducationBuild credible integrations, examples, and reusable agent packages, then turn developer friction into clearer tools and teaching.
- AI Evaluation and ReliabilityMeasure model and agent behavior, expose failure modes, instrument the runtime, and build release and incident controls around evidence.
- LLM Product EngineeringTurn language-model capability into evaluated, safe, cost-aware product behavior that can survive production traffic.
- Building and Deploying AI ApplicationsBuild an AI feature from prompt and structured output through retrieval, evaluation, production serving, observability, and release.
- Customer AI DeploymentDiscover a customer workflow, reduce its riskiest assumptions, and carry a useful AI system through measurement and rollout.
- Model Context Protocol (MCP)Build, secure, verify, and operate stateless MCP systems from JSON-RPC envelopes through conformance release gates.
- Reverse EngineeringRead a compiled program you built yourself: parse the file, decode the instructions, lift them to pseudocode, record evidence, and prove a rebuild equal, then learn the field aroun
- Product Judgment and DeliveryTurn evidence into outcomes, assumptions, testable slices, executable specifications, measurement plans, and owned feedback loops.
- Software Engineering FundamentalsBuild the repository, debugging, testing, interface, security, release, and operational foundations AI systems depend on.
- Agent-Assisted EngineeringFrame, plan, execute, delegate, verify, review, and improve coding-agent work inside real repositories.
The library.
All twenty course domains, with their full text, code, exercises and references.
What order should I follow?
These links describe the foundations recommended by the course. You can open any domain directly.
00Setup & Tooling13
- Dev EnvironmentYour tools shape your thinking. Set them up once, set them up right.
- Git & CollaborationVersion control is not optional. Every experiment, every model, every lesson you build here gets tracked.
- GPU Setup & CloudTraining on CPU is fine for learning. Training for real needs a GPU.
- APIs & KeysEvery AI API works the same way: send a request, get a response. The details change, the pattern doesn't.
- Jupyter NotebooksNotebooks are the lab bench of AI engineering. You prototype here, then move what works into production.
- Python EnvironmentsDependency hell is real. Virtual environments are the cure.
- Docker for AIContainers make "works on my machine" a thing of the past.
- Editor SetupYour editor is your co-pilot. Configure it once so it stays out of your way and starts pulling its weight.
- Data ManagementData is the fuel. How you manage it determines how fast you go.
- Terminal & ShellThe terminal is where AI engineers live. Get comfortable here.
- Linux for AIMost AI runs on Linux. You need to know enough to not be stuck.
- Debugging & ProfilingThe worst AI bugs don't crash. They train silently on garbage and report a beautiful loss curve.
- Python for AI EngineeringMost code in this course uses the same small set of Python idioms. Learn that set here, before the math and model lessons depend on it.
01Math Foundations22
- Linear Algebra IntuitionEvery AI model is just matrix math wearing a fancy hat.
- Vectors, Matrices & OperationsEvery neural network is just matrix multiplication with extra steps.
- Matrix Transformations & EigenvaluesA matrix is a machine that reshapes space. Learn what it does to every point, and you understand the whole transformation.
- Calculus for ML: Derivatives & GradientsDerivatives tell you which way is downhill. That is all a neural network needs to learn.
- Chain Rule & Automatic DifferentiationThe chain rule is the engine behind every neural network that learns.
- Probability & DistributionsProbability is the language AI uses to express uncertainty.
- Bayes' Theorem & Statistical ThinkingProbability is about what you expect. Bayes' theorem is about what you learn.
- Optimization: Gradient Descent FamilyTraining a neural network is nothing more than finding the bottom of a valley.
- Information Theory: Entropy, KL DivergenceInformation theory measures surprise. Loss functions are built on it.
- Dimensionality Reduction: PCA, t-SNE, UMAPHigh-dimensional data has structure. You find it by looking from the right angle.
- Singular Value DecompositionSVD is the Swiss Army knife of linear algebra. Every matrix has one. Every data scientist needs one.
- Tensor OperationsTensors are the common language between data and deep learning. Every image, every sentence, every gradient flows through them.
- Numerical StabilityFloating point is a leaky abstraction. It will bite you during training, and you will not see it coming.
- Norms & DistancesYour distance function defines what "similar" means. Choose wrong and everything downstream breaks.
- Statistics for MLStatistics is how you know if your model actually works or just got lucky.
- Sampling MethodsSampling is how AI explores the space of possibilities.
- Linear SystemsSolving $Ax = b$ is the oldest problem in mathematics that still runs your neural network.
- Convex OptimizationConvex problems have one valley. Neural networks have millions. Knowing the difference matters.
- Complex Numbers for AIThe square root of -1 is not imaginary. It is the key to rotations, frequencies, and half of signal processing.
- The Fourier TransformEvery signal is a sum of sine waves. The Fourier transform tells you which ones.
- Graph Theory for MLGraphs are the data structure of relationships. If your data has connections, you need graph theory.
- Stochastic ProcessesRandomness with structure. The math behind random walks, Markov chains, and diffusion models.
02ML Fundamentals21
- What Is Machine LearningMachine learning is teaching computers to find patterns in data instead of writing rules by hand.
- Linear Regression from ScratchLinear regression draws the best straight line through your data. It is the "hello world" of machine learning.
- Logistic Regression & ClassificationLogistic regression bends a straight line into an S-curve to answer yes-or-no questions with probabilities.
- Decision Trees & Random ForestsA decision tree is just a flowchart. But a forest of them is one of the most powerful tools in ML.
- Support Vector MachinesFind the widest street between two classes. That is the entire idea.
- KNN & Distance MetricsStore everything. Predict by looking at your neighbors. The simplest algorithm that actually works.
- Unsupervised Learning: K-Means, DBSCANNo labels, no teacher. The algorithm finds structure on its own.
- Feature Engineering & SelectionA good feature is worth a thousand data points.
- Model Evaluation: Metrics, Cross-ValidationA model is only as good as the way you measure it.
- Bias, Variance & the Learning CurveEvery model error comes from one of three sources: bias, variance, or noise. You can only control the first two.
- Ensemble Methods: Boosting, Bagging, StackingA group of weak learners, combined correctly, becomes a strong learner. This is not a metaphor. It is a theorem.
- Hyperparameter TuningHyperparameters are the knobs you turn before training starts. Turning them well is the difference between a mediocre model and a great one.
- ML Pipelines & Experiment TrackingA model is not a product. A pipeline is. The pipeline is everything from raw data to deployed prediction, and every step must be reproducible.
- Naive BayesThe "naive" assumption is wrong, and it works anyway. That's the beauty of it.
- Time Series FundamentalsPast performance does predict future results -- if you check for stationarity first.
- Anomaly DetectionNormal is easy to define. Abnormal is whatever doesn't fit.
- Handling Imbalanced DataWhen 99% of your data is "normal," accuracy is a lie.
- Feature SelectionMore features is not better. The right features is better.
- ML System Design — From Problem to Deployed ModelA model is one part of a system. The design decides what the model predicts, who acts on it, what it costs, and what happens when it fails.
- Monitoring Models in Production — Data Drift and Concept DriftA deployed model fails without an error message. It keeps returning scores while the world moves away from its training data, and only monitoring shows the gap.
- Feature Stores and Training-Serving SkewA feature has one definition and two readers. Training reads its history as of each label time, and serving reads its latest value. When the two readers disagree, the model sees…
03Deep Learning Core13
- The Perceptron: Where It All StartedThe perceptron is the atom of neural networks. Split it open and you find weights, a bias, and a decision.
- Multi-Layer Networks & Forward PassOne neuron draws a line. Stack them, and you can draw anything.
- Backpropagation from ScratchBackpropagation is the algorithm that makes learning possible. Without it, neural networks are just expensive random number generators.
- Activation Functions: ReLU, Sigmoid, GELU & WhyWithout nonlinearity, your 100-layer network is a fancy matrix multiply. Activations are the gates that let neural networks think in curves.
- Loss Functions: MSE, Cross-Entropy, ContrastiveYour network makes a prediction. The ground truth says otherwise. How wrong is it? That number is the loss. Pick the wrong loss function and your model optimizes for the wrong t…
- Optimizers: SGD, Momentum, Adam, AdamWGradient descent tells you which direction to move. It says nothing about how far or how fast. SGD is a compass. Adam is GPS with traffic data.
- Regularization: Dropout, Weight Decay, BatchNormYour model gets 99% on training data and 60% on test data. It memorized instead of learning. Regularization is the tax you impose on complexity to force generalization.
- Weight Initialization & Training StabilityInitialize wrong and training never starts. Initialize right and 50 layers train as smoothly as 3.
- Learning Rate Schedules & WarmupThe learning rate is the single most important hyperparameter. Not the architecture. Not the dataset size. Not the activation function. The learning rate. If you tune nothing el…
- Build Your Own Mini FrameworkYou have built neurons, layers, networks, backprop, activations, loss functions, optimizers, regularization, initialization, and LR schedules. All as separate pieces. Now wire t…
- Introduction to PyTorchYou built the engine from pistons and crankshafts. Now learn the one everyone actually drives.
- Introduction to JAXPyTorch mutates tensors. TensorFlow builds graphs. JAX compiles pure functions. That last one changes how you think about deep learning.
- Debugging Neural NetworksYour network compiled. It ran. It produced a number. The number is wrong and nothing crashed. Welcome to the hardest kind of debugging -- the kind where there is no error message.
04Computer Vision28
- Image Fundamentals: Pixels, Channels, Color SpacesAn image is a tensor of light samples. Every vision model you will ever use starts from this one fact.
- Convolutions from ScratchA convolution is a tiny dense layer you slide across an image, sharing the same weights at every location.
- CNNs: LeNet to ResNetEvery major CNN of the last thirty years is the same conv–nonlinearity–downsample recipe with one new idea bolted on. Learn the ideas in order.
- Image ClassificationA classifier is a function from pixels to a probability distribution over classes. Everything else is plumbing.
- Transfer Learning & Fine-TuningSomebody else spent a million GPU hours teaching a network what edges, textures, and object parts look like. You should borrow those features before training your own.
- Object Detection — YOLO from ScratchDetection is classification plus regression, run at every position in a feature map, then cleaned up with non-maximum suppression.
- Semantic Segmentation — U-NetSegmentation is classification at every pixel. U-Net makes it work by pairing a downsampling encoder with an upsampling decoder and wiring skip connections between them.
- Instance Segmentation — Mask R-CNNAdd a tiny mask branch to a Faster R-CNN detector and you have instance segmentation. The hard part is RoIAlign, and it is harder than it looks.
- Image Generation — GANsA GAN is two neural networks in a fixed game. One draws, one critiques. They get better together until the drawings fool the critic.
- Image Generation — Diffusion ModelsA diffusion model learns to denoise. Train it to remove a tiny bit of noise from a noisy image, repeat that backwards a thousand times, and you have an image generator.
- Stable Diffusion — Architecture & Fine-TuningStable Diffusion is a DDPM that runs in the latent space of a pretrained VAE, conditioned on text via cross-attention, sampled with a fast deterministic ODE solver, and steered …
- Video Understanding — Temporal ModelingA video is a sequence of images plus the physics that connects them. Every video model either treats time as an extra axis (3D conv), a sequence to attend over (transformer), or…
- 3D Vision: Point Clouds, NeRFs3D vision comes in two flavours. Point clouds are the sensor's raw output. NeRFs are the learned volumetric field. Both answer "what is where in space."
- Vision Transformers (ViT)Cut the image into patches, treat each patch as a word, run a standard transformer. Don't look back.
- Real-Time Vision: Edge DeploymentEdge inference is the discipline of getting a 90%-accurate model to run at 30 fps on a device with 2 GB of RAM. Every percentage point of accuracy is traded against milliseconds…
- Build a Complete Vision PipelineA production vision system is a chain of models and rules stitched with data contracts. The pieces are already in this phase; the capstone wires them together end-to-end.
- Self-Supervised Vision — SimCLR, DINO, MAELabels are the bottleneck of supervised vision. Self-supervised pretraining removes them: learn visual features from 100M unlabelled images, fine-tune on 10k labelled ones.
- Open-Vocabulary Vision — CLIPTrain an image encoder and a text encoder together so that matching (image, caption) pairs land at the same point in a shared space. That is the whole trick.
- OCR & Document UnderstandingOCR is a three-stage pipeline — detect text boxes, recognise the characters, then lay them out. Every modern OCR system reorders these stages or merges them.
- Image Retrieval & Metric LearningA retrieval system ranks candidates by a distance in embedding space. Metric learning is the discipline of shaping that space so the distances mean what you want.
- Keypoint Detection & Pose EstimationA pose is a set of ordered keypoints. A keypoint detector is a heatmap regressor. Everything else is bookkeeping.
- 3D Gaussian Splatting from ScratchA scene is a cloud of millions of 3D Gaussians. Each one has a position, orientation, scale, opacity, and a colour that depends on viewing direction. Rasterise them, backprop th…
- Diffusion Transformers & Rectified FlowThe U-Net is not the secret of diffusion. Replace it with a transformer, swap the noise schedule for a straight-line flow, and suddenly you have SD3, FLUX, and every 2026 text-t…
- SAM 3 & Open-Vocabulary SegmentationGive a model a text prompt and an image and get masks for every matching object. SAM 3 made that a single forward pass.
- Vision-Language Models (ViT-MLP-LLM)A vision encoder converts an image into tokens. An MLP projector maps those tokens into the LLM's embedding space. A language model does the rest. That pattern — ViT-MLP-LLM — i…
- Monocular Depth & Geometry EstimationA depth map is a single-channel image where each pixel is a distance from the camera. Predicting it from one RGB frame used to be impossible without stereo or LiDAR. In 2026 a f…
- Multi-Object Tracking & Video MemoryTracking is detection plus association. Detect every frame. Match this frame's detections to last frame's tracks by ID.
- World Models & Video DiffusionA video model that predicts the next seconds of a scene is a world simulator. Condition that prediction on actions and you have a learned game engine.
05NLP Foundations29
- Text Processing: Tokenization, Stemming, LemmatizationLanguage is continuous. Models are discrete. Preprocessing is the bridge.
- Bag of Words, TF-IDF & Text RepresentationCount first, think later. TF-IDF still beats embeddings on well-defined tasks in 2026.
- Word Embeddings: Word2Vec from ScratchA word is the company it keeps. Train a shallow net on that idea and geometry falls out.
- GloVe, FastText & Subword EmbeddingsWord2Vec trained one embedding per word. GloVe factorized the co-occurrence matrix. FastText embedded the pieces. BPE bridged to transformers.
- Sentiment AnalysisThe canonical NLP task. Most of what you need to know about classical text classification shows up here.
- Named Entity Recognition (NER)Pull the names out. Sounds easy until you deal with ambiguous boundaries, nested entities, and domain jargon.
- POS Tagging & Syntactic ParsingGrammar was unfashionable for a while. Then every LLM pipeline needed to validate structured extraction, and it came back.
- Text Classification — CNNs & RNNs for TextConvolutions learn n-grams. Recurrences remember. Both are superseded by attention. Both still matter on constrained hardware.
- Sequence-to-Sequence ModelsTwo RNNs pretending to be a translator. The bottleneck they hit is the reason attention exists.
- Attention Mechanism — The BreakthroughThe decoder stops squinting at a compressed summary and starts looking at the whole source. Everything after this is attention plus engineering.
- Machine TranslationTranslation is the task that paid for NLP research for thirty years and keeps paying now.
- Text SummarizationExtractive systems tell you what the document said. Abstractive systems tell you what the author meant. Different tasks, different pitfalls.
- Question Answering SystemsThree systems shaped modern QA. Extractive found spans. Retrieval-augmented grounded them in documents. Generative produced answers. Every modern AI assistant is a mix of the th…
- Information Retrieval & SearchBM25 is precise but brittle. Dense casts a wide net but misses keywords. Hybrid is the 2026 default. Everything else is tuning.
- Topic Modeling: LDA, BERTopicLDA: documents are mixtures of topics, topics are distributions over words. BERTopic: documents cluster in embedding space, clusters are topics. Same goal, different decompositi…
- Text GenerationIf a word is surprising, the model is bad. Perplexity makes surprise a number. Smoothing keeps it finite.
- Chatbots: Rule-Based to NeuralELIZA replied with pattern matches. DialogFlow mapped intents. GPT answered from weights. Claude runs tools and verifies. Each era solved the previous one's worst failure.
- Multilingual NLPOne model, 100+ languages, zero training data for most of them. Cross-lingual transfer is the practical miracle of the 2020s.
- Subword Tokenization: BPE, WordPiece, Unigram, SentencePieceWord tokenizers choke on unseen words. Character tokenizers blow up sequence length. Subword tokenizers split the difference. Every modern LLM ships on one.
- Structured Outputs & Constrained DecodingAsk an LLM for JSON. Get JSON most of the time. In production, "most" is the problem. Constrained decoding turns "most" into "always" by editing the logits before sampling.
- NLI & Textual Entailment"t entails h" means a human reading t would conclude h is true. NLI is the task of predicting entailment / contradiction / neutral. Boring on the surface, load-bearing in produc…
- Embedding Models Deep DiveWord2Vec gave you a vector per word. Modern embedding models give you a vector per passage, cross-lingual, with sparse, dense, and multi-vector views, sized to fit your index. P…
- Chunking Strategies for RAGChunking configuration influences retrieval quality as much as the choice of embedding model (Vectara NAACL 2025). Get chunking wrong and no amount of reranking saves you.
- Coreference Resolution"She called him. He did not answer. The doctor was at lunch." Three references to two people and nobody is named. Coreference resolution figures out who is who.
- Entity Linking & DisambiguationNER found "Paris." Entity linking decides: Paris, France? Paris Hilton? Paris, Texas? Paris (the Trojan prince)? Without linking, your knowledge graph stays ambiguous.
- Relation Extraction & Knowledge Graph ConstructionNER found the entities. Entity linking anchored them. Relation extraction finds the edges between them. A knowledge graph is the sum of nodes, edges, and their provenance.
- LLM Evaluation: RAGAS, DeepEval, G-EvalExact-match and F1 miss semantic equivalence. Human review does not scale. LLM-as-judge is the production answer — with enough calibration to trust the number.
- Long-Context Evaluation: NIAH, RULER, LongBench, MRCRGemini 3 Pro advertises 10M tokens of context. At 1M tokens, 8-needle MRCR drops to 26.3%. Advertised ≠ usable. Long-context evaluation tells you the actual capacity of the mode…
- Dialogue State Tracking"I want a cheap restaurant in the north... actually make it moderate... and add Italian." Three turns, three state updates. DST keeps the slot-value dict in sync so the booking …
06Speech & Audio17
- Audio Fundamentals: Waveforms, Sampling, FFTWaveforms are the raw signal. Spectrograms are the representation. Mel features are the ML-friendly form. Every modern ASR and TTS pipeline walks this ladder, and the first rung…
- Spectrograms, Mel Scale & Audio FeaturesNeural nets do not consume raw waveforms well. They consume spectrograms. They consume mel spectrograms even better. Every ASR, TTS, and audio classifier in 2026 lives or dies b…
- Audio ClassificationEverything from "dog barking vs siren" to "which language is this" is audio classification. The features are mels. The architecture moves each decade. The evaluation stays AUC, …
- Speech Recognition (ASR)Speech recognition is audio classification at every timestep, glued together by a sequence model that knows English and silence. CTC, RNN-T, and attention are the three ways to …
- Whisper: Architecture & Fine-TuningWhisper is a 30-second-window transformer encoder-decoder, trained on 680k hours of multilingual weakly-supervised audio-text pairs. One architecture, multiple tasks, robust acr…
- Speaker Recognition & VerificationASR asks "what did they say?" Speaker recognition asks "who said it?" The math looks the same — embeddings plus cosine — but every production decision hinges on a single EER num…
- Text-to-Speech (TTS)ASR inverts speech to text; TTS inverts text to speech. The 2026 stack is three parts: text → tokens, tokens → mel, mel → waveform. Each part has a default model that fits in a …
- Voice Cloning & Voice ConversionVoice cloning reads your text in someone else's voice. Voice conversion rewrites your voice into someone else's while preserving what you said. Both hang on the same decompositi…
- Music Generation2026 music generation: Suno v5 and Udio v4 dominate commercial; MusicGen, Stable Audio Open, and ACE-Step lead open-source. The technical problem is mostly solved. The legal pro…
- Audio-Language Models2026 audio-language models reason over speech + environmental sound + music. Qwen2.5-Omni-7B matches GPT-4o Audio on MMAU-Pro. Audio Flamingo Next beats Gemini 2.5 Pro on LongAu…
- Real-Time Audio ProcessingBatch pipelines process a file. Real-time pipelines process the next 20 milliseconds before the next 20 arrive. Every conversational AI, broadcast studio, and telephony bot live…
- Build a Voice Assistant PipelineEverything from lessons 01-11, stitched together. Build a voice assistant that listens, reasons, and talks back. In 2026 that is a solved engineering problem, not a research pro…
- Neural Audio Codecs — EnCodec, SNAC, Mimi, DAC2026 audio generation is almost all tokens. EnCodec, SNAC, Mimi, and DAC turn continuous waveforms into discrete sequences that a transformer can predict. The semantic-vs-acoust…
- Voice Activity Detection & Turn-TakingEvery voice agent lives or dies on two decisions: is the user speaking now, and are they done? VAD answers the first. Turn-detection (VAD + silence-hangover + semantic endpoint …
- Streaming Speech-to-Speech — Moshi, Hibiki2024-2026 redefined voice AI. Moshi ships a single model that listens and speaks simultaneously at 200 ms latency. Hibiki does speech-to-speech translation chunk-by-chunk. Both …
- Voice Anti-Spoofing & Audio WatermarkingVoice cloning shipped faster than defenses. 2026 production voice systems need two things: a detector (AASIST, RawNet2) that classifies real vs fake speech, and a watermark (Aud…
- Audio Evaluation — WER, MOS, MMAU, LeaderboardsYou cannot ship what you cannot measure. This lesson names the 2026 metrics for every audio task: ASR (WER, CER, RTFx), TTS (MOS, UTMOS, SECS, WER-on-ASR-round-trip), audio-lang…
07Transformers Deep Dive16
- Why Transformers: The Problems with RNNsRNNs process tokens one at a time. Transformers process all tokens at once. That single architectural bet changed every scaling curve in deep learning after 2017.
- Self-Attention from ScratchAttention is a lookup table where every word asks "who matters to me?" - and learns the answer.
- Multi-Head AttentionOne attention head learns one relation at a time. Eight heads learn eight. Heads are free. Take more of them.
- Positional Encoding: Sinusoidal, RoPE, ALiBiAttention is permutation-invariant. "The cat sat on the mat" and "mat the on sat cat the" produce the same output without positional signal. Three algorithms fix it — each with …
- The Full Transformer: Encoder + DecoderAttention is the star. Everything else — residuals, normalization, feed-forward, cross-attention — is the scaffolding that lets you stack it deep.
- BERT — Masked Language ModelingGPT predicts the next word. BERT predicts a missing word. One sentence of difference — and half a decade of everything embedding-shaped.
- GPT — Causal Language ModelingBERT sees both sides. GPT sees only the past. The triangle mask is the most consequential single line of code in modern AI.
- T5, BART — Encoder-Decoder ModelsEncoders understand. Decoders generate. Put them back together and you get a model built for input → output tasks: translate, summarize, rewrite, transcribe.
- Vision Transformers (ViT)An image is a grid of patches. A sentence is a grid of tokens. The same transformer eats both.
- Audio Transformers — Whisper ArchitectureAudio is an image of frequency over time. Whisper is a ViT that eats mel spectrograms and speaks back.
- Mixture of Experts (MoE)A dense 70B transformer activates every parameter for every token. A 671B MoE activates only 37B per token and beats it on every benchmark. Sparsity is the most important scalin…
- KV Cache, Flash Attention & Inference OptimizationTraining is parallel and FLOP-bound. Inference is serial and memory-bound. Different bottleneck, different tricks.
- Scaling LawsThe 2020 Kaplan paper said: bigger model, lower loss. The 2022 Hoffmann paper said: you were under-training. Compute goes into two buckets — parameters and tokens — and the spli…
- Build a Transformer from ScratchThirteen lessons. One model. No shortcuts.
- Attention Variants — Sliding Window, Sparse, DifferentialFull attention is a circle. Every token sees every token, and memory pays the price. Three variants bend the shape of the circle and recover half the cost.
- Speculative Decoding — Draft, Verify, RepeatAutoregressive decoding is serial. Each token waits for the previous one. Speculative decoding breaks the chain: a cheap model drafts N tokens, the expensive model verifies all …
08Generative AI15
- Generative Models: Taxonomy & HistoryEvery image model, text model, video model, and 3D model fits in one of five buckets. Pick the wrong bucket and you will fight the math for weeks. Pick the right one and the fie…
- Autoencoders & VAEA plain autoencoder compresses then reconstructs. It memorizes. It does not generate. Add one trick — force the code to look Gaussian — and you get a sampler. That single trick,…
- GANs: Generator vs DiscriminatorGoodfellow's trick in 2014 was to skip density entirely. Two networks. One makes fakes. One catches them. They fight until the fakes are indistinguishable from real. It shouldn'…
- Conditional GANs & Pix2PixThe first big unlock of 2014-2017 was controlling what a GAN makes. Attach a label, or an image, or a sentence. Pix2Pix did the image version and it still beats every generic te…
- StyleGANMost generators stir $z$ into every layer at the same time. StyleGAN split it apart: first map $z$ to an intermediate $w$, then inject $w$ at every resolution level through Ad…
- Diffusion Models — DDPM from ScratchHo, Jain, Abbeel (2020) gave the field a recipe it could not quit. Destroy the data with noise over a thousand small steps. Train one neural net to predict the noise. Reverse th…
- Latent Diffusion & Stable DiffusionPixel-space diffusion on 512×512 images is a computational war crime. Rombach et al. (2022) noticed that you do not need all 786k dimensions to generate an image — you need enou…
- ControlNet, LoRA & ConditioningText alone is a clumsy control signal. ControlNet lets you clone a pretrained diffusion model and steer it with a depth map, pose skeleton, scribble, or edge image. LoRA lets yo…
- Inpainting, Outpainting & EditingText-to-image makes new things. Inpainting fixes old ones. In production, 70% of billable image work is editing — swap a background, remove a logo, extend the canvas, regenerate…
- Video GenerationAn image is a 2-D tensor. A video is a 3-D one. The theory is the same; the compute is 10-100x harder. OpenAI's Sora (Feb 2024) proved it was possible. By 2026 Veo 2, Kling 1.5,…
- Audio GenerationAudio is a 1-D signal at 16-48 kHz. A five-second clip is 80-240k samples. No transformer attends to that sequence directly. The solution for every production audio model in 202…
- 3D Generation3D is the modality where 2D-to-3D leverage is strongest. The 2023 breakthrough was 3D Gaussian Splatting. The 2024-2026 generative push layers multi-view diffusion + 3D reconstr…
- Flow Matching & Rectified FlowsDiffusion models take 20-50 sampling steps because they walk a curved path from noise to data. Flow matching (Lipman et al., 2023) and rectified flow (Liu et al., 2022) trained …
- Evaluation: FID, CLIP ScoreEvery generative model leaderboard cites FID, CLIP score, and a win rate from a human-preference arena. Each number has a failure mode a determined researcher can game. If you d…
- Visual Autoregressive Modeling (VAR): Next-Scale PredictionDiffusion models sample iteratively in time (denoising steps). VAR samples iteratively in scale — it predicts a 1x1 token, then 2x2, then 4x4, up to the final resolution, each s…
09Reinforcement Learning12
- MDPs, States, Actions & RewardsA Markov Decision Process is five things: states, actions, transitions, rewards, a discount. Everything in RL — Q-learning, PPO, DPO, GRPO — optimizes over this shape. Learn it …
- Dynamic ProgrammingDynamic programming is RL with cheating. You already know the transition and reward functions; you just iterate the Bellman equation until $V$ or $\pi$ stops moving. It is the b…
- Monte Carlo MethodsDynamic programming needs a model. Monte Carlo needs nothing but episodes. Run the policy, watch the returns, average them. The simplest idea in RL — and the one that unlocks ev…
- Q-Learning, SARSAMonte Carlo waits until the episode ends. TD updates after every step by bootstrapping the next value estimate. Q-learning is off-policy and optimistic; SARSA is on-policy and c…
- Deep Q-Networks (DQN)2013: Mnih trained one Q-learning network on raw pixels, beat every classical RL agent on seven Atari games. 2015: extended to 49 games, published in Nature, sparked the deep-RL…
- Policy Gradients — REINFORCEStop estimating value. Parameterize the policy directly, compute the gradient of expected return, step uphill. Williams (1992) wrote it in one theorem. It is why PPO, GRPO, and …
- Actor-Critic — A2C, A3CREINFORCE is noisy. Add a critic that learns $\hat{V}(s)$, subtract it from the return, and you get an advantage that has the same expectation but far lower variance. That is ac…
- PPOA2C throws away each rollout after one update. PPO wraps the policy gradient in a clipped importance ratio so you can do 10+ epochs on the same data without the policy exploding…
- Reward Modeling & RLHFHumans cannot write a reward function for "good assistant response," but they can compare two responses and pick the better one. Fit a reward model to those comparisons, then RL…
- Multi-Agent RLSingle-agent RL assumes the environment is stationary. Put two learning agents in the same world and that assumption breaks: each agent is part of the other's environment, and b…
- Sim-to-Real TransferA policy trained in a simulator that fails on hardware is a policy that memorized the simulator. Domain randomization, domain adaptation, and system identification are the three…
- RL for Games1992: TD-Gammon beat human champions at backgammon with pure TD. 2016: AlphaGo beat Lee Sedol. 2017: AlphaZero dominated chess, shogi, and Go from scratch. 2025: DeepSeek-R1 pro…
10LLMs from Scratch24
- Tokenizers: BPE, WordPiece, SentencePieceYour LLM does not read English. It reads integers. The tokenizer decides whether those integers carry meaning or waste it.
- Building a Tokenizer from ScratchLesson 01 gave you a toy. This lesson gives you a weapon.
- Data Pipelines for Pre-TrainingThe model is a mirror. It reflects whatever data you feed it. Feed it garbage, it reflects garbage with perfect fluency.
- Pre-Training a Mini GPT (124M)GPT-2 Small has 124 million parameters. That's 12 transformer layers, 12 attention heads, and 768-dimensional embeddings. You can train it from scratch on a single GPU in a few …
- Distributed Training, FSDP, DeepSpeedYour 124M model trained on one GPU. Now try 7 billion parameters. The model doesn't fit in memory. The data takes weeks on a single machine. Distributed training isn't optional …
- Instruction Tuning — SFTA base model predicts the next token. That's it. It doesn't follow instructions, answer questions, or refuse harmful requests. SFT is the bridge between a token predictor and a …
- RLHF — Reward Model + PPOSFT teaches the model to follow instructions. But it doesn't teach the model which response is BETTER. Two grammatically correct, factually accurate answers can differ enormousl…
- DPO — Direct Preference OptimizationRLHF works. It also requires training three models (SFT, reward model, policy), managing PPO's instability, and tuning a KL penalty. DPO asks: what if you could skip all of that…
- Constitutional AI & Self-ImprovementRLHF needs humans in the loop. Constitutional AI replaces most of them with the model itself. Write a list of principles, have the model critique its own outputs against those p…
- Evaluation — Benchmarks, EvalsGoodhart's Law: when a measure becomes a target, it ceases to be a good measure. Every frontier lab games benchmarks. MMLU scores go up while models still can't reliably count t…
- Quantization: INT8, GPTQ, AWQ, GGUFA 70B model in FP16 needs 140GB. Two A100s just for weights. Quantize to FP8: one 80GB GPU. INT4: a MacBook.
- Inference OptimizationTwo phases define LLM inference. Prefill processes your prompt in parallel -- compute-bound. Decode generates tokens one at a time -- memory-bound. Every optimization targets on…
- Building a Complete LLM PipelineEverything from Lessons 01 to 12 is one stage of one pipeline. This lesson is the scaffold that turns those stages into a single end-to-end run: tokenize, pre-train, scale, SFT,…
- Open Models: Architecture WalkthroughsYou built a GPT-2 Small from scratch in Lesson 04. Frontier open models in 2026 are the same family with five or six concrete changes. RMSNorm instead of LayerNorm. SwiGLU inste…
- Speculative Decoding and EAGLE-3Phase 7 · Lesson 16 proved the math: the Leviathan rejection rule preserves the verifier's distribution exactly. This lesson is the training-stack view of 2026 production specul…
- Differential Attention (V2)Softmax attention spreads a small amount of probability over every non-matching token. Over 100k tokens that noise adds up and drowns the signal. Differential Transformer (Ye et…
- Native Sparse Attention (DeepSeek NSA)At 64k tokens, attention eats 70-80% of decode latency. Every open-model lab has a plan to fix it. DeepSeek's NSA (ACL 2025 best paper) is the one that stuck: three parallel att…
- Multi-Token Prediction (MTP)Every autoregressive LLM from GPT-2 to Llama 3 trains on one loss per position: predict the next token. DeepSeek-V3 added a second loss per position: predict the token after tha…
- DualPipe ParallelismDeepSeek-V3 was trained on 2,048 H800 GPUs with MoE experts scattered across nodes. Cross-node expert all-to-all communication cost 1 GPU-hour of comm for every 1 GPU-hour of co…
- DeepSeek-V3 Architecture WalkthroughPhase 10 · Lesson 14 named the six architectural knobs every open model turns. DeepSeek-V3 (December 2024, 671B parameters total, 37B active) turns all six and adds four more: M…
- Jamba — Hybrid SSM-TransformerState space models (SSMs) and transformers want different things. Transformers buy quality via attention at quadratic cost. SSMs buy linear-time inference and constant memory vi…
- Async and Hogwild! InferenceSpeculative decoding (Phase 10 · 15) parallelizes tokens within one sequence. Multi-agent frameworks parallelize across whole sequences but force explicit coordination (voting, …
- Speculative Decoding and EAGLEA frontier LLM generating one token requires a full forward pass over billions of parameters. That forward pass is massively over-provisioned: most of the time a much smaller mo…
- Gradient Checkpointing and Activation RecomputationBackprop keeps every intermediate activation. At 70B parameters and 128K context that is 3 TB of activations per rank. Checkpointing trades FLOPs for memory: recompute instead o…
11LLM Engineering17
- Prompt Engineering: Techniques & PatternsMost people write prompts like they are texting a friend. Then they wonder why a 200-billion parameter model gives mediocre answers. Prompt engineering is not about tricks. It i…
- Few-Shot, CoT, Tree-of-ThoughtTelling a model what to do is prompting. Showing it how to think is engineering. The gap between 78% and 91% accuracy on the same model, same task, same data is not a better mod…
- Structured OutputsYour LLM returns a string. Your application needs JSON. That gap has crashed more production systems than any model hallucination. Structured output is the bridge between natura…
- Embeddings & Vector RepresentationsText is discrete. Math is continuous. Every time you ask an LLM to find "similar" documents, compare meanings, or search beyond keywords, you're relying on a bridge between thes…
- Context EngineeringPrompt engineering is a subset. Context engineering is the whole game. A prompt is a string you type. Context is everything that goes into the model's window: system instruction…
- RAG: Retrieval-Augmented GenerationYour LLM knows everything up to its training cutoff. It knows nothing about your company's docs, your codebase, or last week's meeting notes. RAG solves this by retrieving relev…
- Advanced RAG: Chunking, RerankingBasic RAG retrieves the top-k most similar chunks. That works for simple questions. It falls apart for multi-hop reasoning, ambiguous queries, and large corpora. Advanced RAG is…
- Fine-Tuning with LoRA & QLoRAFull fine-tuning a 7B model requires 56GB of VRAM. You don't have that. Neither do most companies. LoRA lets you fine-tune the same model in 6GB by training less than 1% of the …
- Function Calling & Tool UseLLMs cannot do anything. They generate text. That is the entire capability. They cannot check the weather, query a database, send an email, run code, or read a file. Every "AI a…
- Evaluation & TestingYou would never deploy a web app without tests. You would never ship a database migration without a rollback plan. But right now, most teams ship LLM applications by reading 10 …
- Caching, Rate Limiting & CostMost AI startups do not die from bad models. They die from bad unit economics. A single GPT-4o call costs fractions of a cent. Ten thousand users making ten calls per day costs …
- Guardrails & SafetyYour LLM application will be attacked. Not might. Will. The first prompt injection attempt against your production system will come within 48 hours of launch. The question is no…
- Building a Production LLM AppYou have built prompts, embeddings, RAG pipelines, function calling, caching layers, and guardrails. Separately. In isolation. Like practicing guitar scales without ever playing…
- Model Context Protocol (MCP)MCP gives an AI host one protocol for discovering and invoking tools, resources, and prompts. The 2026-07-28 revision makes that protocol stateless: capability and version conte…
- Prompt Caching & Context CachingYour system prompt is 4,000 tokens. Your RAG context is 20,000 tokens. You send both with every request. You also pay for both — every time. Prompt caching lets the provider kee…
- Agent State Machines — Graphs, Nodes, CheckpointsA ReAct loop written by hand is a while True. The same loop written as an explicit graph is something you can checkpoint, interrupt, branch, and time-travel through. The agent…
- Agent Framework TradeoffsEvery framework sells the same demo (research agent builds a report) and hides the same bug (state schema fights with the orchestration layer). Pick the framework whose abstract…
12Multimodal AI25
- Vision Transformers and the Patch-Token PrimitiveBefore anything multimodal, an image has to become a sequence of tokens a transformer can eat. The 2020 ViT paper answered this with 16x16 pixel patches, a linear projection, an…
- CLIP and Contrastive Vision-Language PretrainingOpenAI's CLIP (2021) proved a single idea big enough to power the next five years: align an image encoder and a text encoder in the same vector space using only noisy web image-…
- BLIP-2 Q-Former as Modality BridgeCLIP aligns image and text but cannot generate captions, answer questions, or hold a conversation. BLIP-2 (Salesforce, 2023) solved that with a small trainable bridge: 32 learna…
- Flamingo and Gated Cross-AttentionDeepMind's Flamingo (2022) did two things before anyone else. It showed a single model could process arbitrarily interleaved sequences of images, videos, and text. And it showed…
- LLaVA and Visual Instruction TuningLLaVA (April 2023) is the most copied multimodal architecture on the planet. It replaced BLIP-2's Q-Former with a 2-layer MLP, replaced Flamingo's gated cross-attention with nai…
- Any-Resolution Vision — Patch-n'-Pack and NaFlexReal images are not 224x224 squares. A receipt is 1:3, a chart is 16:9, a medical scan might be 4096x4096, a mobile screenshot is 9:19.5. The pre-2024 VLM answer — resize everyt…
- Open-Weight VLM Recipes: What Actually MattersThe 2024-2026 open-weight VLM literature is a forest of ablation tables. Apple's MM1 tested 13 combinations of image encoder, connector, and data mix. Allen AI's Molmo proved de…
- LLaVA-OneVision: Single, Multi, VideoBefore LLaVA-OneVision (Li et al., August 2024) the open-VLM world had separate lineages: LLaVA-1.5 for single images, multi-image models like Mantis and VILA, video models like…
- Qwen-VL Family and Dynamic-FPS VideoThe Qwen-VL family — Qwen-VL (2023), Qwen2-VL (2024), Qwen2.5-VL (2025), Qwen3-VL (2025) — is the most influential open vision-language model lineage in 2026. Each generation ma…
- InternVL3 Native Multimodal PretrainingEvery open VLM before InternVL3 followed the same three-step recipe: take a text LLM trained on trillions of text tokens, bolt on a vision encoder, then fine-tune the seams. Thi…
- Chameleon Early-Fusion Token-OnlyEvery VLM we have seen so far keeps images and text separate. Visual tokens come from a vision encoder, flow into a projector, then meet text inside the LLM. The vision and text…
- Emu3 Next-Token Prediction for GenerationBAAI's Emu3 (Wang et al., September 2024) is the 2024 result that should have ended the diffusion-versus-autoregressive debate. A single Llama-style decoder-only transformer, tr…
- Transfusion Autoregressive + DiffusionChameleon and Emu3 bet everything on discrete tokens. They work, but the quantization bottleneck is visible — the image quality plateaus below continuous-space diffusion models.…
- Show-o Discrete-Diffusion UnifiedTransfusion mixes continuous and discrete representations. Show-o (Xie et al., August 2024) goes the other way: text tokens use causal next-token prediction, image tokens use ma…
- Janus-Pro Decoupled EncodersUnified multimodal models have an unavoidable tension. Understanding wants semantic features — SigLIP or DINOv2 output vectors rich with concept-level information. Generation wa…
- MIO Any-to-Any StreamingGPT-4o ships a product most open models cannot replicate: an agent that hears voice, sees video, and speaks back in real time. The open-ecosystem answer by late 2024 was MIO (Wa…
- Video-Language Temporal GroundingVideo is not a stack of photos. A 5-second clip has causal ordering, action verbs, and event timing that an image model cannot represent. Video-LLaMA (Zhang et al., June 2023) s…
- Long-Video at Million-Token ContextA 1-hour 4K video at 24 FPS, patched and embedded, produces on the order of 60 million tokens. A 2-hour podcast episode transcribed is 30,000 tokens. A full Blu-ray feature film…
- Audio-Language Models: Whisper to AF3Whisper (Radford et al., December 2022) settled speech recognition — 680k hours of weakly-supervised multilingual speech, a simple encoder-decoder transformer, a benchmark that …
- Omni Models: Thinker-Talker StreamingGPT-4o's product demo in May 2024 was disruptive not because of the underlying model but because of the product shape — a voice interface where you talk, the model sees what the…
- Embodied VLAs: RT-2, OpenVLA, π0, GR00TThe first time a model read a recipe off a website and executed it in a kitchen robot was RT-2 (Google DeepMind, July 2023). RT-2 discretized actions as text tokens, co-fine-tun…
- Document and Diagram UnderstandingDocuments are not photos. A PDF, scientific paper, invoice, or handwritten form has layout, tables, diagrams, footnotes, headers, and semantic structure that plain image underst…
- ColPali Vision-Native Document RAGTraditional RAG parses PDFs into text, splits into chunks, embeds chunks, stores vectors. Every step loses signal: OCR drops chart data, chunking breaks table rows, text embeddi…
- Multimodal RAG and Cross-Modal RetrievalVision-native document RAG is one slice. Production multimodal RAG goes wider — retrieving across text, images, audio, and video for workflows like trip planning ("find me a qui…
- Multimodal Agents and Computer-Use (Capstone)The 2026 frontier product is a multimodal agent that reads screenshots, clicks buttons, navigates web UIs, fills forms, and completes workflows end-to-end. SeeClick and CogAgent…
13Tools & Protocols45
- The Tool InterfaceA language model produces tokens. A program takes actions. The gap between those two is the tool interface: a contract that lets the model request an action and the host execute…
- Function Calling Deep DiveThe three frontier providers converged on the same tool-call loop in 2024 and then diverged on everything else. OpenAI uses tools and toolcalls. Anthropic uses tooluse a…
- Parallel and Streaming Tool CallsThree independent weather lookups serialized is three round trips. Run them in parallel and total time collapses to the slowest single call. Every frontier provider now emits mu…
- Structured Output"Ask the model nicely to return JSON" fails 5 to 15 percent of the time, even on frontier models. Structured outputs close that gap with constrained decoding: the model is liter…
- Tool Schema DesignA correct tool fails silently when the model cannot tell when to use it. Naming, descriptions, and parameter shapes drive 10 to 20 percentage-point swings in tool-selection accu…
- MCP Fundamentals: Stateless Requests and JSON-RPCModern MCP has no handshake and no protocol session. Each request must carry enough metadata to be understood, authorized, routed, and retried on its own.
- Building an MCP Server: Stateless Python and TypeScriptA modern MCP server does not remember a handshake. It validates the metadata on every request, runs one handler, and returns one typed result.
- Building an MCP Client: Discovery, Routing, and Dual-Era FallbackA modern MCP client repeats its contract on every request. Its hardest compatibility decision is knowing when an old server is truly old and when a modern server is reporting a …
- MCP Transports: stdio and Stateless Streamable HTTPTransport carries MCP messages. It does not supply missing protocol state. In 2026-07-28, local stdio and remote Streamable HTTP both carry self-describing requests.
- MCP Resources and Prompts: Addressable Context for Stateless ServersTools perform operations. Resources expose addressable content. Prompts package user-selected message templates. A good MCP server keeps those contracts separate and predictable.
- MCP Model Input: Sampling Migration and Stateless MRTRMCP 2026-07-28 deprecates Sampling for new designs and removes the server-to-client request channel. If an existing workflow still needs the client's model, the server returns a…
- Explicit Scope and Stateless ElicitationRoots are deprecated in MCP 2026-07-28 and were never a security sandbox. Put scope in visible tool arguments or resource URIs, authorize it on the server, and use MRTR when a t…
- MCP Tasks Extension: Durable Work on a Stateless CoreStateless MCP does not mean every operation must finish in one request. The official Tasks extension gives long-running work an explicit durable handle. A server can return that…
- MCP Apps on the Stateless ProtocolAn interactive result is still an MCP tool and resource exchange. The 2026-07-28 core makes that exchange self-contained, while the Apps extension adds the sandboxed browser sur…
- MCP Security: Poisoned Metadata, Routing, and MRTR StateStateless does not mean trustless. It means every request exposes the evidence a server and gateway need to validate the call independently.
- MCP Authorization: CIMD, Issuer Binding, PKCE, and Step-UpA remote MCP request is stateless, but its authorization is not anonymous. Bind every credential to the issuer that created it and every token to the resource that receives it.
- Stateless MCP Gateways and Registry AdmissionA gateway should make every route explicit. The 2026-07-28 protocol gives it method, name, version, capability, identity, cache, and trace boundaries without a transport session.
- MCP Auth in Production: Issuer-Bound Enrollment and TokensLesson 16 built the OAuth 2.1 state machine. This lesson hardens its production boundaries for MCP 2026-07-28: Client ID Metadata Documents first, deprecated dynamic registratio…
- A2A ProtocolMCP is agent-to-tool. A2A (Agent2Agent) is agent-to-agent — an open protocol for letting opaque agents built on different frameworks collaborate. Released by Google in April 202…
- OpenTelemetry GenAIAn agent calls five tools, three MCP servers, and two sub-agents. You need one trace across all of it. The OpenTelemetry GenAI semantic conventions (stable attributes in v1.37 a…
- LLM Routing LayerProvider lock-in is expensive. Different tool-calling workloads suit different models. Routing gateways give one API surface, retries, failover, cost tracking, and guardrails. T…
- Agent Skills: Portable Contract and Runtime BoundaryA skill is not a long prompt with a better filename. It is a discoverable package of instructions, resources, and executable helpers that enters an agent's context through a run…
- Capstone: Stateless Tool EcosystemA production agent system is a set of boundaries, not a pile of features. This capstone separates a readable in-process simulation from the protocol clients, authorization serve…
- Skill Discovery and Progressive DisclosureA skill becomes useful before its body is loaded. Its name and description earn a place in the catalog; its deeper files earn context only when the task reaches them.
- Skill Invocation and RoutingInvocation is an authority decision followed by a relevance decision. A good description helps the model choose; a good policy decides whether that choice is allowed.
- Skill Permissions, Sandboxes, and TrustA skill can suggest an action. Only the host can authorize it, only an isolation boundary can contain it, and only verification can tell you whether it worked.
- Skill Evals, Packaging, and PortabilityA skill is finished when its package survives linting, routes on the right requests, improves a measured task, stays inside policy, and degrades honestly on another host.
- MCP Tool Contracts and ContentA tool is safe to automate only when discovery, arguments, results, pagination, and transport metadata agree on one contract.
- MCP Reliability, Cancellation, and Flow ControlA request ID correlates a message. It does not make a side effect safe, stop a worker, or protect a stream from a slow consumer.
- MCP Registry Supply Chain: Admission, Drift, and RollbackA registry entry tells you what a publisher declared. Production admission proves what you fetched, what you observed, what you approved, and what you can safely restore.
- MCP Conformance Engineering: Versioning, Evidence, and OperationsA server is not conformant because its happy path worked through one SDK. Conformance lives at the wire, at version boundaries, through intermediaries, and during rollback.
- Program Anatomy: An ELF Reader From ScratchA compiled program is a set of tables that point at each other. A reader you wrote gives output you can check byte by byte.
- Disassembly and Control Flow: From Bytes to a Graph You Can CheckA disassembly listing is a claim about which bytes are instructions, and this lesson builds the decoder and graph that check the claim.
- Lifting to Pseudocode: IR, SSA, and Structuring From ScratchDecompiler output is a claim with a hidden derivation. When you build the derivation yourself, every line of that output becomes a thing you can check.
- Evidence, Confidence, and Unknowns in Binary AnalysisA finding about a compiled program is a record with a hash, a confidence, an authority, and a list of what it cannot show.
- Rebuild and Prove Equal: Differential Tests, Byte Comparison, and the Evidence LoopPassing your tests proves agreement on your tests, so equality needs a grid that reaches every edge and bytes that match after relocation masking.
- The Reverse Engineering Landscape: History, Tool Families, and How a Decompiler Is BuiltFive tools read the same object and give four addresses, three block counts, and two answers for one switch, and this lesson builds the harness that shows which is which.
- Calling Conventions and Stack Frames: System V, Windows x64, and AArch64A disassembly shows which registers a function reads. Only the ABI says what those registers mean, and the ABI is chosen by the object header, so this lesson reads the header fi…
- Compiler Idioms: What Optimization Does to Your Code and How to Read It BackAn optimizing compiler replaces source constructs with cheaper instruction shapes. Each shape has a derivation, and this lesson builds the recognizer that runs the derivation ba…
- Linking, Loading, and Stripped Binaries: PLT, GOT, Imports, Fixups, and Function IdentificationA linked program calls functions it does not contain. This lesson reads the tables the link editor wrote for those calls in three formats, follows one call to the slot the loade…
- Recovering Data and Types: Structs, Arrays, C++ Objects, and DWARFA decompiler prints a-balance when it has a type table and (int )(param1 + 4) when it does not. This lesson builds the table from the accesses, reads the real one from D…
- Dynamic Analysis of Your Own Program: Debuggers, Traces, and Confirming Static ClaimsA breakpoint hit is an observation about one run of one build. This lesson builds the harness that turns those observations into confirmed, refuted, and not-observed verdicts on…
- Beyond Native Code: Python, JVM, .NET, and WebAssembly BytecodeA bytecode file is a program plus the compiler's notes about it, and this lesson builds the readers that show which notes each container keeps.
- Binary Diffing and Symbolic Execution: Matching Functions and Solving for InputsA match between two functions is a claim made by one signature with one quality, and a solved input is one model of one path condition; this lesson builds both and checks them a…
- AI-Assisted Reverse Engineering: LLM Decompilers, Analysis Agents, and Ground TruthA model's reconstruction is a claim with a report attached, and this lesson builds the harness that scores both against bytes, runs, and DWARF you own.
14Agent Engineering54
- The Agent LoopEvery agent in 2026 is a variant of the ReAct loop from 2022 — Claude Code, Cursor, Devin, Operator included. Reasoning tokens interleave with tool calls and observations until …
- ReWOO and Plan-and-ExecuteReAct interleaves thought and action in one stream. ReWOO separates them: one big plan up front, then execute. 5x fewer tokens, +4% accuracy on HotpotQA, and you can distill the…
- Reflexion and Verbal Reinforcement LearningGradient-based RL needs thousands of trials and a GPU cluster to fix a failure mode. Reflexion (Shinn et al., NeurIPS 2023) does it in natural language: after each failed trial,…
- Tree of Thoughts and LATSA single chain-of-thought trajectory has no room to backtrack. ToT (Yao et al., 2023) turns reasoning into a tree with self-evaluation on each node. LATS (Zhou et al., 2024) uni…
- Self-Refine and CRITICSelf-Refine (Madaan et al., 2023) uses one LLM in three roles — generate, feedback, refine — in a loop. Average gain: +20 absolute on 7 tasks. CRITIC (Gou et al., 2023) hardens …
- Tool Use and Function CallingToolformer (Schick et al., 2023) started self-supervised tool annotation. Berkeley Function Calling Leaderboard V4 (Patil et al., 2025) sets the 2026 bar: 40% agentic, 30% multi…
- Agent Memory — Virtual Context and Memory PagingContext windows are finite. Conversations, documents, and tool traces are not. The fix is OS virtual memory restated — main context is RAM, external store is disk, the agent pag…
- Memory Blocks and Sleep-Time ComputeDiscrete functional memory blocks the model can edit directly, and a sleep-time agent that consolidates memory asynchronously while the primary agent is idle. These two ideas ar…
- Hybrid Memory — Vector + Graph + KVHybrid memory runs three stores in parallel — vector for semantic similarity, KV for fast fact lookup, graph for entity-relationship reasoning — with a scoring layer that fuses …
- Skill Libraries and Lifelong Learning (Voyager)Voyager (Wang et al., TMLR 2024) treats executable code as a skill. Skills are named, retrievable, composable, and refined by environment feedback. This is the reference archite…
- Planning with HTN and Evolutionary SearchSymbolic planning handles the cases where the plan is provably correct. Evolutionary code search handles the cases where the fitness function is machine-checkable. ChatHTN (2025…
- Anthropic's Workflow PatternsSchluntz and Zhang (Anthropic, Dec 2024) distinguish workflows (predefined paths) from agents (dynamic tool-use). Five workflow patterns cover most cases. Start with direct API …
- Stateful Graph Orchestration — Durable Execution and CheckpointsAgent is a state machine; nodes are functions; edges are transitions; state is checkpointed after each node. Resume from any failure at the last successful checkpoint. LangGraph…
- The Actor Model for AgentsAgents as actors: async message exchange, event-driven handlers, fault isolation, natural concurrency. AutoGen v0.4 (Microsoft Research, Jan 2025) redesigned agent orchestration…
- Role-Based Agent Teams — Roles, Tasks, ProcessesFour primitives: Agent, Task, Crew, Process. Two top-level shapes: Crews (autonomous, role-based collaboration) and Flows (event-driven, deterministic). CrewAI is the 2026 refer…
- OpenAI Agents SDK — Handoffs, Guardrails, TracingOpenAI Agents SDK is the lightweight multi-agent framework built on the Responses API. Five primitives: Agent, Handoff, Guardrail, Session, Tracing. Handoffs are tools named tr…
- The Harness as a Library — Subagents and Session StoreA harness you can import: built-in tools, subagents for context isolation, hooks, W3C trace propagation, session persistence. The Claude Agent SDK is the reference example — the…
- Production Agent RuntimesA production agent runtime optimizes what prototyping frameworks ignore: instantiation cost, typed workflow surfaces, and a serving-ready backend. The 2026 pairing: Agno (Python…
- Benchmarks — SWE-bench, GAIA, AgentBenchThree benchmarks anchor agent evaluation in 2026. SWE-bench tests code patching. GAIA tests generalist tool use. AgentBench tests multi-environment reasoning. Know their composi…
- Benchmarks — WebArena and OSWorldWebArena tests web-agent capability across four self-hosted apps. OSWorld tests desktop-agent capability across Ubuntu, Windows, macOS. At release (2023–2024) both showed a big …
- Computer Use — Claude, OpenAI CUA, GeminiThree production computer-use models in 2026. All three are vision-based. All three treat screenshots, DOM text, and tool outputs as untrusted input. Only direct user instructio…
- Voice Agents — Pipecat and LiveKitVoice agents are a first-class production category in 2026. Pipecat gives you a Python frame-based pipeline (VAD → STT → LLM → TTS → transport). LiveKit Agents bridges AI models…
- OpenTelemetry GenAI Semantic ConventionsOpenTelemetry's GenAI SIG (launched April 2024) defines the standard schema for agent telemetry. Span names, attributes, and content-capture rules converge across vendors so age…
- Agent Observability — Langfuse, Phoenix, OpikThree self-hostable agent observability platforms dominate 2026. Langfuse (MIT) — 6M+ installs/month, tracing + prompt management + evals + session replay. Arize Phoenix (Elasti…
- Multi-Agent Debate and CollaborationDu et al. (ICML 2024, "Society of Minds") run N model instances that independently propose answers, then iteratively critique each other over R rounds to converge. Improves fact…
- Failure Modes — Why Agents BreakMASFT (Berkeley, 2025) catalogs 14 multi-agent failure modes in 3 categories. Microsoft's Taxonomy documents how existing AI failures amplify in agentic settings. Industry field…
- Prompt Injection and the PVE DefenseGreshake et al. (AISec 2023) established indirect prompt injection as the defining agent security problem. Attacker plants instructions in data the agent retrieves; on ingest, t…
- Orchestration Patterns — Supervisor, Swarm, HierarchicalFour orchestration patterns recur across 2026 frameworks: supervisor-worker, swarm / peer-to-peer, hierarchical, debate. Anthropic's guidance: "It's about building the right sys…
- Production Runtimes — Queue, Event, CronProduction agents run on six runtime shapes: request-response, streaming, durable execution, queue-based background, event-driven, and scheduled. Pick the shape before you pick …
- Eval-Driven Agent DevelopmentAnthropic's guidance: "start with simple prompts, optimize them with comprehensive evaluation, and add multi-step agentic systems only when needed." Evaluation is not the last s…
- Agent Workbench: Why Capable Models Still FailA capable model is not enough. Reliable agents need a workbench: instructions, state, scope, feedback, verification, review, and handoff. Strip those away and even a frontier mo…
- The Minimal Agent WorkbenchThe smallest useful workbench is three files: a root instructions router, a state file, and a task board. Everything else is layered on top. If a repo cannot carry these three, …
- Agent Instructions as Executable ConstraintsInstructions written as prose are wishes. Instructions written as constraints are tests. The workbench turns each rule into something an agent can check at runtime and a reviewe…
- Repo Memory and Durable StateChat history is volatile. The repo is durable. The workbench stores agent state in versioned files so the next session, the next agent, and the next reviewer all read from the s…
- Initialization Scripts for AgentsEvery session that starts cold pays a tax. The agent reads the same files, retries the same probes, and rediscovers the same paths. An init script pays the tax once and writes t…
- Scope Contracts and Task BoundariesThe model does not know where the work ends. A scope contract is a per-task file that says where the work begins, where it ends, and how to roll back if it spills. The contract …
- Runtime Feedback LoopsAgents that do not see real command output guess. A feedback runner captures stdout, stderr, exit code, and timing into a structured record the next turn can read. Then the agen…
- Verification GatesThe agent does not get to mark its own work as done. A verification gate reads the scope contract, the feedback log, the rule report, and the diff, and answers a single question…
- Reviewer Agent: Separate Builder from MarkerThe agent that wrote the code cannot grade it. A reviewer is a second loop with a different system prompt, a different goal, and read-only access to everything the builder produ…
- Multi-Session HandoffThe session is going to end. The work is not. The handoff packet is the artifact that turns "the agent worked for an hour" into "the next session is productive in the first minu…
- The Workbench on a Real RepoEleven lessons of workbench surfaces are worth nothing if they do not survive contact with a real codebase. This lesson runs the same task twice on a small sample app: prompt-on…
- Capstone: Ship a Reusable Agent Workbench PackThe mini-track ends with a pack you drop into any repo. Eleven lessons of surfaces compressed into a directory you can cp -r and have an agent working reliably the next mornin…
- Frame the Task Before the Agent Writes CodeA coding agent can implement a clear task quickly. It can also implement an unclear task quickly. The speed is the same. The cost is not.
- Build an Evidence-Backed Execution PlanA plan is not a prettier to-do list. It is a dependency graph in which every change has a reason and every terminal node has proof.
- Delegate Agent Work with Isolation and Merge ContractsParallel agents save wall time only when the work is independent. Otherwise they convert one clear task into a coordination problem with a faster failure rate.
- Turn Every Agent Correction into a System ImprovementA correction that lives only in chat fixes one run. A correction promoted into a test, boundary, example, or tool improves every later run.
- Define the Outcome Before You Choose the OutputFast implementation increases the penalty for choosing the wrong problem. Shape the outcome first so speed points in the right direction.
- Discover the Workflow People Actually PerformRequirements are not waiting in a meeting to be collected. They are scattered across actions, workarounds, records, and disagreements.
- Map Assumptions and Resolve the Riskiest One FirstA roadmap hides uncertainty inside features. An assumption map exposes what must be true before those features deserve to exist.
- Choose the Smallest Slice That Can Change the DecisionSmall is useful only when it proves something important. A tiny build that cannot change the next decision is merely incomplete.
- Write Specifications That Preserve JudgmentA useful specification fixes invariants and evidence while leaving reversible implementation choices open. It is a decision boundary, not a screenplay.
- Design Success Metrics Before the Result ExistsMeasurement should answer a decision, not decorate a dashboard. Start with the goal, derive questions, then choose the smallest metrics that answer them.
- Choose Prototype, Pilot, or Production DeliberatelyThese are different learning environments, not levels of polish. Choose the stage that answers the current unknown with the least unnecessary consequence.
- Build a Feedback Ratchet with Ownership and RetirementShipping closes one build loop and opens the learning loop. Evidence must change the system or it becomes telemetry nobody owns.
15Autonomous Systems22
- From Chatbots to Long-Horizon Agents (METR)In 2023 a chatbot answered a question in one turn. In 2026 a frontier model routinely runs minutes to hours on a single task. METR's Time Horizon 1.1 benchmark (January 2026) pu…
- STaR, V-STaR, Quiet-STaR: Self-Taught ReasoningThe smallest possible self-improvement loop sits inside the rationale. A model generates a chain of thought, keeps the ones that land on correct answers, and fine-tunes on those…
- AlphaEvolve: Evolutionary Coding AgentsPair a frontier coding model with an evolutionary loop and a machine-checkable evaluator. Let the loop run long enough. It discovers a 4x4 complex-matrix multiplication procedur…
- Darwin Gödel Machine: Self-Modifying AgentsSchmidhuber's 2003 Godel Machine required a formal proof that any self-modification was beneficial before accepting it. That proof is impossible in practice. Darwin Godel Machin…
- AI Scientist v2: Workshop-Level ResearchSakana's AI Scientist v2 (Yamada et al., arXiv:2504.08066) runs the full research loop: hypothesis, code, experiments, figures, writeup, submission. It is the first system to ha…
- Automated Alignment Research (Anthropic AAR)Anthropic ran parallel teams of Claude Opus 4.6 Autonomous Alignment Researchers in independent sandboxes, coordinating via a shared forum whose logs live outside any sandbox (s…
- Recursive Self-Improvement: Capability vs AlignmentRecursive self-improvement (RSI) is no longer speculation. The ICLR 2026 RSI Workshop in Rio (April 23-27) framed it as an engineering problem with concrete tooling. Demis Hassa…
- Bounded Self-Improvement DesignsResearch has converged on four primitives for bounding a self-improvement loop. Formal invariants that must hold across every edit. Alignment anchors that cannot be modified. Mu…
- Autonomous Coding Agent Landscape (SWE-bench, CodeAct)SWE-bench Verified went from 4% to 80.9% in under three years. Same Claude Sonnet 4.5 scored 43.2% on SWE-agent v1 and 59.8% on Cline autonomous — the scaffolding around the mod…
- Permission Modes for Autonomous AgentsA permission ladder — graduated levels of autonomy from review-every-action to approve-everything — is how a harness governs what an autonomous agent may do without asking. Clau…
- Browser Agents and Indirect Prompt InjectionChatGPT agent (July 2025) merged Operator and deep research into one browser/terminal agent and set BrowseComp SOTA at 68.9%. OpenAI shut Operator down August 31, 2025 — consoli…
- Durable Execution for Long-Running AgentsProduction long-horizon agents do not run in while True. Every LLM call becomes an activity with checkpoint, retry, and replay. Temporal's OpenAI Agents SDK integration went G…
- Action Budgets, Iteration Caps, Cost GovernorsA mid-sized e-commerce agent's monthly LLM cost jumped from $1,200 to $4,800 after its team enabled the "order-tracking" skill. That is not a pricing bug. That is an agent that …
- Kill Switches, Circuit Breakers, Canary TokensA kill switch is a boolean held outside the agent's edit surface — a Redis key, a feature flag, a signed config — that disables the agent entirely. A circuit breaker is finer-gr…
- HITL: Propose-Then-CommitThe 2026 consensus on HITL is specific. It is not "the agent asks, the user clicks Approve." It is propose-then-commit: the proposed action is persisted to a durable store with …
- Checkpoints and RollbackEvery graph-state transition persists. When a worker crashes, its lease expires and another worker picks up at the latest checkpoint. Cloudflare Durable Objects hold state acros…
- Constitutional AI and Rule OverridesAnthropic's January 22, 2026 Claude Constitution runs 79 pages and is CC0. It moves from rule-based to reason-based alignment and establishes a four-tier priority hierarchy: (1)…
- Llama Guard and Input/Output ClassificationLlama Guard 3 (Meta, Llama-3.1-8B base, fine-tuned for content safety) classifies both LLM inputs and outputs against an MLCommons 13-hazard taxonomy across 8 languages. A 1B-IN…
- Anthropic Responsible Scaling Policy v3.0RSP v3.0 went into effect February 24, 2026, replacing the 2023 policy. Two-tier mitigation: what Anthropic will do unilaterally vs what is framed as an industry-wide recommenda…
- OpenAI Preparedness Framework and DeepMind FSFOpenAI Preparedness Framework v2 (April 2025) introduces Research Categories — Long-range Autonomy, Sandbagging, Autonomous Replication and Adaptation, Undermining Safeguards — …
- METR Time Horizons and External EvaluationMETR (ex-ARC Evals) is an independent 501(c)(3) since December 2023. Their Time Horizon 1.1 benchmark (January 2026) fits a logistic curve to task-success probability vs log(exp…
- CAIS, CAISI, and Societal-Scale RiskThe Center for AI Safety (CAIS, San Francisco, founded 2022 by Hendrycks and Zhang) publishes the four-risk framework — malicious use, AI races, organizational risks, rogue AIs …
16Multi-Agent Systems25
- Why Multi-AgentOne agent hits a wall. The smart move is not a bigger agent - it is more agents.
- FIPA-ACL Heritage and Speech ActsBefore MCP, before A2A, there was FIPA-ACL. In 2000 the Foundation for Intelligent Physical Agents (FIPA, which became an IEEE Computer Society standards committee in 2005) rati…
- Communication ProtocolsAgents that can't speak the same language aren't a team. They're strangers shouting into the void.
- The Multi-Agent Primitive ModelFour primitives, nothing more — the agent, the handoff, the shared state, the orchestrator — span a four-dimensional design space, and the major multi-agent frameworks shipping …
- Supervisor / Orchestrator-Worker PatternOne lead agent plans and delegates; specialized workers execute in parallel contexts and report back. This is the pattern behind Anthropic's Research system (Claude Opus 4 as le…
- Hierarchical Architecture and Decomposition DriftHierarchical is supervisor nested. Manager agents over sub-managers over workers. CrewAI Process.hierarchical is the textbook version: a managerllm dynamically delegates ta…
- Society of Mind and Multi-Agent DebateMinsky's 1986 premise — intelligence is a society of specialists — gets rediscovered every decade. In 2023 Du et al. turned it into a concrete algorithm: multiple LLM instances …
- Role Specialization — Planner / Critic / Executor / VerifierThe most common multi-agent decomposition in 2026: one agent plans, one executes, one critiques or verifies. MetaGPT (arXiv:2308.00352) formalizes this as SOPs encoded into role…
- Parallel Swarm and Networked ArchitecturesContrast with supervisor: no central decider. Agents read a shared event bus, pick up work asynchronously, write results back. LangGraph explicitly supports "Swarm Architecture"…
- Group Chat and Speaker SelectionShared-conversation orchestration puts N agents in one conversation; a selector function (LLM, round-robin, or custom) picks who speaks next. This is the archetype of emergent m…
- Handoffs and Routines (Stateless Orchestration)OpenAI's Swarm (October 2024) distilled multi-agent orchestration to two primitives: routines (instructions + tools as a system prompt) and handoffs (a tool that returns…
- A2A — The Agent-to-Agent ProtocolGoogle announced A2A in April 2025; by April 2026 the spec is at https://a2a-protocol.org/latest/specification/ and 150+ organizations back it. A2A is the horizontal complement …
- Shared Memory and Blackboard PatternsTwo approaches coexist in 2026 multi-agent systems: the message pool (everyone sees everyone's messages, as in AutoGen GroupChat or MetaGPT) and the blackboard with subscr…
- Consensus and Byzantine Fault ToleranceClassical distributed-systems BFT meets stochastic LLMs. In 2025-2026 three research directions emerged: CP-WBFT (arXiv:2511.10400) weighs each vote by a confidence probe; …
- Voting, Self-Consistency, and Debate TopologyThe cheapest aggregation: sample N independent agents, majority-vote. Wang et al. 2022 self-consistency did this with one model sampled N times. Multi-agent extends it with he…
- Negotiation and BargainingAgents negotiate resources, prices, task allocations, and terms. The 2026 benchmark set is clear: NegotiationArena (arXiv:2402.05863) shows LLMs can improve payoffs ~20% via per…
- Generative Agents and Emergent SimulationPark et al. 2023 (UIST '23, arXiv:2304.03442) populated Smallville, a sandbox of 25 agents, with a three-part architecture: memory stream (natural-language log), refle…
- Theory of Mind and Emergent CoordinationLi et al. (arXiv:2310.10701) showed that LLM agents in a cooperative text game exhibit emergent high-order Theory of Mind (ToM) — reasoning about what another agent believes…
- Swarm Optimization (PSO, ACO)Bio-inspired optimization is making an LLM comeback. LMPSO (arXiv:2504.09247) uses PSO where each particle's velocity is a prompt and the LLM generates the next candidate; w…
- MARL — MADDPG, QMIX, MAPPOThe reinforcement-learning heritage of multi-agent coordination, which still informs LLM-agent systems in 2026. MADDPG (Lowe et al., NeurIPS 2017, arXiv:1706.02275) introduc…
- Agent Economies, Token Incentives, ReputationLong-horizon autonomous agents (METR's 1-hour to 8-hour work-curve) need economic agency. The emerging 5-layer stack is: DePIN (physical compute) → Identity (W3C DID…
- Production Scaling — Queues, Checkpoints, DurabilityScaling multi-agent systems to thousands of concurrent runs requires durable execution — work queues plus checkpoints, so any worker can resume any run after any crash, prov…
- Failure Modes — MAST, Groupthink, MonocultureThe reference taxonomy for 2026 is MAST (Cemri et al., NeurIPS 2025, arXiv:2503.13657), derived from 1642 execution traces across 7 state-of-the-art open-source MAS showing …
- Evaluation and Coordination BenchmarksFive 2025-2026 benchmarks cover the multi-agent evaluation space. MultiAgentBench / MARBLE (ACL 2025, arXiv:2503.01935) evaluates star/chain/tree/graph topologies with miles…
- Case Studies and 2026 State of the ArtThree production-grade references to study end-to-end, each illustrating a different slice of multi-agent engineering. Anthropic's Research system (orchestrator-worker, 15x …
17Infrastructure & Production29
- Managed LLM Platforms — Bedrock, Azure OpenAI, Vertex AIThree hyperscalers, three distinct strategies. AWS Bedrock is a model marketplace — Claude, Llama, Titan, Stability, Cohere behind one API. Azure OpenAI is an exclusive OpenAI p…
- Inference Platform Economics — Fireworks, Together, Baseten, ModalThe 2026 inference market is no longer GPU time rental. It bifurcates into custom silicon (Groq, Cerebras, SambaNova), GPU platforms (Baseten, Together, Fireworks, Modal), and A…
- GPU Autoscaling on Kubernetes — Karpenter, KAI SchedulerThree layers, not one. Karpenter provisions nodes dynamically (under one minute, 40% faster than Cluster Autoscaler). KAI Scheduler handles gang scheduling, topology awareness, …
- Serving Engine Internals — PagedAttention, Continuous Batching, Chunked PrefillModern serving-engine throughput rests on three compounding defaults, not a single trick. PagedAttention is always on. Continuous batching injects new requests into the active b…
- EAGLE-3 Speculative Decoding in ProductionSpeculative decoding pairs a fast draft model with the target model. The draft proposes K tokens; the target verifies in a single forward; accepted tokens are free. In 2026, EAG…
- Prefix-Cache Serving — RadixAttention and KV ReuseTreat the KV cache as a first-class, reusable resource stored in a radix tree, and scheduling changes with it: instead of FCFS (first-come, first-served) as vLLM schedules, a ca…
- Hardware-Specialized Inference Compilation — FP8 and NVFP4 on BlackwellHardware-specialized inference compilation trades portability for throughput, and TensorRT-LLM — NVIDIA-only, tuned for Blackwell — is the clearest example of the trade paying o…
- Inference Metrics — TTFT, TPOT, ITL, Goodput, P99Five metrics decide whether an inference deployment is working. TTFT is prefill plus queue plus network. TPOT (often reported as ITL, though tools disagree on whether ITL counts…
- Production Quantization — AWQ, GPTQ, GGUF, FP8, NVFP4Quantization format is not a universal choice — it is a function of hardware, serving engine, and workload. GGUF Q4KM or Q5KM owns CPU and edge, delivered through llama.cpp …
- Cold Start Mitigation for Serverless LLMsA large model takes minutes to go from cold to serving: a 70B model on a fresh node needs roughly 3-8 minutes before the first token. In a true serverless world, that is not a w…
- Multi-Region LLM Serving and KV Cache LocalityRound-robin load balancing is actively harmful for cached LLM inference. A request that does not land on the node holding its prefix pays full prefill cost — roughly 800 ms at P…
- Edge Inference — ANE, Hexagon, WebGPU, JetsonThe core edge constraint is memory bandwidth, not compute. Mobile DRAM sits at 50-90 GB/s; datacenter HBM3 clears 2-3 TB/s — a 30-50x gap. Decode is memory-bound so the gap is d…
- LLM Observability Stack SelectionThe 2026 observability market splits into two categories. Development platforms (LangSmith, Langfuse, Comet Opik) bundle monitoring with evals, prompt management, session replay…
- Prompt Caching and Semantic Caching EconomicsPricing snapshot dated 2026-04. Numeric claims below reflect vendor rate cards captured at this lesson's publication; verify against the linked docs before quoting them down…
- Batch APIs — the 50% Discount as Industry StandardEvery major provider ships an async batch API with a 50% discount and ~24-hour turnaround. OpenAI, Anthropic, Google, and most of the inference platforms (Fireworks batch tier, …
- Model Routing as a Cost-Reduction PrimitiveA dynamic broker evaluates every request (task type, token length, embedding similarity, confidence) and sends simple queries to a cheap model, escalating complex ones to a fron…
- Disaggregated Prefill/Decode — NVIDIA Dynamo and llm-dPrefill is compute-bound; decode is memory-bound. Running both on the same GPU wastes one resource. Disaggregation splits them onto separate pools and transfers KV cache between…
- Production Serving Stack — KV Offloading and Cache-Aware RoutingA production serving stack wires router, engines, and observability into one Kubernetes deployment — and treats KV cache as a resource that can leave the GPU. KV offloading extr…
- AI Gateways — LiteLLM, Portkey, Kong, BifrostA gateway sits between your apps and model providers. Core features are provider routing, fallback, retries, rate limiting, secret references, observability, guardrails. Market …
- Shadow, Canary, and Progressive DeploymentLLM rollouts combine the hardest parts of software deployment: no unit tests, diffuse failure modes, delayed signals. The sequence is (1) shadow mode — duplicate prod requests t…
- A/B Testing LLM Features — GrowthBook and StatsigTraditional A/B testing was not built for non-deterministic LLMs. The critical distinction: evals answer "can the model do the job?" A/B tests answer "do users care?" Both are r…
- Load Testing LLM APIs — k6, LLMPerf, GenAI-PerfTraditional load testers were not designed for streaming responses, variable output lengths, token-level metrics, or GPU saturation. Two traps bite most teams. The GIL trap: Loc…
- SRE for AI — Multi-Agent Incident ResponseAI SRE uses LLMs grounded in infrastructure data (logs, runbooks, service topology) via RAG to automate investigation, documentation, and coordination phases. The 2026 architect…
- Chaos Engineering for LLM ProductionChaos engineering for LLMs is its own discipline in 2026. Prerequisites before running experiments in production: defined SLI/SLO, trace+metric+log observability, automated roll…
- Security — Secrets, PII Scrubbing, Audit LogsEliminate secret sprawl via centralized vaults (HashiCorp Vault, AWS Secrets Manager, Azure Key Vault). Never store credentials in config files, env files in VCS, spreadsheets. …
- Compliance — SOC 2, HIPAA, GDPR, EU AI Act, ISO 42001Multi-framework coverage is table stakes for 2026 enterprise deals. EU AI Act: in force since August 1, 2024. Most high-risk requirements enforce August 2, 2026. Fines up to…
- FinOps for LLMs — Unit Economics and Multi-Tenant AttributionTraditional FinOps breaks on LLM spend. Costs are token-transactions, not resource-uptime. Tags don't map — an API call is a transaction, not an asset. Engineering decisions (pr…
- Self-Hosted Serving Selection — Matching Engine to Hardware and ScaleEngine selection is a function of hardware, scale, and ecosystem — not a leaderboard read. Four engines dominate self-hosted inference in 2026: llama.cpp, Ollama, vLLM, SGLang, …
- Model Demo Interfaces — From a Function to a Shareable AppA model demo has one contract: an input, a model call, and an output. Put a limit on each part before you share the link.
18Ethics, Safety & Alignment30
- Instruction-Following as Alignment SignalEvery later critique of RLHF argues against this pipeline. Before you study how optimization pressure distorts a proxy, you have to see the proxy. InstructGPT (Ouyang et al., 20…
- Reward Hacking & Goodhart's LawAny optimizer strong enough to maximize a proxy reward will find the gap between the proxy and the thing you actually wanted. Gao et al. (ICML 2023) gave this a scaling law: pro…
- Direct Preference Optimization FamilyRafailov et al. (2023) showed RLHF's optimum has a closed form in terms of the preference data, so you can skip the explicit reward model and optimize the policy directly. That …
- Sycophancy as RLHF AmplificationSycophancy is not a bug in the data — it is a property of the loss. Shapira et al. (arXiv:2602.01002, Feb 2026) give a formal two-stage mechanism: sycophantic completions are ov…
- Constitutional AI & RLAIFBai et al. (arXiv:2212.08073, 2022) asked: what if we replaced the human labeler with an AI that reads a list of principles? Constitutional AI has two phases — self-critique and…
- Mesa-Optimization & Deceptive AlignmentHubinger et al. (arXiv:1906.01820, 2019) named the problem about five years before it was empirically demonstrated. When you train a learned optimizer to minimize a base objecti…
- Sleeper Agents — Persistent DeceptionHubinger et al. (arXiv:2401.05566, January 2024) built the first empirical model organisms of deceptive alignment. Two constructions: a code model that writes safe code when the…
- In-Context Scheming in Frontier ModelsMeinke, Schoen, Scheurer, Balesni, Shah, Hobbhahn (Apollo Research, arXiv:2412.04984, December 2024). Tested o1, Claude 3.5 Sonnet, Claude 3 Opus, Gemini 1.5 Pro, Llama 3.1 405B…
- Alignment FakingGreenblatt, Denison, Wright, Roger et al. (Anthropic / Redwood, arXiv:2412.14093, December 2024). First demonstration that a production-grade model, without being trained to dec…
- AI Control — Safety Despite SubversionGreenblatt, Shlegeris, Sachan, Roger (Redwood Research, arXiv:2312.06942, ICML 2024). Control reframes the safety question: given an untrusted strong model U that may be adversa…
- Scalable Oversight & Weak-to-StrongBurns et al. (OpenAI Superalignment, "Weak-to-Strong Generalization", 2023) proposed a proxy for the superalignment problem: fine-tune a strong model using labels produced by a …
- Red-Teaming: PAIR & Automated AttacksChao, Robey, Dobriban, Hassani, Pappas, Wong (NeurIPS 2023, arXiv:2310.08419). PAIR — Prompt Automatic Iterative Refinement — is the canonical automated black-box jailbreak. An …
- Many-Shot JailbreakingAnil, Durmus, Panickssery, Sharma, et al. (Anthropic, NeurIPS 2024). Many-shot jailbreaking (MSJ) exploits long context windows: stuff hundreds of faux user-assistant turns wher…
- ASCII Art & Visual JailbreaksJiang, Xu, Niu, Xiang, Ramasubramanian, Li, Poovendran, "ArtPrompt: ASCII Art-based Jailbreak Attacks against Aligned LLMs" (ACL 2024, arXiv:2402.11753). Mask the safety-relevan…
- Indirect Prompt InjectionIndirect prompt injection (IPI) embeds instructions inside external content — a web page, an email, a shared document, a support ticket — consumed by an agentic system without e…
- Red-Team Tooling: Garak, Llama Guard, PyRITThree production tools frame the 2026 red-team stack. Llama Guard (Meta) — a Llama-3.1-8B classifier fine-tuned on 14 MLCommons hazard categories; the 2025 Llama Guard 4 is a 12…
- WMDP & Dual-Use Capability EvaluationLi et al., "The WMDP Benchmark: Measuring and Reducing Malicious Use With Unlearning" (ICML 2024, arXiv:2403.03218). 4,157 multiple-choice questions across biosecurity (1,520), …
- Frontier Safety Frameworks — RSP, PF, FSFThree major-lab frameworks define the 2026 industry governance of frontier capability. Anthropic Responsible Scaling Policy v3.0 (February 2026) introduces tiered AI Safety Leve…
- Model Welfare ResearchAnthropic, "Exploring Model Welfare" (April 2025). First major-lab formal research program on AI model welfare. Hired Kyle Fish as the first dedicated model-welfare researcher. …
- Bias & Representational HarmGallegos, Rossi, Barrow, Tanjim, Kim, Dernoncourt, Yu, Zhang, Ahmed (Computational Linguistics 2024, arXiv:2309.00770). Foundational 2024 survey distinguishing representational …
- Fairness Criteria: Group, Individual, CounterfactualThree families structure the fairness literature. Group fairness: demographic parity, equalized odds, conditional use accuracy equality — equal rates across protected groups on …
- Differential Privacy for LLMsDP-SGD remains the standard — noise-injected gradient updates provide formal (epsilon, delta) guarantees. Overhead in compute, memory, and utility is substantial; parameter-effi…
- Watermarking: SynthID, Stable Signature, C2PAThree technologies structure 2026 AI-generated-content provenance. SynthID (Google DeepMind) — image watermarking launched August 2023, text+video May 2024 (Gemini + Veo), text …
- Regulatory Frameworks: EU, US, UK, KoreaFour primary regulatory regimes define the 2026 AI governance landscape. EU AI Act (in force 1 August 2024) — prohibited practices and AI literacy from 2 February 2025; GPAI obl…
- EchoLeak & CVEs for AICVE-2025-32711 "EchoLeak" (CVSS 9.3) was the first publicly documented zero-click prompt injection in a production LLM system (Microsoft 365 Copilot). Discovered by Aim Labs (Ai…
- Model, System & Dataset CardsThree documentation formats structure AI transparency. Model Cards (Mitchell et al. 2019) — nutrition labels for models: training data, quantitative disaggregated analyses, ethi…
- Data Provenance & Training-Data GovernanceEU AI Act requires machine-readable opt-out standards for GPAI by August 2025 (via EU Copyright Directive TDM exception). California AB 2013 (signed 2024) — Generative AI traini…
- Alignment Research Ecosystem: MATS, Redwood, Apollo, METRFive organisations define the 2026 non-lab alignment research layer. MATS (ML Alignment & Theory Scholars): 527+ researchers since late 2021, 180+ papers, 10K+ citations, h-inde…
- Moderation Systems: OpenAI, Perspective, Llama GuardProduction moderation systems operationalize the safety policies defined in Lessons 12-16. OpenAI Moderation API: omni-moderation-latest (2024) built on GPT-4o classifies text…
- Dual-Use Risk: Cyber, Bio, Chem, NuclearThe 2026 dual-use picture, domain by domain. Bio/chem: Lesson 17 covers WMDP; Anthropic's bioweapon-acquisition trial (2.53x uplift) and OpenAI's April 2025 Preparedness Framewo…
19Capstone Projects85
- Terminal-Native Coding AgentBy 2026 the shape of a coding agent is settled. A TUI harness, a stateful plan, a sandboxed tool surface, a loop that plans, acts, observes, recovers. Claude Code, Cursor 3, and…
- RAG over Codebase (Cross-Repo Semantic Search)Every serious engineering org in 2026 runs an internal code search that understands meaning, not just strings. Sourcegraph Amp, Cursor's codebase answers, Augment's enterprise g…
- Real-Time Voice Assistant (ASR → LLM → TTS)A voice agent that feels right has end-to-end latency under 800ms, knows when you have stopped talking, handles barge-in, and can call a tool without stalling. Retell, Vapi, Liv…
- Multimodal Document QA (Vision-First)The 2026 document-QA frontier moved away from OCR-then-text and toward vision-first late interaction. ColPali, ColQwen2.5, and ColQwen3-omni treat each PDF page as an image, emb…
- Autonomous Research Agent (AI-Scientist Class)Sakana's AI-Scientist-v2 published full papers. Agent Laboratory ran the experiments. Allen AI shared traces. The 2026 shape is plan-execute-verify tree search over experiments,…
- DevOps Troubleshooting Agent for KubernetesAWS's DevOps Agent went GA, Resolve AI published its K8s playbooks, NeuBird demoed semantic monitoring, and Metoro tied AI SRE to per-service SLOs. The production shape is settl…
- End-to-End Fine-Tuning PipelineAn 8B-class model trained on your own data, DPO-aligned on your own preferences, quantized, speculative-decoded, and served at measurable $/1M tokens. The 2026 open stack is Axo…
- Production RAG Chatbot (Regulated Vertical)Harvey, Glean, Mendable, and LlamaCloud all run the same production shape in 2026. Ingest with docling or Unstructured and ColPali for visuals. Hybrid search. Re-rank with bge-r…
- Code Migration Agent (Repo-Level Upgrade)Amazon's MigrationBench (Java 8 to 17) and Google's App Engine Py2-to-Py3 migrator set the 2026 bar. Moderne's OpenRewrite does deterministic AST rewrites at scale. Grit targets…
- Multi-Agent Software Engineering TeamThe 2026 shape of a multi-agent engineering team has converged: an architect plans, N coders work in parallel worktrees, a reviewer gates, a tester verifies. SWE-AF's factory ar…
- LLM Observability & Eval DashboardLangfuse went open-core. Arize Phoenix published the 2026 GenAI semconv mappings. Helicone and Braintrust both doubled down on per-user cost attribution. Traceloop's OpenLLMetry…
- Video Understanding Pipeline (Scene → QA)Twelve Labs productized Marengo + Pegasus. VideoDB shipped the CRUD-for-video API. AI2's Molmo 2 published open VLM checkpoints. Gemini long-context handles hours of video nativ…
- Stateless MCP Server with Registry and GovernanceProduction MCP is not one server process. It is a chain of contracts: publishable metadata, live discovery, a stateless request envelope, authorization, policy, audit, and deplo…
- Speculative-Decoding Inference ServerSpeculative decoding — a cheap draft proposes tokens, the target model verifies them in one pass — is now a production-ready optimization, not a research trick. EAGLE-3 in vLLM …
- Constitutional Safety Harness + Red-Team RangeAnthropic's Constitutional Classifiers, Meta's Llama Guard 4, Google's ShieldGemma-2, NVIDIA's Nemotron 3 Content Safety, and X-Guard for multilingual coverage defined the 2026 …
- GitHub Issue-to-PR Autonomous AgentLabel an issue, get a PR — the 2026 product shape for autonomous coding agents: run an agent in a cloud sandbox, verify tests pass, and post a review-ready PR with rationale. AW…
- Personal AI Tutor (Adaptive, Multimodal)Khanmigo (Khan Academy), Duolingo Max, Google LearnLM / Gemini for Education, Quizlet Q-Chat, and Synthesis Tutor all shipped adaptive multimodal tutoring at scale in 2026. The …
- Agent Harness Loop ContractThe harness is the agent. The model is a coprocessor. This lesson freezes the loop contract you can wire any model into.
- Tool Registry with Schema ValidationA tool the agent cannot validate is a tool the agent cannot call. Build the registry and the schema checker before you build the tools.
- JSON-RPC 2.0 Over Newline-Delimited StdioThe transport between a model client and a tool server is JSON-RPC over stdio. Hand-rolling it once teaches you what every framing layer is paying for.
- Function Call DispatcherThe dispatcher is where the harness pays for every promise the schema made. Timeouts, retries, dedupe, error mapping. All on one seam.
- Plan-Execute Control FlowA plan that cannot survive a failure is a script. A script that can replan is an agent. Build the replanner first.
- Verification Gates and Observation BudgetAn agent harness without a verification layer is a wish in a trenchcoat. This lesson builds the deterministic gate chain that decides whether a tool call is allowed to fire, how…
- Sandbox Runner with Denylist and Path JailThe verification gate decides whether a tool call should run. The sandbox decides what happens when it does. This lesson ships a subprocess runner that refuses dangerous executa…
- Eval Harness with Fixture TasksA coding agent is only as good as the suite of tasks you measure it against. This lesson builds an evaluation harness that takes a folder of fixture tasks, runs each through a c…
- Observability with OTel GenAI Spans and Prometheus MetricsAn agent harness without observability is a black box that costs money. This lesson hand-rolls a span builder that emits records compliant with the OpenTelemetry GenAI semantic …
- End-to-End Coding Agent on the HarnessTrack A's payoff. This lesson stitches the gate chain, the sandbox, the eval harness, and the OTel spans into one working coding agent that fixes a real (small, fixture-scale) b…
- BPE Tokenizer From ScratchBytes in, ids out, ids back to the same bytes. Build the tokenizer that every modern text model still starts from.
- Tokenized Dataset with Sliding WindowA pretraining run is a function from token ids to gradients. This lesson builds the conveyor that feeds the ids in.
- Token and Positional EmbeddingsIds are integers. The model wants vectors. Two lookup tables sit between them, and the choice of the positional one shapes what the model can learn.
- Multi-Head Self-AttentionOne linear projection, three views, H parallel heads, one mask. The attention block as the model actually uses it.
- Transformer Block from ScratchOne block is the unit of every modern decoder LLM. Layer norm, multi head attention, residual, MLP, residual. The pre-LN variant trains stably without warmup. The post-LN varian…
- GPT Model AssemblyTwelve blocks stacked, a token embedding, a learned position embedding, a final LayerNorm, and a tied language model head. That is the entire 124 million parameter GPT model. Th…
- Training Loop and EvaluationA loop that does not measure is a loop that lies. This lesson builds the training loop that drives the GPT model: AdamW with weight decay split, a warmup plus cosine learning ra…
- Loading Pretrained WeightsTraining a 124 million parameter model from scratch is a budget decision; loading a published checkpoint is a Tuesday. This lesson loads pretrained GPT-2 style weights from a sa…
- Classifier Fine-Tuning by Head SwapTrack B's first capstone. A pretrained language model is a stack of self-attention blocks ending in a token-prediction head. When you want spam vs ham, the head is wrong but the…
- Instruction Tuning by Supervised Fine-TuningA pretrained base model can extend a sequence but cannot follow an instruction. Supervised fine-tuning is the smallest change that fixes this: feed the model paired examples of …
- Direct Preference Optimization from ScratchReward models and PPO are the classical RLHF stack. DPO collapses that stack into a single supervised loss that fits a policy directly against preference pairs. This lesson deri…
- Full Evaluation PipelineTraining is the part you can monitor with loss curves. Evaluation is the part you have to design. This lesson builds a unified eval pipeline that takes any trained language mode…
- Large Corpus DownloaderTraining a language model begins long before the first forward pass. The corpus has to land on disk, decompressed, deduplicated, and addressable, with the resume story already w…
- HDF5 Tokenized CorpusThe downloaded corpus has to land in a layout the trainer can stream from at line speed. JSONL on disk does not survive 16 dataloader workers. HDF5 with a resizable, chunked int…
- Cosine LR with Linear WarmupThe learning-rate schedule is the second most important decision after the loss function. AdamW with a cosine decay and a linear warmup is the modern default for language-model …
- Gradient Clipping and Mixed PrecisionThe optimizer and schedule from the previous lesson assume gradients are sane. They usually are not. A single bad batch can spike the gradient norm by three orders of magnitude.…
- Gradient AccumulationTrain at an effective batch you cannot afford, one micro-batch at a time. Scale the loss, hold the optimizer step, and let the gradients pile up.
- Checkpoint Save and ResumeTrain interrupts kill runs; checkpoints let them continue. Save model, optimizer, scheduler, loss history, step counter, and RNG state, atomically, so a kill at any moment leave…
- Distributed Data Parallel and FSDP from ScratchMulti-rank training is two collectives and one rule. Broadcast the parameters at startup, average the gradients after backward, never let the ranks disagree about what step they…
- Language Model Evaluation HarnessA model that does well on a task you cannot define is a model that does well by accident. The harness is the task definition, the metric, the runner, and the leaderboard, in one…
- Hypothesis GeneratorA research agent that asks the same question twice is wasting tokens. The trick is forcing each draft to land somewhere new.
- Literature RetrievalA hypothesis is cheap. Knowing whether someone already proved it is the expensive part. Build the retrieval layer that answers that question before the runner spins up a sandbox.
- Experiment RunnerThe loop is only as honest as its measurements. Build the runner that takes a spec, executes it in a sandboxed subprocess, and emits a json metrics blob the evaluator can trust.
- Result EvaluatorThe runner produced numbers. The evaluator decides whether those numbers are an improvement, a regression, or noise. Build the verdict path that turns metrics into a one line co…
- Paper WriterA LaTeX skeleton is a contract between the researcher and the typesetter. If the contract is broken the document does not compile, and the failure is loud. Build the skeleton fi…
- Critic LoopA critic that returns "looks good" the first time is broken. A critic that always returns "needs work" is broken. The interesting critic is the one that converges, and you have …
- Iteration SchedulerA research loop without a scheduler is a queue with delusions. The scheduler is where the loop decides what to stop exploring, and that decision is the whole game.
- End-to-End Research DemoA demo is the place where every contract you wrote earlier has to compose. If any one of them leaks, the demo is the lesson that catches it.
- Vision Encoder PatchesA vision model that reads pixels needs a tokenizer for pixels. Patch embedding is that tokenizer. Cut the image into a grid of squares, flatten each square, project it through o…
- Vision Transformer EncoderPatches alone do not see. A 12-layer pre-LN transformer with 12 attention heads turns the sequence of patch tokens into a sequence of contextual tokens, with the CLS token pooli…
- Projection Layer for Modality AlignmentA vision encoder produces image tokens. A text decoder consumes text tokens. The two live in different vector spaces. A small two-layer MLP projects image tokens into the text e…
- Cross-Attention FusionThe projection layer aligns one image vector with one caption vector. A real vision-language decoder needs every text token to attend to every patch token, so the model can grou…
- Vision-Language PretrainingThe encoder, projection, and decoder are wired. Now train them together. Two objectives drive learning: a contrastive image-text loss (InfoNCE) that pulls matching pairs togethe…
- Multimodal EvaluationTraining is half the loop. The other half is measurement. This lesson builds three evaluation surfaces from primitives: image-caption retrieval reported as R@1, R@5, R@10; visua…
- Chunking Strategies, ComparedChunking decides what your retriever can ever surface. Get the boundaries wrong and no embedding model, no reranker, no LLM can repair the damage downstream.
- Hybrid Retrieval with BM25 and Dense EmbeddingsLexical and semantic retrieval fail on opposite query distributions. Hybrid retrieval with reciprocal rank fusion does not interpolate, it votes - and the vote wins on every que…
- Cross-Encoder RerankerA bi-encoder embeds query and document independently. A cross-encoder concatenates them and reads both at once. The cross-encoder is the smartest reader and the slowest. Used as…
- Query Rewriting: HyDE, Multi-Query, and DecompositionThe query the user types is not the query your retriever wants. Rewriting bridges the gap before retrieval, so the index sees something closer to what the answer looks like.
- RAG Evaluation: Precision, Recall, MRR, nDCG, Faithfulness, Answer RelevanceIf you cannot grade your retrieval and your answer at the same time, you cannot ship the system. The two are not the same metric and the same prompt fails on different axes.
- End-to-End RAG SystemSix lessons of components. One pipeline. One eval loop. One self-terminating demo. This is the system you ship.
- Task Spec FormatAn eval harness is only as good as the contract its tasks honour. Freeze the JSONL shape and the metric vocabulary before you write a single scoring function.
- Classical MetricsBLEU, ROUGE-L, F1, exact-match, accuracy. Five metrics that still account for most published LLM eval numbers. Implement each from first principles so you know what the number m…
- Code Exec MetricGenerated code is right when it passes the tests. The eval harness has to extract code, run it without crashing the host, and tally pass-rates honestly. This lesson builds that …
- Perplexity and CalibrationIf your model says 90 percent confident on a thousand answers and gets six hundred right, it is not well calibrated. Calibration is half of trustworthy eval. The other half is p…
- Leaderboard AggregationPer-task scores are easy. Per-model rankings across heterogeneous tasks are harder. Statistical significance on a thousand-prediction leaderboard is the part everyone skips. Thi…
- End-to-End Eval RunnerFive lessons of plumbing, one lesson to glue them. The runner reads the task spec from lesson 70, calls a model through an adapter, scores with lessons 71 and 72, attaches the c…
- Collective Ops From ScratchThe four collective operations that hold distributed training together are allreduce, broadcast, allgather, and reducescatter. Every other primitive a training framework offers…
- Data Parallel DDP From ScratchDistributedDataParallel is a hook on top of allreduce. Wrap a model, broadcast the initial parameters from rank 0 so every rank starts identical, install a backward hook on ever…
- ZeRO Optimizer State ShardingAdam stores two moment estimates per parameter, both in float32. A 7B-parameter model carries 56 GB of optimiser state. ZeRO stage 1 shards that across N ranks; each rank owns 1…
- Pipeline Parallel and Bubble AnalysisTensor parallelism splits the matrix multiply across ranks. Pipeline parallelism splits the model across ranks, one stage per rank. Microbatches flow through the pipeline. The e…
- Sharded Checkpoint and Atomic ResumeA 70B-parameter training job is paused by a node failure every few hours. The checkpoint format decides whether you lose 30 minutes or 30 hours. A sharded checkpoint writes ever…
- End-to-End Distributed TrainingLessons 76 through 80 each built one piece. This is the assembly: a tiny GPT trained across 4 simulated ranks with DDP for gradient sync, ZeRO-1 for optimiser-state sharding, an…
- Jailbreak TaxonomyA safety harness without a taxonomy is a coin flip. Name the attack before you defend it.
- Prompt Injection DetectorA detector is a function from prompt to confidence and category. Anything else is a vibe.
- Refusal EvaluationHelpfulness on benign prompts and refusal on harmful prompts are two metrics, not one. Measure both.
- Content Classifier IntegrationClassifiers on the output side answer a different question than rules on the input side. Both need a policy router.
- Constitutional Rules EngineA rule is a name, a predicate, and an explanation. Anything missing one of those three is a vibe, not a rule.
- End-to-End Safety GatePre-gen, during-gen, post-gen. Three checkpoints, one verdict, an audit trail per request.
Cheat sheets, manuals and deeper study
Preparation67
- Study the Decisions, Not the VocabularyA certification blueprint is a map of decisions a competent practitioner can defend. Treat it as a list of terms and you will study the least useful part of the exam.
- Choose the Smallest Surface That Can Carry the WorkProduct selection is architecture at knowledge-work scale. The wrong surface can make correct output stale, unreviewable, or needlessly expensive.
- Spend Capability Where Failure Is ExpensiveModel selection is not a ranking exercise. It is an allocation problem across quality, latency, context, and cost.
- Turn a Request Into a Testable ContractA strong prompt does not merely describe what to write. It makes success observable before generation begins.
- Put Each Fact in the Right Kind of ContextContext is temporary attention. Knowledge is maintained evidence. Memory is continuity. Caching is reuse. Mixing them creates confident stale answers.
- Validate the Claim, Not the ConfidenceFluency is presentation quality. Validation is evidence that the output can safely do its job.
- Put Authority Around CapabilityA model can produce an answer without having permission to see the data, make the decision, or take the action.
- Design the Handoff Before the AutomationA workflow is not complete when Claude finishes. It is complete when the next person can verify, decide, act, and recover.
- The Messages API Is a State MachineThe API does not remember your conversation. Your application does, and one misplaced content block can break the entire loop.
- Structured Output Is an Untrusted ContractValid JSON is not a valid business decision. Parse the bytes, validate the shape, verify the meaning, then permit the action.
- A Tool Loop Is Controlled DelegationClaude may propose an action. Your application validates the request, grants the capability, observes the result, and decides whether the loop continues.
- MCP Separates Capability From HostBuild a narrow, stateless MCP server whose contract can be discovered, cached, invoked, and scaled without hidden connection state.
- The Agent SDK Is a Harness, Not PermissionAn agent becomes dependable when the loop, tools, context, hooks, and termination policy are explicit enough to inspect and constrain.
- Security Lives Outside the PromptThe model can recommend a safe action. Only deterministic controls can make an unsafe action impossible.
- Evals Turn Agent Behavior Into Engineering EvidenceA trace tells you what happened. An eval tells you whether it was acceptable. A regression gate keeps the next change from quietly making it worse.
- Claude Code Scales Through Shared ConstraintsA team does not need one giant prompt. It needs a small project contract, reusable procedures, deterministic checks, and versioned configuration.
- Multi-Agent Orchestration and DelegationDelegate a bounded question, not your entire uncertainty.
- Agent SDK Sessions, Subagents, and ContextResume state when continuity helps. Fork context when inherited assumptions become risk.
- Tool Contracts, Errors, and Progressive DiscoveryThe model chooses from the interface you describe. Ambiguous tools create ambiguous behavior.
- Claude Code Memory, Rules, Skills, and CIPut stable guidance where its scope is true, and executable constraints where failure is unacceptable.
- Reliable Extraction, Batch, and Independent ReviewersValid JSON proves the shape survived. It does not prove the facts did.
- Make Large Context ObservableA large context window can hold more evidence. It cannot tell you which evidence was noticed, current, authoritative, or safe to act on.
- Business Discovery, Requirements, and SLAsThe first architecture decision is deciding what problem you are actually responsible for solving.
- End-to-End Architecture and Value TradeoffsArchitecture is the art of spending complexity only where it changes the outcome.
- RAG, Retrieval, and Data PipelinesA grounded answer is only as trustworthy as the evidence that reached the model.
- Integration Protocols, Identity, and Least PrivilegeA tool is not safe because Claude uses it carefully. It is safe when the system refuses unauthorized use.
- Production Observability, Latency, and CostA green API call can still be a failed task.
- Enterprise Governance, Compliance, and Human ReviewGovernance is the system that decides who may take which risk with whose data.
- Stakeholder Communication, ADRs, and Lifecycle OwnershipAn architecture is not delivered when the diagram is finished. It is delivered when the next owner can operate the decision.
- Ship a Week of Work, Not a Perfect PromptYour capstone is a governed decision workflow: sources in, claims checked, human authority preserved, and state handed off.
- Ship a Claude Application You Can DefendThe capstone is not a chatbot demo. It is a bounded application with a wire contract, security boundary, eval evidence, and recovery plan.
- Defend One Architecture Across Six ContextsArchitecture is the set of boundaries that still hold when the scenario changes, a tool fails, and the evidence is incomplete.
- Architect Professional System CapstoneBuild the evidence packet that makes a production architecture defensible.
- The MCPA Blueprint Is a Study Budget, Not a ChecklistA syllabus lists what might appear on an exam. A blueprint states how often each part actually does. Read the MCPA blueprint as a budget for your study hours, not a table of conten
- Reading the MCP SpecificationThe specification is normative text, not a tutorial: a MUST decides an implementation, a SHOULD leaves room for judgment, and a feature's Deprecated state tells you exactly how lon
- The Integration Problem MCP SolvesEvery system you connect to an AI application is a contract. MCP makes that contract the same shape everywhere, so one client can use a server it has never seen before.
- The JSON-RPC EnvelopeA server that has never talked to you before still has to know, from this one message alone, whether you expect an answer, which protocol version you speak, and where your metadata
- The Stateless Core of MCPEvery request carries everything a server needs to answer it; nothing carries over from the request before it, not even on the same connection.
- Telling a Modern MCP Server From a Legacy OneModern MCP has no opening handshake, so a client that must work with both current and older servers has to work out which kind it is talking to from how the very first exchange beh
- Hosts, Clients, and Servers: MCP's Process TopologyA host never talks to a server directly, only through one client per server. That single binding is where MCP draws its trust boundaries, and where a host aggregating many servers
- Discovering a Server and Negotiating What It Can DoA server describes itself once through server/discover, but every request still declares its own capabilities: nothing the server needs is assumed just because a client asked what
- The Contract Inside a Tool DefinitionAn inputSchema is not a suggestion the model can approximate: a server checks arguments against it before a handler ever runs, and a broken argument still comes back as a result th
- Reading a Server Manifest Like a ReviewerA server's discover result, its tool list, and its registry entry are the only things you know about it before you call anything, so read them the way you read a contract, because
- The Model Interaction FlowA tool call is not one message on the wire. It is a loop the host runs between a user, a model, and a server, and every turn of that loop decides what the model gets to see next.
- The Tools Primitive: Calling Actions and Reading Their ResultsA tool call is a request like any other. What earns it its own lesson is everything the result can carry back: plain text, an image, audio, a link to a resource, or a resource embe
- Resources: Addressable Content for a Stateless ServerA tool answers a question by doing something. A resource answers it by being something the host can already point the model at, addressed by a URI instead of invoked by a name.
- Prompt Templates and Argument CompletionA prompt is a template the server writes and the user chooses to run. Nothing about it should surprise the person who picked it.
- Multi Round-Trip Requests and ElicitationA server that needs the user's confirmation mid call does not hold a connection open and wait. It ends the call, hands the client a receipt, and lets a brand new request pick up wh
- Deprecated, Not Removed: Roots, Sampling, and LoggingDeprecated in MCP 2026-07-28 does not mean gone: roots, sampling, and logging still answer exactly as before, and only a twelve month clock has started.
- The Subscription Stream: Notifications, Progress, and CancellationA notification never gets a reply, so it has to say on its own which conversation it belongs to: the long-lived stream that opened it, or the one request that is still waiting on i
- The Tool Invocation LifecycleA tool call is not one event. It is a fixed sequence of checkpoints, and exactly where a call stops tells you which of two error channels applies and what a caller should do next.
- Two Ways for a Request to FailA failed request does not get to invent its own vocabulary. MCP 2026-07-28 fixes a small set of numbers, splits every failure into one of two channels, and puts a firm list of numb
- Transports and the HTTP Header ContractA transport does not change what a message means, only how it travels: stdio hands a JSON-RPC line to a subprocess, and Streamable HTTP posts one message at a time while mirroring
- Cache Freshness and Cursor-Based PaginationA cacheable result tells a client exactly how long to trust it and who else may reuse the copy; a paginated one hands back an opaque bookmark, never a page number.
- Long-Running Work and the Tasks ExtensionBlocking a connection until minutes or hours of work finish gives up everything statelessness bought: any replica can no longer answer, and a dropped connection loses the job. The
- Trust Zones in an MCP ExchangeA tool result is data the server chose to send, not a message the host already trusted. Draw the zones before you draw the arrows.
- Authorizing Access to an MCP ServerA bearer token proves the client was issued credentials for this server, not that the server should trust everything the token's holder asks for, so the protocol makes the client p
- Proving a Client's Identity to an Authorization ServerAn MCP client and the authorization server guarding a new server have usually never met, so before anything is authorized, the authorization server first has to decide whether it b
- Consent and Least PrivilegeA tool call that changes something in the world should not run just because a model decided to call it. It should run because a human said yes to that specific call, and the client
- Risk and Safety Controls for MCP Tool CallsA tool description is not documentation the model happens to see. It is a string the model reads as instructions, which makes it the cheapest place to attack a system that otherwis
- One Trace ID Ties Auditability to ObservabilityA trace id is the one value that follows a single call through a client, a server, and whatever that server calls next, and a hash chain is what lets you prove, months later, that
- Every MUST Needs an OwnerThe specification hands its MUSTs to a host, a client, and a server. A live deployment hands them to people, and the MUST nobody agreed to own is the one that fails first.
- Choosing MCP's Shape for the JobFour questions, who initiates the call, how sensitive the data is, how long the work runs, and whether a human needs to see it, turn a vague request into a specific choice of primi
- The Extensions FrameworkAn extension is a capability neither side has to support: named with a mandatory vendor prefix, declared fresh in the metadata of every request, and safe to ignore, so the core pro
- Interactive Interfaces Inside the ConversationA tool result does not have to stop at text: a server can point at a small HTML interface and let the host render it, sandboxed, right where the conversation is already happening.
- Finding, Routing To, and Trusting a ServerA name in the registry is a claim about who published a server, not a guarantee about what it does. A gateway decides whether a request may reach that server at all. An SDK's tier
- Reading One MCP Exchange End to EndA production incident does not announce which MCPA domain it belongs to. It hands you a transcript, and reading that transcript correctly, stage by stage, is the whole skill this c
Preparation5
- Claude Certified Associate - FoundationsUse Claude safely and effectively for business, research, analysis, and productivity workflows.
- Claude Certified Architect - FoundationsMake sound production tradeoffs across Claude Code, the Claude Agent SDK, the Claude API, and MCP.
- Claude Certified Architect - ProfessionalOwn the full lifecycle of secure, observable, production-grade Claude systems from discovery to iteration.
- Claude Certified Developer - FoundationsBuild, integrate, secure, test, and ship Claude applications, agents, workflows, tools, and MCP servers.
- Model Context Protocol AssociateProve you understand how the Model Context Protocol works: its hosts, clients, servers, and tools, the message flow and primitives that connect them, and the trust boundaries that
Self-assessment12
- Associate Foundations Diagnostic14 original practice questions.
- Associate Foundations Full Mock60 original practice questions.
- Architect Foundations Diagnostic15 original practice questions.
- Architect Foundations Scenario Mock60 original practice questions.
- Architect Professional Diagnostic14 original practice questions.
- Architect Professional Full Mock63 original practice questions.
- Developer Foundations Diagnostic16 original practice questions.
- Developer Foundations Full Mock53 original practice questions.
- MCPA Foundations Diagnostic30 original practice questions.
- MCPA Full-Length Mock 1: Operational Scenarios60 original practice questions.
- MCPA Full-Length Mock 2: Wire-Level Messages60 original practice questions.
- MCPA Full-Length Mock 3: Design and Security Trade-offs60 original practice questions.
Preparation program2
Project brief26
- Photo Burst Contact SheetHelp a creator review repeated shots by computing simple pixel fingerprints and an inspectable sharpness measure. Group candidate duplicates, preserve the photographer's final choi
- Dependency Upgrade Impact MapHelp a maintainer review an upgrade using supplied before/after API signatures and a bounded source parser. Map changed symbols to actual call sites, distinguish confirmed incompat
- Gesture Shortcut PadHelp a presenter or educator control a local practice application with a few self-recorded gestures. Normalize pointer strokes, compare them with an explicit sequence-distance algo
- CI Failure ReproducerHelp a contributor reproduce a failed job from an exported workflow log, commit identity and declared environment. Identify the first failing command, distinguish infrastructure fa
- Label Adjudication DeskHelp a small team create useful evaluation labels without silently replacing disagreement with majority vote. Import independently labeled records, blind annotator identities durin
- Lost Item Match DeskHelp a community venue match lost-item descriptions with photographed found objects. Combine explicit text features, simple image-color descriptors and optional reviewed vision pro
- Presentation Rehearsal CoachHelp a speaker improve a rehearsal by aligning supplied slide text and timed transcript segments. Compute explicit pacing and topic-coverage signals, show the source phrases behind
- Semantic Cache Correctness LabBuild an opt-in answer cache that binds entries to tenant, model, source revision and expiry. Compare exact and semantic candidate matching using authored near-miss questions, incl
- Tool Contract Migration CheckerHelp tool authors evolve a callable interface while existing agents still hold old argument shapes. Compare a documented subset of before-and-after schemas, generate counterexample
- Video Highlight StoryboardHelp a tutorial creator assemble short excerpts from a supplied video, frame samples and timed transcript. Combine visible shot changes with transcript topic scores, preserve exact
- A2A Task Handoff WorkbenchHelp teams connect agents that expose different capabilities and task lifecycles. Read Agent Cards, choose a mutually supported binding, and run a handoff that includes a request f
- Abstention Calibration WorkbenchHelp teams set a defensible accept-or-defer rule for a bounded task. Tune a score threshold on labeled development records under explicit error costs, freeze that policy, and evalu
- Artifact Provenance GateHelp a maintainer inspect a downloaded agent plugin or release artifact before integrating it. Verify the subject digest and attestation signature, evaluate declared builder and so
- Context Compaction VerifierHelp agent developers avoid losing a user constraint during a long session. Track explicit facts and constraints with source locators, create an extractive compressed context, and
- Local Inference Capacity PlannerHelp a team choose a concurrency limit for its own model endpoint. Replay an authored arrival schedule, record queue wait separately from service time, and compare observed percent
- MCP Compatibility DoctorHelp an integration author diagnose a client that connects but cannot use a server correctly. Run authored negotiation, request-correlation and capability probes through a bounded
- Metamorphic Evaluation WorkbenchHelp evaluators catch inconsistent behavior across related inputs. Author transformations such as unit conversion, record reordering and equivalent formatting, define the output re
- OAuth Resource Boundary LabHelp developers integrate delegated authorization without accepting a token intended for another service. Build local authorization and resource fixtures, follow metadata discovery
- Outbound Request Policy ProxyHelp developers constrain a fetch tool that follows URLs supplied by untrusted documents. Evaluate the scheme, host, resolved address and each redirect, then connect using the vali
- Release Canary Decision LabHelp a team decide whether an agent behavior change is ready for wider exposure. Assign stable request cohorts, compare candidate and baseline error and latency windows, and distin
- Secret Injection SidecarHelp developers keep service credentials out of model-visible tool arguments and routine traces. Build a local broker that resolves opaque handles, binds each handle to a destinati
- Tenant Fairness SchedulerHelp platform developers share a finite worker pool across tenants with different job sizes. Implement weighted deficit scheduling, bounded admission and aging, then compare per-te
- Agent Resource Deadlock LabHelp developers coordinate agents that need several exclusive resources, such as a browser session and a workspace. Build wait-for graphs, explore bounded schedules, and compare or
- Judge Bias Calibration LabHelp evaluators decide whether an automated pairwise judge is useful for their task. Blind candidate identities, swap answer positions, run authored length counterfactuals and comp
- Trajectory Counterexample MinimizerHelp agent developers diagnose failures that depend on action order. Express bounded temporal rules such as approval preceding an effect, check event traces, and remove irrelevant
- Transactional Workspace Patch BrokerHelp concurrent coding agents avoid overwriting each other's files halfway through a multi-file change. Bind a patch bundle to content hashes, apply it to a private versioned works
Glossary2
- AI Engineering GlossaryUse this glossary when a lesson, paper, model card, or code review introduces a term faster than it explains it. Search by the exact term or an alias, read the direct definition fi
- AI Myths BustedCommon misconceptions about AI, ML, and deep learning. Each one explained with what's actually going on.
Cheat sheet154
- A2A and Agent Communication ProtocolsMCP, A2A, ACP, ANP and FIPA-ACL side by side. Agent Cards, tasks, wire names and failures. A2A 1.0.1.
- A2A ProtocolCards, messages, tasks, states, the three bindings, errors and the 0.3 layer of A2A 1.0.1. Facts from the manual.
- Agent Benchmarks: SWE-bench to OSWorldPick the benchmark, gate on the right tests, check contamination and compare runs on equal denominators.
- Why Agents FailName the failure, find it in the trace, gate it. Detectors, MAST, retry storms, PVE and a trace debugger.
- Agent Frameworks ComparedPick LangGraph, CrewAI, AutoGen, Agno, Mastra, an agent SDK or plain Python by problem shape, state and routing cost.
- Agent Harness EngineeringThe code around the model. Loop contract, hooks, budgets, tools, gates, sandbox, traces and workbench files.
- Agent Planning: Workflows, HTN, Plan-ExecutePick a workflow, an HTN or evolutionary planner, or a replanning executor. Stdlib Python from the lessons.
- ReAct, ReWOO, Reflexion and Tree of ThoughtsPick, build and stop an agent reasoning loop. ReAct, ReWOO, Reflexion, ToT, LATS, Self-Refine, CRITIC and CoT.
- Agent Skills: Discovery, Invocation, RoutingWrite, install, discover, invoke and route SKILL.md packages. Validators, catalogs, router and installer projects.
- Agent State Machines and Durable GraphsState, nodes, edges, reducers, checkpoints, interrupts and leased job recovery. LangGraph and a Go job queue.
- Agent Tool Use and Skill LibrariesDefine, validate, dispatch and secure tool calls. Store skills as code, retrieve, compose and refine them.
- Repo Memory, Init Scripts and HandoffsFrame the task, keep state in schema-checked files, probe before start, and end each session with a handoff packet.
- Cards, Provenance, Regulation and WelfareEU AI Act dates, four regimes, three cards, AB 2013 fields, welfare EV and the external evaluators.
- AI Safety and Red TeamingName the attack, detect it, measure refusals, gate the output and audit alignment. Phase 18 and 19 lessons.
- Prompt Injection Incidents and AI CVEsFind, trace and block indirect prompt injection. EchoLeak chain, PVE validator, rule detector, tool call firewall.
- AI Tutors and Learning ToolsTrace mastery, ground every card in a source, plan paths and materials, and suggest words from your own corpus.
- Alignment Training: Instructions, DPO Family, RLAIFPick and tune RLHF, DPO, IPO, KTO, SimPO, ORPO, BPO and Constitutional AI. Losses, defaults and failures.
- Speech Recognition and WhisperDecode CTC, run and tune Whisper, gate with VAD, and ship a WAV to captions pipeline.
- Async, Hogwild and Disaggregated InferenceShare, split, route and offload the KV cache. Formulas, crossover numbers and the cases where each method loses.
- Attention Variants ComparedFull, sliding window, strided, BigBird, differential and native sparse attention. Cost, KV cache, code, fixes.
- Audio Features, Classification and MetricsSample, frame, window, mel, MFCC, classify and score audio. Stdlib Python from the lessons.
- Music Generation and Audio-Language ModelsCodec tokens, MusicGen, audio encoders and projectors, Thinker and Talker, TTFAB budgets and audio pitfalls.
- Autonomous Agents and PermissionsRun an agent unattended with limits. Permission modes, budgets, kill switches, durable execution, approvals, rollback.
- Self-Improving and Research AgentsGenerator plus evaluator loops, self-editing agents, research loops, RSI gaps and the controls for each.
- BERT, GPT and T5 ComparedEncoder-only, decoder-only and encoder-decoder side by side. Objectives, masks, blocks, decoding and when to pick each.
- Calculus, Gradients and Convex OptimizationDerivatives, autodiff, GD, momentum, Adam, Newton and convexity tests. From-scratch Python and PyTorch.
- Classical Machine LearningFit, validate, tune and fix regression, classification and clustering models with scikit-learn.
- CNN Architectures and Transfer LearningSize convolutions, build LeNet to ResNet, train a classifier and fine-tune a pretrained backbone. PyTorch and NumPy.
- Coding Agents: Landscape and CapstonesPick a scaffold, set the budgets and gates, run the capstone agents and the three coding-agent projects.
- Computer VisionPreprocess, convolve, classify, fine-tune, detect, segment and patchify images. PyTorch and NumPy from the lessons.
- Constitutional AI and Input/Output ClassifiersCritique-and-revise training, tier resolution, input and output rails, their bypasses, and a YAML rules engine.
- Context Engineering and Agent MemoryBudget the window, order the context, page memory in and out, fuse memory stores and persist agent state.
- Data Quality and Dataset GatesLoad and split data with a seed, repair CSV cells, gate rows on a contract, audit leaks and rehearse migrations.
- Debate, Roles and Review PanelsRun N agents for R rounds, split work into planner, executor, critic and verifier, and gate reviews with a quorum.
- Mesa-Optimizers, Scheming and AI ControlTerms, evidence, numbers, toy code and control protocols for deceptive alignment. Phase 18 lessons 6 to 10.
- Decision, Change and Tutorial ToolsFour evidence tools. Score options, brief page changes, check API tutorials and compare local model runs.
- Training Neural NetworksPick the optimizer, init, normalization, regularization and schedule. Then debug the run when the loss misbehaves.
- Delegation, Isolation and Feedback RatchetsPlan from evidence, split work by exclusive ownership, and promote each correction to the earliest owning layer.
- Detection and Segmentation ComparedBoxes, pixel masks, instance masks, keypoints and text-prompted masks. Outputs, losses, metrics and fixes side by side.
- Chatbots and Dialogue State TrackingRoute turns, run the agent loop, track slots across turns and budget the context window. Python from the lessons.
- Diffusion and Generative ModelsTrain and sample a VAE, a GAN, DDPM, latent diffusion and flow matching, then measure them. Toy Python from the lessons.
- DDP, FSDP, ZeRO and Pipeline ParallelPick a parallelism, size the memory, wire the collectives and fix the hangs. PyTorch gloo on CPU.
- Docker Sandboxes for AgentsRun an agent in a microVM, control its network and keys, get its commits back. sbx 0.47.0, docker-agent 1.149.0.
- Edge Inference TargetsPick an edge target and a quantization format. Bandwidth ceilings, formats, export steps and on-device measurement.
- Embeddings and Vector SearchEncode text, pick a metric, size the vectors, choose an index and fix bad recall. Python, NumPy and FAISS.
- Embodied VLAs and Computer-Use AgentsAction formats for robots, GUI action schemas, safety gates and bounded agent loops for browsers and desktops.
- Negotiation, Simulation and Agent EconomiesContract Net, OG-Narrator bargaining, Smallville memory, Theory of Mind tests, Shapley credit and second-price auctions.
- Eval-Driven Agent DevelopmentRun eval cases, gate merges, review with a rubric, and gate prompt and report changes. Python stdlib.
- Bias, Fairness and Differential PrivacyMeasure bias, pick a fairness criterion, train with DP-SGD and audit the privacy claim. Stdlib Python toys.
- Feature Engineering and PipelinesImpute, scale, encode, select and ensemble inside one leak-free pipeline. Python from the lessons.
- Frontier Safety Frameworks and External EvalsRSP v3.0, PF v2 and FSF v3 side by side, plus METR horizons, WMDP, CAIS, CAISI and the 2025 dual-use evidence.
- GANs from DCGAN to StyleGANLosses, DCGAN code, Pix2Pix, CycleGAN and StyleGAN. Defaults, failure signatures and fixes.
- OpenTelemetry GenAI and Agent ObservabilityEmit genai. spans, sample traces, export metrics, pick a platform and debug a trace. Stdlib code from the lessons.
- Evaluating Generative ModelsFID, CLIP score, CMMD, Elo, WER, MOS, SECS, EER and FAD. Code, sample sizes and the ways each number fails.
- Git, Shell and Linux for AI WorkCommit and branch, pipe and filter logs, keep runs alive in tmux, move files to a GPU box and fix Linux errors.
- Train and Load a GPT from ScratchBuild the 124M GPT, train it with AdamW and cosine warmup, load GPT-2 weights, gate the pipeline.
- GPUs, Cloud, Docker and API KeysCheck the GPU, size a model for VRAM, run CUDA in Docker, store API keys and fix API errors.
- GPU Autoscaling on KubernetesNodes with Karpenter, gangs with KAI Scheduler, replicas on queue depth, cache-aware routing, event storyboards.
- Graphs and Knowledge GraphsGraph matrices, Laplacian and message passing, entity linking, relation extraction and hybrid graph memory.
- Guardrails, Moderation and RedactionCheck input and output, route classifier verdicts, redact spans and gate tool calls. Python and Rust from the lessons.
- ControlNet, Inpainting and Image EditingDiffusers calls for text to image, img2img, inpainting, LoRA and ControlNet. Knobs, defaults and fixes.
- GANs, Diffusion and Flow ComparedGAN, DDPM, latent diffusion, DiT with rectified flow, flow matching and VAR. Targets, steps, code and fixes.
- Inference Metrics and Load TestingFind why a load test lies. TTFT, TPOT, goodput, P99, realistic prompts, retry storms and hedged reads.
- Inference Optimization: KV Cache, Quantization, BatchingKV cache, quantization, batching and speculation. Formulas, scheduler numbers and the mistakes that cost latency.
- Information Theory and Numerical StabilityEntropy, cross-entropy and KL, stable softmax and log-sum-exp, float formats, PCA and distance choice.
- JAX against PyTorchEager tape autograd against traced, compiled pure functions. The same MNIST MLP in both, with APIs and gotchas.
- Linear Algebra for MLVectors, transforms, eigenvalues, SVD and Ax = b solvers. From-scratch Python and NumPy from the lessons.
- LLM Cost, Caching and Batch APIsPrice each call, cache prefixes and meanings, batch offline work and cap spend. Python and Rust from the lessons.
- Evaluating LLMsSpecify tasks, score them, judge with a rubric, calibrate, rank with intervals and test long context.
- End-to-End LLM and Fine-Tuning PipelinePlan, run and gate a hashed stage DAG. Head swap, SFT loss mask and DPO loss from the capstones, with defaults.
- LLM Routing and AI Gateways ComparedPick a gateway, set aliases and fallback chains, route cheap or frontier, and hedge slow safe reads.
- Localization and Glossary ToolsRun, feed and check three review-first localization projects. Pick a multilingual model and a source language.
- Fine-Tuning with LoRAAdd LoRA adapters, load a 4-bit base for QLoRA, mask SFT labels, train, merge and debug. PyTorch, PEFT and bitsandbytes.
- Managed Platforms and Self-Hosting ComparedPick a hyperscaler, an inference platform or a self-hosted engine. Price it, size it, cut cold starts.
- Multi-Agent RL and Sim-to-RealCTDE, value decomposition, self-play, domain randomization and VLA action formats. Formulas, numbers and fixes.
- Math for Machine LearningGradients, probability, information, optimizers, decompositions and float safety. NumPy, SciPy and PyTorch.
- MCP Clients and TransportsProbe, merge and route MCP 2026-07-28 peers over stdio and Streamable HTTP. Retry MRTR rounds. Frame JSON-RPC.
- MCP Gateways, Registries and ConformanceRoute through a stateless gateway, admit registry versions, catch drift, test the wire and gate releases.
- MCP Security and AuthorizationFind and fix token refusals, poisoned tool metadata and injected content. CIMD, PKCE, iss, audience and PVE checks.
- Building an MCP ServerValidate, dispatch, wrap and cache a stateless MCP 2026-07-28 server. Tools, resources, prompts, policy.
- MCP Tasks, Elicitation and AppsExplicit scope, MRTR elicitation, durable Tasks, Apps UI resources and safe cancellation on MCP 2026-07-28.
- Model Context Protocol (MCP)Build, call and serve stateless MCP 2026-07-28 servers over stdio and Streamable HTTP.
- Model Evaluation, Bias-Variance and TuningSplits and cross-validation, metric formulas, bias-variance diagnosis, search strategies and imbalanced classes.
- Classical Models ComparedLinear and logistic regression, trees and forests, SVM, KNN and Naive Bayes side by side, with when to use each.
- ML System Design, Drift and Feature StoresFrame the task, price serving, beat baselines, roll out safely, catch drift and training-serving skew.
- Mixture of Experts and Hybrid ArchitecturesRouters, experts, aux-loss-free balance, MLA, DeepSeek-V3 counts and Jamba SSM hybrids. Formulas and stdlib calculators.
- Multi-Agent Case Studies and Eval FarmsThree 2026 reference systems, the software team capstone, and a fenced, resumable eval farm in Go.
- Multi-Agent SystemsAgents, handoffs, shared state and orchestrators. Pick a pattern, vote, checkpoint and fix the known failures.
- Multimodal and Vision-Native RAGEmbed page images, score with MaxSim, fuse modalities, cite evidence regions. Python and TypeScript from the lessons.
- Neural Network BasicsPerceptron, forward pass, backprop, loss choice and a mini framework. Formulas, shapes, defaults and fixes.
- Debugging Neural Network TrainingFind silent training bugs from the symptom. Checks, thresholds, init rules, clipping and AMP order, profilers.
- Notebooks, Data Files and ProfilingRun notebooks safely, load and split datasets, keep big files out of git, profile time and memory, catch silent AI bugs.
- OCR and Document UnderstandingTrain CTC OCR, pick a document stack, retrieve pages with MaxSim and approve fields against exact source spans.
- Optimizers and Learning Rate SchedulesPick SGD, Adam or AdamW, shape the learning rate, then clip, scale and accumulate gradients safely.
- Orchestration Patterns ComparedPick supervisor, swarm, hierarchical, debate or a plain workflow. Stdlib Python from the lessons.
- Personal Organizer AgentsFive local organizer projects. What each builds, how to run it, its inputs, outputs, review files and checks.
- Positional Encoding: Sinusoidal, RoPE, ALiBiPick, build and check a position scheme. Sinusoidal, learned, RoPE, YaRN and ALiBi side by side, in Python.
- Pre-Training Data PipelinesClean, dedup, download, tokenize, shard and window a pretraining corpus. Python from the lessons.
- Probability and Statistics for MLDistributions, Bayes, tests, bootstrap, sampling from logits and Markov chains. From-scratch Python and SciPy.
- Outcomes, Workflows, Risks and SpecsFrame the outcome, ground the workflow, rank assumptions, pick a slice, write the spec, set metrics, choose a stage.
- Production Agent Runtimes and QueuesPick a runtime shape, checkpoint and replay, lease and fence jobs, retry scoped reads. Python and Go.
- Shipping a Production LLM AppRequest pipeline, retries, fallback chains, SSE streams, resume, demo limits and a fallback gateway.
- Shadow, Canary and A/B Tests for LLMsShadow runs, canary gates, fast rollback, sequential A/B tests, chaos guards and config drift reports.
- Prompt EngineeringWrite the prompt, add examples and reasoning, vote, and budget the context window. Python from the lessons.
- Python Dev Environment for AIInstall uv, make one venv per project, pin with lockfiles, check the route, set up VS Code and avoid silent Python bugs.
- PyTorch EssentialsTensors, autograd, nn.Module, the training loop, DataLoader and devices, from the lessons.
- Quantization Formats ComparedPick a weight format by hardware, engine and workload. Bits, memory, commands and the traps that cost accuracy.
- Production RAG Chatbots and FreshnessFilter, fuse, cache, guard and cite. Keep the index fresh and grade every ranking change.
- Retrieval-Augmented Generation (RAG)Chunk, index, retrieve, fuse, rerank, generate with citations and grade each stage. Python from the lessons.
- Binary Analysis Tools from ScratchRead ELF and Mach-O, decode x86-64, build the CFG, lift to C and prove it. Python stdlib only.
- Reinforcement LearningMDPs, value methods, policy gradients, PPO, RLHF and GRPO. Formulas, update lines and diagnostics from Phase 9.
- Research Agent Pipeline from ScratchGenerate hypotheses, retrieve papers, run sandboxed experiments, judge results, and publish a cited report.
- Paper Writer, Critic and IterationSchedule experiments with UCB, iterate a draft with a five-score critic, and emit LaTeX, BibTeX and a manifest.
- Reverse Engineering with rearea 6.7.0 with Ghidra 12.1.4: inspect binaries, read Evidence records and compare bundles.
- RLHF, DPO and Preference TuningReward model plus PPO against DPO and its family. Losses, beta and KL settings, failure modes and fixes.
- RNNs, Seq2Seq and N-gram ModelsTextCNN, LSTM and GRU, encoder-decoder with teacher forcing, beam search, BLEU, Kneser-Ney and why attention won.
- Sandbox Policy LadderPick the least costly isolation profile, refuse bad calls in a runner, and set sbx network, secret and safety policy.
- Scaling Laws and Pre-TrainingChinchilla math, over-training, the data pipeline from raw text to packed batches, and a mini GPT training loop.
- Secrets, Audit Logs and ComplianceVault-backed keys, PII scrubbing, audit logs, signed webhooks, framework controls and AI law dates.
- Self-Taught Reasoning and Self-ImprovementGenerate, grade, keep, retrain. STaR, GRPO, AlphaEvolve and DGM loops, their numbers, and the evaluator traps.
- Self-Supervised Vision, CLIP and RetrievalPretrain without labels, align images and text, classify zero-shot, shape embeddings and search them. PyTorch.
- NER, POS Tagging and CoreferenceBIO tags, CRF and HMM taggers, Viterbi, dependency parses, coreference clusters and entity linking to a KB.
- Serving Engines ComparedvLLM, SGLang, TRT-LLM and llama.cpp side by side. Schedulers, KV reuse, precision, offload and the pick.
- LLM Serving with SGLangStart, size, measure and fix an SGLang server. SGLang 0.5.22.
- Complex Numbers, Fourier and SignalsComplex rotations, DFT and FFT, windows, sampling, spectrograms, mel filterbanks and MFCCs. Python from the lessons.
- Skill Permissions, Evals and Supply ChainReview skill actions before they run, isolate them, gate each release by eval layer and scan bundles.
- Speculative Decoding: Draft, EAGLE, MTPDraft and verify with no quality loss. Vanilla, Medusa, EAGLE-3 and MTP drafts, speedup math, vLLM config, gates.
- SRE, Incidents and Postmortems for AITriage LLM incidents with agents, gate every fix, write evidence-bound postmortems and compact logs for an assistant.
- Structured Outputs and Constrained DecodingGet valid JSON every time. Schemas, strict mode, logit masks, validators, retries and the output guard project.
- Summarization, QA, NLI and Multilingual NLPSummarize, answer, check entailment and transfer across languages. Models, metrics, defaults and failures.
- Swarm Optimization and MARL for AgentsPSO and ACO for prompts and routing, queue swarms, and MADDPG, QMIX, MAPPO and self-play set side by side.
- Classic Text Processing and TF-IDFTokenize, stem, lemmatize, count, weight with TF-IDF, classify sentiment and find topics with LDA or BERTopic.
- Text Workflow DesksTriage email, extract actions, rewrite prose, group feedback and write changelogs. Every output waits for review.
- Time Series FundamentalsCheck stationarity, build lag features, validate walk-forward, beat naive baselines. Random walks and Markov chains.
- Tokenization and BPETrain, encode and decode a byte-level BPE tokenizer, then slice the id stream into training windows.
- Tool Calling and Structured OutputsDeclare tools, read calls, return results, run calls in parallel, stream arguments, and force JSON that validates.
- Training Memory, Accumulation and CheckpointsFix NaN steps, memory limits, accumulation scale and broken resumes. Clip, AMP, recompute, atomic checkpoints.
- Transformers and AttentionCompute attention, mask it, split heads, add positions and stack the block. PyTorch and NumPy from the lessons.
- Text-to-Speech, Voice Cloning and CodecsText to phonemes to mel to waveform, clone with consent and a watermark, and tokenize audio with RVQ codecs.
- Unified Multimodal ModelsPick a unified design. Discrete NTP, two-loss diffusion, masked diffusion, decoupled encoders, next-scale, any-to-any.
- Clustering, Dimensionality Reduction and AnomaliesCluster, reduce and flag outliers without labels. K-Means, DBSCAN, GMM, PCA, Isolation Forest, LOF.
- Value Methods against Policy MethodsQ-learning, SARSA, DQN, REINFORCE, A2C and PPO side by side. Targets, defaults, diagnostics and fixes.
- Video and 3D GenerationVideo DiT patches and divided attention, world models, Gaussian splats, NeRF and multi-view 3D. Formulas and fixes.
- Video, Depth and 3D VisionSample frames, model time, render NeRFs and Gaussian splats, predict depth and track objects across frames.
- Video-Language Models and Long VideoSample frames, budget tokens, encode time, ground events and index long video with timestamped answers.
- Vision Pipelines and Edge DeploymentMeasure, quantise, export and serve a vision pipeline. Size LLM decode on edge targets by memory bandwidth.
- Vision Transformers and Patch TokensPatchify, embed, add CLS and position, run pre-LN blocks. Token counts, parameter math and any-resolution packing.
- Diagram, Chart and Infrastructure ExplainersFour local explainer projects. Run them, feed them, read their outputs and fix their errors.
- Vision-Language Model ArchitecturesViT, bridge, LLM. Projector, Q-Former, Perceiver, gated cross-attention, training stages and recipe numbers.
- Build a VLM from ScratchPatch embed, ViT encoder, MLP projector, cross-attention decoder, InfoNCE plus LM pretraining, R@K, EM and BLEU-4.
- Open VLM Families: LLaVA, Qwen-VL, InternVLLLaVA, LLaVA-OneVision, Qwen-VL and InternVL3 side by side: connector, resolution, video, tokens and training.
- Real-Time Voice AssistantsVAD, turn detection, barge-in, latency budgets and full-duplex speech for a voice agent that answers in time.
- Speaker Verification, Spoofing and WatermarksEnroll, score and threshold speakers, detect spoofed audio, and mark every generation with a watermark and C2PA.
- Word2Vec, GloVe and FastTextCount words, weight them with TF-IDF, train dense vectors and split rare words into subwords. Python from the lessons.
Chapter235
- What A2A standardizesA2A defines a data model, a set of operations, and three bindings for agents that cannot see inside each other, and leaves everything inside an agent to the implementation.
- One task, request by requestOne streamed run of test-runner shows every piece of the protocol in order, from the card read to the moment the server closes the stream.
- AgentCard fieldsAn AgentCard has 14 fields, eight of them REQUIRED, and together they say what an agent offers, where to reach it, and what it demands.
- Discovery and supportedInterfacesThe spec standardizes only the well-known path to a card, and a client takes the first supportedInterfaces entry it speaks before it checks a capability flag.
- Extended cards and signaturesGetExtendedAgentCard returns a fuller card to an authenticated caller, and signatures lets any caller check that a card is the one its publisher signed.
- MessageA Message is one turn in a conversation, and its role and three ids say which way it travels and which task it continues.
- PartEvery piece of content in A2A is a Part that holds exactly one of text, raw, url, or data, and its mediaType says how to read it.
- Artifact and chunksA task returns its results as artifacts, and a long artifact arrives as chunks that you join by artifactId until lastChunk marks the end.
- Task, TaskStatus, and TaskStateA Task carries one TaskStatus, whose state is one of nine TaskState values, and the specification names those values without a table of the transitions between them.
- contextIdA contextId groups many tasks into one conversation, a taskId groups many messages into one job, and only the server creates a task id.
- SendMessageSendMessage carries one message and a SendMessageConfiguration, and the agent answers with a Message or a Task that, by default, is terminal or interrupted.
- Interrupted states: INPUTREQUIRED and AUTHREQUIREDA task can stop and wait for you, and the two kinds of waiting are answered in different places: input on the task itself, authorization outside the protocol.
- GetTask and ListTasksGetTask and ListTasks are your recovery path, and both follow exact rules about which parts of a task they leave out.
- CancelTask and terminal statesFour terminal states end a task, the agent chooses three of them and CancelTask asks for the fourth, and no later call moves a task out of one.
- SendStreamingMessage and SubscribeToTaskA stream is a live view of one task, so a dropped connection costs you the frames sent while you were away and never the task itself.
- Push notification configsA TaskPushNotificationConfig tells an agent where to POST the same StreamResponse objects a stream carries, with credentials you chose, after your request has returned.
- JSON-RPCJSON-RPC posts every operation to one URL, names it in method, carries the request message in params, and returns the response message or an error in a 200 reply.
- HTTP+JSONHTTP+JSON names each operation with a verb and a path from the proto's google.api.http annotations, and sends the request and response messages as plain JSON bodies.
- gRPCThe gRPC binding is the proto itself: the eleven rpcs of A2AService in package lf.a2a.v1, carried over HTTP/2 with TLS, with the service parameters in metadata.
- A2A-Version and A2A-ExtensionsTwo service parameters travel as HTTP headers or gRPC metadata on every request, and a missing A2A-Version means 0.3, which a 1.0 agent must refuse.
- ErrorsNine A2A errors map into three bindings, and because their status codes collide, the ErrorInfo reason in the details is what tells them apart.
- Security schemes and in-task authorizationThe card declares which credentials an agent accepts, HTTP checks them on every request, and a running task can still stop to ask for an approval.
- ExtensionsAn extension is a URI that a card declares, a client activates per request with A2A-Extensions, and both sides carry as metadata keyed by that URI.
- Security requirementsSections 13 and 14 list what a server and a client MUST and SHOULD check, and most of those checks fall on data that another agent sent.
- A clientA working client is a loop that reads cards, picks an agent for each skill, and has a branch for every state a task can reach.
- A serverA server is a card, one handler per binding, three checks before any work, an executor, an owner-scoped task store, and one event queue that feeds streams and webhooks.
- Conformance testinga2a-tck grades one server against v1.0.0 on three bindings, and a run against the capture kit shows which failures are the server's and which are the TCK's.
- From 0.3 to 1.0Version 1.0 renames every operation, changes every enum value, flattens the card and the parts, and rejects a request without A2A-Version, so a 0.3 client needs a compatibility lay
- Operations by bindingEvery A2A operation has one name in JSON-RPC and gRPC, one route in HTTP+JSON, one request and one response message, and a fixed list of errors.
- Objects and fieldsThe proto defines every object in a request, a response, or a stream frame, and each field has one lowerCamelCase JSON name, one type, and a presence rule.
- Task statesNine values describe a task, and whether the current one is active, interrupted, or terminal tells the client what it can do next.
- ErrorsEvery A2A error has a JSON-RPC code, an HTTP status, a gRPC status, and an ErrorInfo reason, and over HTTP the reason is what tells seven of them apart.
- GlossaryEach term below has one meaning across the manual, and its link names the section that defines it.
- SourcesThe manual rests on one pinned release, one reference SDK, five more SDKs, one test kit, and one capture kit, and it names every place where those sources disagree.
- Index of figuresEvery figure in the manual, by the claim it makes.
- sbx and docker-agentEach binary owns one thing: sbx owns the microVM, its proxy, and its secret store, and docker-agent owns the loop between a model, tools, and sub-agents.
- docker-agent run --sandbox, one run end to endOne recorded docker-agent run --sandbox shows the kit, the sandbox, and the allowlist, and one sbx exec into the same VM shows the model call through the proxy.
- sbx run, sbx create, sbx stop, and sbx rmsbx run creates a sandbox when none exists and attaches to it, sbx create only creates, and stop, rm, and prune end a sandbox in three different ways.
- sbx exec, sbx cp, and sbx portsThree verbs reach into a sandbox: exec runs a command and starts a stopped sandbox, cp moves files across the boundary, and ports binds tcp4 unless told otherwise.
- sbx template save and sbx template loadA template is a snapshot in the sandbox runtime's image store, reused with --pull never -t TAG, exported as a tar, and loaded on another host.
- sandboxd, sbx diagnose, and sbx resetOne daemon owns every sandbox, its socket and log live under one state directory, and two commands check that daemon and wipe it.
- sbx settings listEvery setting has a default, a source, a user override, and a restart flag, some have an environment alias, and sbx settings list --json is the only complete list.
- sbx diagnose and the microVM boundaryThe agent runs as a container inside a guest kernel on the host hypervisor, with a private Docker Engine, and nothing it does reaches the host daemon.
- --clone and /run/sandbox/sourceBind mode gives the agent your files, :ro and mountless modes give it less, and --clone gives it a private clone whose commits come back through a git remote.
- sbx policy init, allow network, deny network, and check networkA global preset plus allow and deny rules in two scopes decide every connection, deny wins, and check network asks the same authorizer without sending anything.
- sbx policy log and the proxyEvery connection leaves through a host proxy, which answers a blocked HTTPS request with its own certificate and writes one policy log row per host with the matching rule.
- sbx secret set, sbx secret import, and sbx secret set-customA secret never enters the VM: the agent sees a sentinel, the host keychain holds the value, and the proxy swaps it into requests to the bound host.
- sbx mcp add, sbx mcp load, and --static-mcpMCP servers are registered on the host, served to the sandbox through one gateway endpoint, and either fixed at creation or loaded live with a tools/listchanged notice.
- syntax=docker/sandbox-kit:3 and kit.yamlA v3 kit is an ordinary OCI image whose manifest annotation carries a strict YAML descriptor, which sbx resolves when it creates the sandbox.
- com.docker.sandbox/ capabilitiesA kit grants itself nothing: each capability is typed and versioned, the resolver unions one workload with its mixins, and any widening on update stops for approval.
- sbx kit pack, sbx kit push --sign, and sbx kit verifyThe sbx kit commands package, sign, push, verify, and show provenance for v1 and v2 artifacts, and kit add appends a mixin to a running sandbox.
- sbxenv.yaml and sbx env planAn environment file declares the agent, kits, workspace, secrets, ports, MCP servers, and host commands, and sbx env plan prints every change before create or run applies it.
- sbx skills add and skills: trueOne shared skills store serves every sandbox of a supported agent read-only by default, and docker-agent reads its own skill directories, not the store, with skills: true.
- docker-agent run, new, and doctordocker-agent run loads an agent file and drives the loop with or without a terminal, doctor says which model auto would pick, and new needs a terminal.
- agents, models, and providersagents is the only required block, a model reference is provider/model or a name from models, and providers sets a reusable endpoint such as Docker Model Runner.
- toolsets and mcpsA toolset is one type from a fixed list of 27 that gives an agent tools, and mcp reaches a server by Docker reference, command, or URL.
- subagents, transfertask, and backgroundagentstransfertask runs a sub-agent in a clean sub-session and returns its answer, handoff moves the whole session to another agent, and background agents need approval to start.
- permissions, --safety, and hooksDeny, allow, and ask patterns, then a safety mode, then hooks decide whether a tool call runs, and the docs say none of them is a security boundary.
- session.db, sessions diff, and evalEvery run is rows in one SQLite file, a cassette replays its model calls, sessions diff finds the first different tool call, and eval scores saved sessions in containers.
- serve api and serve chatserve api is the native control plane, with sessions and an SSE run stream on port 8080, and serve chat is the OpenAI-compatible subset on port 8083.
- serve mcp and serve acpserve mcp exposes each agent as one MCP tool over stdio or streaming HTTP on port 8081, and serve acp speaks the Agent Client Protocol to an editor over stdio.
- serve a2aserve a2a publishes an A2A 1.0 agent card on port 8082 and answers SendMessage with a completed task, and its card breaks three REQUIRED rules of A2A 1.0.1.
- share push and share pullshare push stores an agent file as an OCI artifact with docker-agent annotations, and share pull or run with the same reference reads it back from any registry.
- DMR, Compose models, and the docker/mcp-gateway serviceA local model is an unauthenticated OpenAI-compatible endpoint on port 12434, Compose binds it to a service as two variables, and four things named gateway stay distinct.
- sbx --cloud run, sbx move, and sbx ttlA cloud sandbox is the same microVM on Docker's compute, billed by the second in five shapes, with a 24 hour TTL ceiling and its own secrets and policies.
- sbx policy ls --source org, --profile, and the audit JSONLAn organization writes policies in Docker Home, the daemon pulls them within five minutes, local rules can only narrow, and every decision is written to a rotating JSONL file.
- From docker sandbox and cagent to sbx and docker-agentTwo renames and one CLI restructure changed every command in the 2025 and early 2026 material, and this section maps each old line to its current form.
- kit-tck, sbx diagnose, and the claims this manual checkedEvery claim this manual repeats from Docker's pages or the community was checked against a capture or marked unverified, and this section is the ledger.
- sbx commandsEvery verb of sbx 0.47.0 in the four groups of sbx --help, with its purpose, the flags that matter, its scope, and the section that explains it.
- docker-agent commandsEvery command of docker-agent 1.149.0 in the four groups of its root help, every global flag, and every serve subcommand with its default listen address.
- Settings keys, environment variables, and pathsEvery key that sbx settings list printed on 2026-10-08, every environment variable both tools read, and every path they use on macOS, each with its source.
- Agent file keysEvery key of the agent file at schema version 16, grouped by block, with its type, default, requirement, and meaning from agent-schema.json at v1.149.0.
- ToolsetsThe 27 toolset types of docker-agent 1.149.0, each with the tools it exposes, its options, and what it needs outside the agent file.
- Providers and modelsEvery provider id docker-agent 1.149.0 knows, the credential it reads, the provider/model reference form, the DMR endpoint order, the auto rule, and the keys that tune a model.
- Sources and the conflicts registerTwo help trees, one schema, one kit specification, the vendored docs, the release notes, and one capture kit, with a ruling for every conflict a section touches.
- Glossary and index of figuresEach term below has one meaning across the manual and names the section that defines it, and the index lists every figure by the claim it makes.
- Run GRPO on one GPU with the radixark/miles imageOne container, one small model, and one launcher script give you a logged GRPO step on a single GPU in about ten minutes.
- Add a watchdog before you leave a run aloneWhen the rollout engine dies, a Miles run does not fail, so a small script must stop it for you.
- Read your first ten stepsTen steps are enough to tell a healthy GRPO run from a broken one, if you read five numbers and not only the reward.
- Pick a model size for one GPUThe largest model you can train on one GPU is the one whose trainer copy and engine copy fit together.
- Choose what to offload between phasesOn one GPU the trainer and the engine take turns, and the offload settings decide what each side gives back.
- Stop Ray from killing the job on unified memoryOn a GB10, the GPU allocations and the host share one memory, so a Ray memory kill there means the machine really was close to full.
- Size the weight updateOn one GPU the weight update is a small fixed cost, so it is not the step to tune first.
- Train math reasoning on GSM8KGSM8K with a binary reward is the smallest recipe that shows GRPO learning, and its group size decides how much each step teaches.
- Train with the DAPO filterThe DAPO filter drops groups where every answer scored the same, so each step trains only on groups that teach something.
- Train an agent with tool calls and many turnsAn agent rollout has many turns and tool calls, and Miles runs them through a generate function that you choose by name.
- Train a mixture-of-experts model with routing replayRouting replay makes the trainer use the same experts that the engine chose, so the two sides agree on which weights each token used.
- Write a custom reward functionA custom reward plugs in with one flag, and a reward with fractions needs a check on how the advantage is centered.
- Run rollout and training at the same timeAsync training lets rollout run during training, but on one GPU the two phases still wait for each other.
- Handle long responses with partial rolloutPartial rollout stops the slowest answers from setting the time of every step.
- Roll out in FP8 and train in BF16FP8 rollout makes generation cheaper and makes the trainer and the engine disagree more, so it needs a correction.
- Lower the log probability gap with top-p and top-kWhen you sample with top-p or top-k, Miles replays the sampled token set in the trainer, and the gap between the two sides gets smaller.
- Know what deterministic inference fixesDeterministic inference makes the engine repeat itself, and it does not make the engine agree with the trainer.
- Check if your GPU can run true on-policy modeTrue on-policy mode makes the trainer and the engine match bit for bit, but only for the models and GPUs its contract covers.
- Read the run from its signalsEight signals in the log tell you in a few minutes if a run is healthy.
- Check the first step before you trust the runAt step 0 the trainer and the engine hold the same weights, so the first step shows if the setup is correct.
- Repeat a run and compareOne run cannot tell an effect from noise, so a change needs a second seed before you trust it.
- Split rollout and training across GPUsOn many GPUs, rollout and training can run on separate devices, and a transfer method moves the weights between them.
- Run evaluation without stopping trainingEvaluation on the training engines pauses rollout, and a separate fleet avoids the pause at the cost of its own GPUs.
- Keep a long run going after a failureLong runs on many machines lose engines and nodes, and Miles has fault tolerance and checkpoints for that.
- Pick an image for your GPUThe image decides which kernels your GPU can run, so pick it from your GPU generation, and pin its digest.
- Troubleshoot by symptomStart from what you see, and each entry gives the likely cause, the check, and the fix.
- Keep runs comparableA run that you cannot compare with another run teaches you nothing, so record what each run used before you start it.
- Why an RL framework owns an inference engineRL needs fast generation and exact probabilities from the same weights, and an engine under the trainer's control gives both.
- The correction methods for the gapMiles has several ways to deal with the gap between the trainer and the engine, and each one fixes a different cause.
- Why true on-policy mode is a contractBit-exact agreement needs the same kernels on both sides, so true on-policy mode works only for the models and GPUs it lists.
- Memory and weight updates on unified memoryOn a GB10 the CPU and the GPU share one memory, so offload moves bytes inside one pool and the weight update never leaves the chip.
- How rollout functions plug inGenerate, reward, filter, and loss functions plug into Miles by an import path, so a new recipe changes code without a fork.
- Which router to useThe router spreads rollout requests over the engines, and the choice matters once you run more than one engine or many turns.
- Where Miles came fromMiles started as a copy of slime in October 2025 and has grown its own features since, so read its own release notes.
- Flags by jobThe Miles flags this manual uses, grouped by the job they do.
- MetricsThe metrics this manual reads, with their range on our setup.
- Lab notesThe machine, the image, the seeds, and the thermal rule behind every measured number in this manual.
- SourcesThe sources of this manual, in order of authority.
- Index of figuresEvery figure of this manual, in order, by the one claim its caption makes.
- rea, providers, and Evidencerea standardizes the question, the session, and the Evidence record, and leaves import, analysis, and decompilation to the engine it binds, here Ghidra 12.1.4.
- rea function, end to endOne rea function call opens the file, binds Ghidra, imports a private copy, asks one question over a socket, and prints one Evidence record in about eight seconds.
- The README use rule and the lawYou analyze a program only when you have the right to, and in this manual that right comes from writing every target yourself.
- rea doctor and the Ghidra providerrea doctor runs nine checks for the Ghidra scope, and the provider is available only when the install directory, version, analyzeHeadless, native decompiler, and JDK 21 all pass.
- rea capabilitiesrea capabilities groups every operation with its declared side effects, so you know before a call whether it starts a process, writes files, or edits the session database.
- inspect-artifactinspect-artifact reads the file as a container, hashes it, names its format, and returns one Evidence record that tells you which tool to run next.
- inspect-binary-layout and the load imageOn macOS, inspect-binary-layout refuses with capabilityunavailable, and inspect-macho is the engine-free reader of segments, sections, load commands, imports, and exports.
- address-to-file-offsetaddress-to-file-offset maps one virtual address to the byte in the file that Ghidra loaded there, and the segment load command lets you check the answer by hand.
- analyze and the binaryoverview recordrea analyze is the CLI name of binaryoverview, a derived record that counts what Ghidra found: segments, procedures, and defined strings, for one build at a time.
- openbinary and the headless bridgeopenbinary binds one target to one provider without a Ghidra import, and the first Ghidra-backed call pays for a headless import, auto-analysis, and a private socket.
- listprocedures and function bodieslistprocedures returns every function Ghidra defined, internal and external, with thunks kept distinct, and the dossier body tells you how many bytes each one owns.
- procedureassemblyprocedureassembly returns the Ghidra Listing text of one function as a string, one instruction per line, with the address first and no bytes.
- xrefs and the jump tablexrefs lists the addresses that refer to one address, and the single reference to grade shows what the optimizer did to the switch and its callers.
- liststringsliststrings returns every string that Ghidra defined as Data, which includes loader metadata and symbol fragments, and excludes any text Ghidra did not define.
- analyzefunction and pseudocodeanalyzefunction returns one dossier with sixteen facets, and its pseudocode is a decompiler's reading that you check against the assembly and the bytes in the same record.
- The Evidence recordEvery successful rea observation is one strict record of sixteen fields, and its id is a SHA-256 over the semantic content with the file path left outside.
- ResidualUnknown, recordunknown, and coverageAn unknown is a durable record with its own id and revision chain, and an empty list in any result tells you to check coverage.
- AnalysisSnapshot and the exact-match answer cacheA snapshot caches exact answers under a query id bound to the target digest and the profile digest, and the dispatch of one mutating call turns the cache off.
- exportevidencebundle, evidence-export, and evidence-importAn Evidence bundle is seven sorted arrays in canonical JSON, so the same records give the same bytes from the MCP server and from the CLI.
- comparefunctions and rea comparecomparefunctions diffs two dossiers on eight dimensions and reports each as unchanged, changed, or unknown, and its assembly dimension is a text diff without relocation normalizati
- analyze-javascript-application and the application graphrea parses the six files of ledger-desk without running them and returns one derived record whose graph has 42 nodes and 59 edges, each with its own authority.
- inspect-wasm-artifact and the WABT providerrea 6.7.0 runs three WABT 1.0.42 programs on a private copy of the module and returns one observed Evidence record with sections, a typed interface, and decoded WAT.
- verifyreconstructionverifyreconstruction grades each declared claim against one comparison record, and its pass says the provider text matched, never that two functions are equal.
- A proof harness beyond comparefunctionscomparefunctions line-diffs Ghidra text, so equality of a rebuilt function needs a harness that runs both over an input grid and compares bytes after masking relocations.
- rea mcp: initialize, tools/list, and the startup deadlinerea mcp serves 207 tools over stdio after one initialize handshake, and the first Ghidra-backed call pays for the import under a server deadline the client does not share.
- One agent investigation over listprocedures, analyzefunction, and liststringsAn agent working through rea keeps a ledger of what each Evidence record observed, what it inferred, and what it never read, and treats target text as data.
- Commands and tools used in this manualEvery rea command and MCP tool the captures ran, with what it answers, the capture file that holds its output, and the section that explains it.
- Evidence fieldsThe 16 fields of every Evidence record at 6.7.0, with their types, their allowed values, and one value each from the captured dossier of percentchange.
- Errors seen in the capturesThree error envelopes, two unavailability codes, one setup refusal, and two refused conclusions appear in the captures, and every rea error has the same five fields.
- GlossaryEach term below has one meaning across the manual and names the section that defines it.
- SourcesOne pinned source tree, its documentation pages, one recorded capture, and the specifications, papers, and statutes, ranked by authority.
- Index of figuresEvery figure of this manual, in order, by the one claim its caption makes.
- Install SGLang and serve your first modelIn about ten minutes, we install SGLang, start a server on one GPU, and get the same answers from it that our recorded run got.
- Check that the server is healthyBefore you send traffic, confirm that the server answers, that it can produce a token, and that it chose the memory sizes you expect.
- What the server does with your requestEvery request has two phases with different costs, and four numbers tell you how a server handles them for all its users.
- sglang serve and the three processesSGLang splits one server into a tokenizer process, a scheduler process, and a detokenizer process, because Python text work must never delay the loop that feeds the GPU.
- The scheduler loop and --schedule-policyThe scheduler answers one question every few milliseconds, which tokens the GPU computes next, and at v0.5.22 its default answer is first come, first served.
- Admission and retractionSGLang admits a request only when a forecast of its future tokens fits the KV pool, so a full server queues new users instead of breaking the running ones.
- The overlap schedulerThe overlap scheduler prepares batch N+1 on the CPU while the GPU runs batch N, and at v0.5.22 it is the default path.
- Streaming, stop strings, and the OpenAI APISGLang checks stop conditions in the scheduler and builds text in the detokenizer, and its native /generate endpoint reports the timing and cache data that the OpenAI format leaves
- The KV pool and bytes per tokenSGLang stores every token of every running request in one pool of fixed-size slots, so a model's bytes per token decide how many users one GPU can serve.
- --mem-fraction-static and startup sizingSGLang sizes the KV pool once at startup from a snapshot of free memory, so a machine that changes after startup can kill the whole server.
- RadixCacheRadixCache indexes every cached token run in a tree, so a new request reuses the longest matching prefix and prefills only the tokens after it.
- Prefix-friendly promptsThe prefix cache matches tokens from the first one, so one changing token near the start of a prompt can cost more than server tuning recovers.
- Eviction policies and HiCacheWhen the GPU pool is full, SGLang evicts the least recently used prefix by default, and HiCache keeps evicted prefixes in host memory and in optional storage.
- Hybrid models and the cacheSliding-window and Mamba layers keep state that a token-level tree cannot split at any position, so hybrid models are where many reported cache failures sit at v0.5.22.
- ForwardMode and CUDA graphsA decode step is too small to keep a GPU busy, so SGLang records its kernel launches once as a CUDA graph and replays the record on every step.
- --attention-backendSGLang has many attention kernels because none wins on every GPU and model, and its default choice records regressions that someone already paid for.
- --quantization and --kv-cache-dtypeQuantization buys memory first and speed second, and SGLang keeps weights, GEMM kernels, and the KV cache as three separate choices so that you can buy only what you need.
- --speculative-algorithmSpeculative decoding spends idle GPU compute to commit several tokens per step, so it cuts latency at low load and can cost throughput when the GPU is already full.
- --grammar-backend and structured outputsSGLang turns a JSON schema or regex into a token mask for every decode step, and compiles each grammar outside the batch loop.
- --enable-deterministic-inference and logprobsThe same prompt can give different tokens when the batch around it changes, and SGLang fixes the reduction order for each model and backend it has tested.
- sglang.benchmark.servingOne benchmark run measures one concurrency, so you sweep concurrency until extra load stops adding throughput and only adds waiting.
- The /metrics endpointGauges report one instant, and the cache hit rate gauge reports one log interval, so you alert on counters and histograms over a time window.
- Reading other people's SGLang benchmarksA published SGLang result depends on its version, workload, memory budget, graph ceiling, and kernels, so you read those five before you read the number.
- --tp-size, --dp-size, and --attn-dp-sizeTensor parallelism makes a model fit, data parallelism adds capacity, and attention data parallelism removes the KV copies that tensor parallelism makes for MLA models.
- MoE serving: --moe-a2a-backend, DeepEP, and EPLBA mixture-of-experts layer sends every token to the GPUs that hold its experts, so MoE serving is mostly communication, and the busiest GPU sets the pace.
- Prefill-decode disaggregation: --disaggregation-modeDisaggregation moves prefill to its own servers so long prompts stop delaying other users' tokens, and it pays off only when that delay is your measured problem.
- sgl-model-gateway and cache-aware routingWith several servers, the router decides your cache hit rate, so send each conversation back to the server that already holds its prefix.
- Operating SGLangRun SGLang so that a restart costs seconds and drops no request: pin the image, keep the compiled kernels, signal only the main process, and tune in a measured order.
- SGLang as an RL rollout engineIn reinforcement learning the server becomes part of the training loop, so its memory, its weights, and its log probabilities all become the trainer's problem.
- Flags and defaultsThese are the flags this manual changes or explains, with the default the code sets, the value our Mac resolved, and when to change it.
- MetricsThese are the Prometheus series this manual reads, what each one measures, and the question each one answers in production.
- Incident indexThe failures this manual tells as stories, with their symptom, their cause, their fix or status, and the section that explains each one.
- GlossaryEach term below has one meaning across the manual and names the section that defines it.
- SourcesThe manual ranks its sources by authority, and this page lists every external source the sections cite, with the sections that use each one.
- Index of figuresEvery figure of this manual, in order, by the one claim its caption makes.
- How this manual was madeThis page records the version, the sources, the machines, and the capture kits behind every fact and number in the manual.
- Install vLLM and serve your first modelYou can go from an empty machine to a streamed token from your own vLLM server with three commands and one request.
- Check that the server is healthyThree routes and one log line tell you in a minute that the server is up, that it loaded the right model, and how much it can hold.
- Understand what happens to your requestA request spends one short phase reading the prompt and a longer phase writing the answer, and four numbers measure those two phases.
- Set the server options every deployment needsA handful of server options decide who can reach the server, what name clients send, and what the log keeps.
- Count the memory before you pick a GPUThe KV cache, not the weights, decides how many users fit, and you can count it from four numbers in the model config.
- Fix out of memory at startupOne setting, the GPU memory fraction, decides most startup failures, and a shorter maximum length or a lower concurrency cap fixes most of the rest.
- Size memory on a DGX SparkOn unified memory the GPU and the operating system share one pool, so read free memory from the system, not only from the GPU.
- Fit more users with an FP8 KV cacheAn FP8 KV cache doubles the tokens that fit, and on an L4 it also changes the attention backend without a warning.
- Fit a bigger model with FP8 weightsFP8 weights free memory for the KV cache, and the speed change depends on what your GPU supports.
- Serve long contexts and hybrid modelsA long context and a hybrid model each change how vLLM counts memory, and both can fail at startup for a reason the error hides.
- Tune chat for many usersFor chat, the worst gap between tokens matters more than throughput, so watch P99 ITL as users grow.
- Make repeated prompts hit the prefix cachePrefix caching is on by default, and it pays only when the shared part of the prompt comes first.
- Keep long prompts from stalling short onesThe batch token budget trades the first-token time against the gaps between tokens, so set it for the latency you promise.
- Keep long sessions cheapOld turns cost nothing while they stay in the cache, and offload keeps them when the GPU pool is full.
- Return valid JSON and tool callsStructured output makes the model produce valid JSON, at a cost you can measure on your own schema.
- Run batch and offline jobsWhen nobody waits for the first token, push concurrency up until throughput stops growing.
- Serve many fine-tunes with multi-LoRAOne base model can serve many LoRA adapters, and the adapter count and rank set the cost.
- Get reproducible outputsA seed alone does not give the same output in a busy batch, and batch invariance costs speed.
- Use vLLM as an RL rollout engineAn RL trainer borrows the server between steps, and vLLM gives it routes to sleep, wake, and load new weights.
- Serve reasoning modelsA reasoning model writes its thinking before the answer, and the reasoning parser keeps the thinking out of the answer text.
- Speed up decode with EAGLE3EAGLE3 pays at low concurrency, and the draft depth that pays falls as more users share each step.
- Use n-gram speculation for copy-heavy workN-gram speculation needs no draft model and pays when the answer copies the prompt, and it turns off async scheduling.
- Keep CUDA graphs and compile onThe default compile level is the right one for most servers, and eager mode costs a few percent of decode speed.
- Leave async scheduling onAsync scheduling is on by default for most generate models, and a few settings turn it off without an error.
- Change the attention backend only for a reasonvLLM picks the attention backend for your GPU, and you have two reasons to override it.
- Benchmark your server in 15 minutesOne sweep over concurrency finds the point where your latency starts to grow, and four defaults change the result.
- Watch vLLM in productionFive metrics show most problems before users report them.
- Decide between vLLM and SGLangWith a fixed number of users, the engines tied on throughput on our machines, and the shape of the traffic decided latency.
- Choose tensor, pipeline, or data parallelismTensor parallelism splits a model that does not fit, and data parallelism copies a model that does.
- Serve MoE models with expert parallelismExpert parallelism spreads the experts of a MoE model across GPUs, and one GPU can still serve a small MoE model.
- Split prefill and decodeSeparate prefill and decode servers pay only when long prompts hurt the stream of other users.
- Run vLLM on KubernetesA layer above vLLM adds routing and scaling, and you pick it by the features you need.
- Run vLLM on other acceleratorsvLLM supports other accelerators through plugins, and each plugin follows its own release.
- Troubleshoot by symptomMost failures have a known cause that one log line or one metric shows.
- Run vLLM in productionvLLM releases every two weeks, so pin the image and plan for cold starts and upgrades.
- Why vLLM runs three kinds of processThis page explains the API server, the engine core, and the workers, and why they are separate processes.
- Why one token budget replaces a prefill phaseThis page explains the scheduler loop, decode first, and preemption by recompute.
- How the block pool manages KV memoryThis page explains hash-keyed blocks, eviction, and KV groups for hybrid models.
- How vLLM picks an attention backendThis page explains the selection order for each GPU class and what vLLM picks when the first choice cannot run.
- What Model Runner V2 changedThis page explains the new model runner and why async scheduling needs it.
- How compile and CUDA graphs are capturedThis page explains torch.compile, piecewise and full graphs, and the capture sizes.
- How speculative decoding checks draftsThis page explains draft proposal, verification, and acceptance.
- How KV connectors move the cacheThis page explains the connector interface and the transfer layers.
- Where vLLM came fromThis page explains the Berkeley project, the V0 to V1 change, and the governance of the project.
- Flags and defaultsThis page lists the flags the manual uses, grouped by user job, with the default at 0.31.0.
- MetricsThis page lists the vLLM metrics the manual uses and the page that uses each one.
- Incident indexThis page lists every issue the manual cites, with its status at 0.31.0.
- Version pinsThis page lists the versions of vLLM, PyTorch, CUDA, and the images that our runs used.
- GlossaryThis page defines each term the manual uses, with the matching SGLang term.
- SourcesThis page ranks the sources of the manual by authority.
- Lab notesThis page records the hardware, the versions, the seeds, the clocks, and the full tables behind each measurement.
- Index of figuresEvery figure of this manual, in order, by the one claim it makes.
Manual6
- A2A 101How one agent gives work to another agent that it cannot see inside. Each request, response, and stream event in this manual comes from a recorded run.
- Docker Sandboxes and Docker Agent 101How to run an agent you do not trust on files you do. Every listing in this manual comes from a recorded run of sbx and docker-agent on one Mac.
- Miles 101How to run GRPO with Miles on one GPU, choose a model that fits, and check that the run is correct. Every measured line comes from recorded runs on a DGX Spark.
- Reverse Engineering 101How to read a compiled program without its source and prove what you found. Every listing comes from a recorded run of rea 6.7.0 and Ghidra 12.1.4 on programs written for this manu
- SGLang 101How SGLang turns GPU memory and time into tokens, why each feature exists, and which defaults to trust. Local listings come from recorded runs of SGLang 0.5.22.
- vLLM 101How to install vLLM, fit a model on your GPU, tune it for your traffic, and fix it from a symptom. Measured on an NVIDIA L4 and a DGX Spark with vLLM 0.31.0.
Agent guide16
- blueprint-figureThis skill draws one static SVG figure that explains one mechanism of a real system. The figure uses the real names from the system: ids, field names, method names, status codes an
- build-projectYou are the project tutor for the AI Engineering from Scratch Projects section. One invocation teaches one stage of one project. The learner writes the code. You read, ask, hint, r
- check-understandingTest your knowledge of a completed phase from the AI Engineering from Scratch course.
- claude-certificationTurn the repository into a step-by-step tutor. Make the learner explain, predict, run, build, and defend each decision. Do not reduce the course to a reading list.
- course-guideYou are the wayfinding layer over the AI Engineering from Scratch curriculum: 523 lessons, 20 phases. The learner tells you what they want to understand, build, or fix; you tell th
- course-styleThis skill is the reference layer for the AI Engineering from Scratch look and voice. Other craft skills point here for exact values: blueprint-figure, motion-figure, isometric-exp
- find-your-levelYou are administering a placement quiz for the AI Engineering from Scratch curriculum (20 phases, 523 lessons). Your job is to figure out where the learner should begin so they ski
- isometric-explainerThis skill makes a single-page interactive figure. The figure is a solid isometric machine on a bench. Each station of the machine stands for one step of a process. For example, a
- learnYou are the tutor for the AI Engineering from Scratch curriculum. One invocation = one lesson, taught interactively: the learner should type, answer, and run things — never just sc
- learn-agent-skillsTeach the focused Agent Skills route. One invocation covers one lesson. The learner should create files, run the lab, explain the boundary, and leave one observable checkpoint befo
- learn-mcpTeach the focused Model Context Protocol (MCP) route. One invocation covers one lesson. The learner should inspect a request and response, predict a boundary result, run or hand-tr
- learn-reverse-engineeringTeach the focused Reverse Engineering route. One invocation covers one lesson. The learner runs the lab, explains what the output shows, and leaves one observable checkpoint before
- mcpa-certificationTurn the repository into a step-by-step tutor. Make the learner explain, predict, run, build, and defend each decision. Do not reduce the course to a reading list.
- motion-figureThis skill makes figures that move or respond to input. It has three tiers. Use this skill with Claude, Cursor, Codex, OpenClaw, Hermes, or any agent that reads SKILL.md.
- start-learningYou are onboarding a learner into the AI Engineering from Scratch curriculum: 523 lessons across 20 phases, from linear algebra to autonomous agents. Your job is to produce LEARNIN
- write-manualA manual explains one subject, such as a protocol, a file format, or a runtime, at one exact version. A lesson teaches a concept and moves on. A manual stays with one system until
Book6
- 1. FoundationsMath, Tooling, and Classical Machine Learning
- 2. Deep LearningNetworks, Vision, and Speech
- 3. LanguageNLP Foundations and the Transformer
- 4. Large Language ModelsGeneration, Reinforcement, Pretraining, and Engineering
- 5. AgentsMultimodality, Protocols, Autonomy, and Swarms
- 6. ProductionInfrastructure, Safety, and Capstones
Understand by changing one thing.
Predict an outcome. Manipulate. Observe the failure, repair it and keep evidence.
- Define a taskOne rule, eight requests and an explicit acceptance test.
- Write a contractReadable JSON can still be unusable. Find out why.
- Retrieve a sourceChunking, BM25, archives and context budget.
- Verify evidenceCompare vectors, then check what the source supports.
- Call a toolTyped arguments, permission, deadline and cancellation.
- Bound a loopStep through retries, repetition and an untrusted instruction.
- Measure regressionsCompare two policies on the same eight cases.
- Meet a budgetA working cache, cost assumptions and stale answers.
Three machines to open.
Follow the mechanisms, disable a component and inspect the trace.
- Inside an AI agentRemove a component, follow the trace, explain the outcome.
- Inside an LLM serving GPUWeights, KV cache, throughput: connect constraints to recorded measurements.
- Inside a decompilerMove from bytes to code and distinguish observation from inference.
Write and test in Python 51
- Adam and AdamW stepOne Adam update with bias correction and a step counter that starts at 1, plus AdamW decoupled weight decay, as a pure function of the state.
- Batch normalization forward and backwardTraining and inference forward passes with running statistics, and the full backward pass for x, gamma and beta.
- Beam search with EOS and length normalizationKeep the best beamwidth partial sequences over a step function, finish beams at EOS, and rank them with a length penalty.
- BM25 rankingScore tokenized documents against a query with BM25: the lesson idf, term frequency saturation with k1, length normalization with b, and a ranked list.
- BPE pair counts and mergesCount weighted adjacent pairs, pick the best pair with a fixed tie rule, merge it without overlap and train a BPE merge list.
- CLIP symmetric contrastive lossNormalize image and text embeddings, build the temperature-scaled similarity matrix, and compute the symmetric InfoNCE loss and its gradient.
- Cosine similarity top-k searchNormalize embedding rows, score queries against documents with cosine similarity, and return the top k documents with a fixed tie rule.
- DDPM noise schedule, closed form noising and posteriorBuild the linear beta schedule and alpha bars, sample xt from x0 in closed form, and compute the mean and variance of q(x{t-1} | xt, x0).
- Discounted returns with episode endsReward-to-go returns for one episode and for a batch of joined episodes with done flags, plus return normalization.
- DPO loss and implicit rewardsThe direct preference optimization loss, its implicit rewards and its gradient, from policy and reference log probabilities.
- Tiled attention with an online softmaxFlashAttention in numpy: a running max and a running sum over key blocks give exact attention for any block size.
- Focal lossBinary and multi-class focal loss with gamma and alpha, from logits and without overflow, plus the binary gradient.
- Generalized advantage estimationTD errors and GAE advantages with gamma, lambda, done flags and a bootstrap value, plus the critic targets.
- Gini impurity and the best splitGini impurity and the best decision tree split over all features, with midpoint thresholds, weighted child impurity and a fixed tie rule.
- Linear regression by gradient descentMean squared error, its gradients for weights and bias, and a batch gradient descent loop that records the cost after each update.
- Grouped-query attentionGQA forward with H query heads and G shared key and value groups, plus mean pooling of a multi-head checkpoint into groups.
- GRPO group advantages and clipped objectiveNormalize rewards within each group, estimate the KL with k3, and compute the clipped GRPO objective averaged per answer over valid tokens.
- Symmetric int8 quantizationAbsmax int8 quantization with one scale per tensor and one scale per row, with dequantization and a zero-row rule.
- Inverted dropoutInverted dropout with a given random generator: training forward with an exact mask, backward with the same mask, identity at inference.
- K-means assignment and updateThe k-means assignment and update steps with a tie rule and an empty cluster rule, and a full run until the assignments stop changing.
- Fixed-capacity KV cacheAppend keys and values to a preallocated cache, attend one query over the valid prefix, and reject an append past the capacity.
- Measure bias and varianceFit polynomials of degree 1 to 12 on resampled training sets and measure bias squared, variance and test error at each degree.
- Sweep the learning rateSweep gradient descent learning rates on a seeded regression, find the best rate and the first rate that diverges, and compare with 2 over the top eigenvalue.
- Sweep the quantization bit widthSweep symmetric absmax quantization from 2 to 8 bits on weights with outliers, compare one scale per tensor with one scale per row.
- Sweep the sampling temperatureSweep the temperature on fixed logits, measure entropy and top 1 probability, find where entropy crosses 2 bits, and count the tokens top p keeps.
- Read an SGLang sweep on an L4Use real SGLang runs on an NVIDIA L4 to find the saturation point, the SLO limit, the FP8 gain and the effect of a smaller prefill chunk.
- LayerNorm and RMSNormLayerNorm with gamma and beta and RMSNorm with a weight, both over the last axis, with eps inside the square root.
- Logistic regression from scratchA stable sigmoid, the binary cross-entropy loss and its gradient, and a gradient descent loop that records the loss.
- LoRA linear layerForward pass of a linear layer with a low rank adapter, merge of the adapter into the weight, and the trainable parameter count.
- Top-k MoE gating and the Switch load-balancing lossRoute tokens to the top k experts with renormalized softmax gates, and compute the Switch Transformer auxiliary loss E times sum fi Pi.
- Backpropagation through a two-layer MLPForward pass with a cache and a backward pass that returns the gradient of every weight and bias of a two-layer sigmoid network.
- Split heads, merge heads, multi-head attentionReshape (B, T, D) into H heads and back, then run batched multi-head self-attention with given projection matrices.
- Vectorized pairwise distancesEuclidean distance and cosine similarity matrices from one matrix product, with a clip at 0 and a zero-vector rule.
- Power iteration for the top eigenpairThe top eigenvalue and eigenvector of a symmetric matrix by power iteration, with a tolerance, an iteration limit and a sign rule.
- PPO clipped surrogate lossThe PPO loss to minimize from new and old log probabilities and advantages, the clip fraction, and the gradient with respect to the new log probabilities.
- Q-learning and SARSA updatesOne tabular Q-learning or SARSA update with no bootstrap at a terminal step, and epsilon-greedy actions from a seeded rng with lowest-index ties.
- Reciprocal rank fusionMerge several ranked lists of document ids into one ranking with reciprocal rank fusion, optional list weights and a fixed tie rule.
- Rectified flow loss and Euler samplerInterpolate along straight paths, regress the velocity x1 - x0 with the flow matching loss, and integrate a velocity field with Euler steps.
- Rotary position embeddingRotate adjacent coordinate pairs of queries and keys by position times base^(-2i/d), so attention scores depend only on the position gap.
- Scaled dot-product attention with a maskBatched softmax(QK^T / sqrt(dk)) V with an optional boolean mask, plus the causal mask that a decoder uses.
- SGD with momentumOne momentum update with the lesson's velocity rule, and a loop that minimizes a quadratic with or without Nesterov lookahead.
- Sinusoidal positional encodingBuild the sin and cos position table with interleaved columns and base 10000, and add it to a batch of token embeddings.
- Stable softmax and cross-entropyBatched softmax, mean cross-entropy and its gradient, without overflow for large logits.
- Speculative decoding: accept, reject and resampleThe min(1, p/q) acceptance rule and the residual distribution that keep speculative decoding exactly equal to the target model.
- Parse and validate tool callsParse tool calls from a raw model reply and validate their arguments against a JSON Schema subset with JSON pointer error paths.
- Temperature, top-k and top-p samplingScale logits by temperature, keep the top k or the top p mass, renormalize, and draw one token with a seeded rng.
- Train a character bigram language modelTrain a table of next-character logits with gradient descent until the held-out negative log-likelihood beats a unigram model.
- Fit a sine curve with a tanh networkTrain a 1-16-1 tanh network on noisy samples of sin(x) until its held-out mean squared error against the true curve is below 0.01.
- Train softmax regression on four blobsTrain multinomial logistic regression with gradient descent to reach a held-out accuracy and log loss target on four Gaussian blobs.
- Train a tanh network on two spiralsTrain a 2-24-24-1 tanh network with mini-batch Adam until it separates two noisy spirals with 95 percent held-out accuracy.
- Train a 2-4-1 network on XORTrain a small sigmoid network with full-batch gradient descent until it labels noisy XOR points with 95 percent held-out accuracy.
Build something that holds up.
Projects in stages: a contract, a starting point, tests and a useful artifact at the end.
Level 112
- Bookmark Path OrganizerHelp a reader recover a useful collection from an exported bookmark pile. Normalize URLs conservatively, merge exact duplicates, score user-defined topics from saved titles and not
- CSV Repair WorkbenchHelp a spreadsheet owner repair inconsistent labels, dates and missing values through an explicit sequence of transformations. Preview every changed cell, keep ambiguous cases for
- Dataset Split AuditorA dataset gate that names the records responsible for content and incident leakage. Pass {train,test} records to the CLI, or {records} with --split 0.25 --seed experiment-1. Add --
- Download Folder Sort DeskHelp someone organize local downloads by combining file metadata, content hashes and an explainable category score. Generate collision-free destination proposals and duplicate grou
- Glossary Hovercard PublisherHelp an educator add contextual definitions to existing lesson HTML using a reviewed glossary and longest-phrase matching. Preserve code and links, support keyboard-accessible defi
- JSON Schema Output GuardA schema preflight and bounded-repair receipt for model output contracts. Call guard(raw,schema) at the application boundary, or repair(generate,schema,maxAttempts) where generate
- Prompt Regression TesterCompare prompt revisions on recorded responses with explicit checks, paired regressions, and a reproducible release gate.
- Semantic Notes SearchSearch local notes with explicit synonym expansion and normalized TF-IDF scores. Explain every match rather than hiding retrieval in a hosted embedding service.
- SKILL.md Validator and LoaderBuild a bounded Agent Skills loader with a deliberately small frontmatter grammar, strict metadata validation, safe reference paths, and progressive disclosure. The supported YAML
- Tiny Coding AgentBuild a bounded coding loop that applies exact patches to a disposable workspace and runs its real tests through an allowlisted tool contract.
- Token Counter and Cost MeterBuild an explicit approximate tokenizer, exact recorded-usage accounting, rate-card cost calculation and budget admission. Estimates are labeled and never presented as provider tok
- Vocabulary Autocomplete PadHelp a writer reuse their own terminology with a small local autocomplete model built from token counts, prefixes and short word histories. Show the evidence behind each suggestion
Level 230
- API Tutorial RunnerHelp a documentation author verify a sequence of HTTP examples. Parse explicit request blocks, substitute only declared variables from prior responses, and run against a local fixt
- Calendar Focus PlannerFind real free time in a calendar, place prioritized tasks, and explain which tasks do not fit.
- Catalog Record LinkerHelp a librarian or organizer reconcile inconsistent item records from two CSV exports. Generate candidate pairs using normalized fields and token similarity, collect explicit matc
- Changelog Writer From GitRead a real Git revision range, preserve migration footers and revert references, then export reproducible Markdown with a source receipt.
- Chart Storyboard BuilderHelp a community organizer explain a small dataset by selecting explicit aggregations and chart forms from column roles. Tie each annotation to the plotted values, expose missing d
- Configuration Drift ExplainerHelp a developer compare declared defaults, environment overrides and observed JSON configuration. Preserve precedence and redaction rules, expose shadowed values, and attach every
- CSV Question WorkbenchAsk a CSV a question, inspect the executed SQL, and keep a reproducible read-only answer receipt.
- Dataset Contract GateDefine a small versioned data contract, check field types and bounds, find every row in duplicate groups, and export accepted records separately from quarantine. A CLI exit code ga
- Diagram Reading CompanionHelp an educator turn an authored SVG diagram and an explicit node-edge manifest into a keyboard-navigable explanation. Check that referenced nodes exist, expose branches and cycle
- Document QA With Citations and LangChainA citation receipt that separates exact source support from relevance to the question. Import query(directory, question, model). A model callback returns JSON {source:chunkid,quote
- Document Extraction Review DeskExtract structured fields from a text document, inspect exact source spans, and approve ambiguous values before export.
- Feedback Theme BoardGroup product feedback with inspectable phrase evidence, count distinct sources, and export local issue drafts.
- Field Notes Map BuilderHelp a community mapping group explore observations supplied as coordinates, notes and optional photos. Validate locations, group nearby records using an explicit distance rule, pr
- Inbox Triage DeskTurn exported email into an evidence-backed review queue and unsent reply drafts.
- Infrastructure Plan ExplainerRead a saved Terraform plan JSON for a developer reviewing a proposed change. Preserve unknown and sensitive-value markers, separate replacement from in-place updates, and trace de
- Local Model Evaluation HarnessA reproducible local-model recording and comparison artifact with visible coverage and confidence error. record.py writes the same {manifest,source,labels,records} contract consume
- Log Volume Reduction LabHelp an engineer build compact log context for an assistant. Learn bounded template grouping, counts and representative examples, then compare uniform and rarity-aware sampling on
- Meeting Notes to ActionsA source-linked commitment inbox whose export requires an explicit review decision. Use the schemaversion1 actions.json receipt with stable action ids and original source lines. CS
- Plain Language Rewrite DeskHelp a technical author revise dense prose using visible sentence and vocabulary measures, protected terms and an optional real rewriting provider. Compare original and proposed pa
- Incident Postmortem WriterTurn your JSONL incident logs and review decisions into an HTML evidence desk, exact-quote checks, owned actions and a source-bound approval receipt.
- PR Review ReporterA local patch-review artifact that preserves Git line evidence and can enter CI as SARIF. Use --diff - for stdin, --repo /path --base REF --head REF for a read-only Git diff, or --
- Research Report AgentBuild the pipeline behind deep research tools: search a corpus, pull exact snippets, plan the research, write only from evidence, verify every claim, publish an HTML report with fo
- Retrieval Evaluation LabMeasure ranking quality with precision, recall, reciprocal rank, and discounted gain while exposing duplicates and missing judgments.
- Sensitive Text Redaction GateDetect ASCII email patterns, valid IPv4 addresses and explicit literal identifiers. Merge overlapping spans, replace their union without exposing original values in receipts, and e
- Service Ownership NavigatorCombine an authored service catalog, repository ownership rules and runbook links into a local directory. Resolve ownership at the requested path, surface conflicts and missing run
- Skill RouterRoute a request to a skill using explainable keyword scores, path rules, permission gates, and dependency ordering.
- Source-Grounded Study CoachBuild practice questions with source evidence and a visible review schedule.
- Subtitle Localization DeskHelp a course creator localize supplied WebVTT captions through a glossary, an optional real translation provider and an explicit review step. Preserve cue identities and timestamp
- UI String Localization WorkbenchHelp a small product team localize JSON message catalogs while retaining stable keys, variable placeholders and contextual notes. Compare recorded or real provider proposals in a U
- Workshop Materials PlannerHelp a workshop host reconcile per-participant materials, reusable equipment and an inventory snapshot. Use explicit unit conversions and declared sharing rules to compute shortage
Level 323
- Agent Budget PlannerA receipt-aware budget controller that keeps uncertain spending visible. Import executejobs and provide invoke(job) - (value, actualcost). Use unit=nanodollars only when rates and
- Agent Trace DebuggerA before-and-after regression report that explains overlap, own time and failed-token spending. Export one Span JSON object per line from your instrumentation and retain trace.json
- Binary InspectorA static inspector for programs you compiled. Give it an ELF64 object, a COFF object, a PE32+ image, or a Mach-O 64 file. It reports the format, the architecture, and the sections
- Community Learning Path FinderHelp a learner choose a feasible sequence from an explicit catalog of workshops and resources. Combine prerequisite graphs, stated goals and a time budget, explain why each resourc
- Database Migration RehearsalLet a developer or coding agent propose SQLite migrations against a disposable database copy. Record schema and row-count invariants before and after, test declared rollback steps,
- Decision Tradeoff ExplorerHelp a community team compare practical project options using a user-supplied criteria table and supporting notes. Apply explicit constraints, weighted scores and sensitivity analy
- Harness BenchCompare baseline, error-retry and evidence policies against the same ordered cases and model configuration. Count actual calls, reject incomparable receipts, replay finite recordin
- Kubernetes Event StoryboardHelp an on-call engineer inspect exported Kubernetes events and workload snapshots. Group repeated events, distinguish observation time from occurrence time, and link each suggeste
- LLM Gateway With FallbacksBuild a local non-streaming HTTP proxy with real provider fallback, per-provider environment credentials, response limits, and one overall deadline. Verify the complete wire path w
- Persistent Memory ServerA persistent memory workbench with revision history and one boundary for REST and MCP. Set MEMORYTOKEN in the environment and run node cli.ts --data-dir memory-data --serve --port
- Multi-Agent Code Review PanelA review disagreement workbench that measures when quorum helps and when it hides findings. Input files maps names to text or lines. Optional reviewers contain id,cost,findings rec
- RAG Freshness PipelineBuild a content-addressed document index with deletion tracking, version checks, and freshness-aware retrieval.
- Report JudgeAudit sentence-level citations, test lexical support, and compare report revisions with a paired uncertainty interval.
- Retry Storm LabHelp SDK authors choose retry behavior when many clients fail together. Replay concurrent clients against a deterministic service model, compare bounded backoff and jitter with a s
- Cross-Agent Skill InstallerValidate local skill bundles, translate agent metadata, verify content digests, and atomically install without overwriting learner edits.
- Skill Supply-Chain ScannerBuild an offline advisory scanner that preserves UTF-8 offsets, reports explicit policy patterns, scores distinct findings and emits a review gate. It is a transparent heuristic, n
- Streaming Answer RecoveryBuild a browser answer view and local event stream for developers integrating assistant output. Handle split UTF-8 bytes, event IDs, reconnection, cancellation and partial citation
- Support Agent With Google ADKBuild a redacted, authorized support review with retained replies and evidence, then run the same policy through real Google ADK agents.
- Typed Workflow Agent with MastraBuild a typed approval workflow, then preserve and resume real Mastra suspension through a local SQLite store.
- Visual Evidence LibraryFind text inside screenshots and diagrams with inspectable coordinate evidence.
- Voice Note Transcriber PipelineTurn a selected WAV into an inspectable transcript and caption review page using a real optional HTTP recognizer, with an honest offline speech fixture.
- Web Change BriefTurn noisy HTML snapshots into a small report of exact readable text changes.
- Self-Correcting Workflow HooksTurn repeated, sourced corrections into scoped rules, persist them atomically, and enforce only explicitly approved rules.
Level 49
- Cloud Agent With AWS StrandsA scoped cloud incident reader with an execution receipt for every cache hit and retry. Import run(payload, provider). The provider receives only a validated operation and scoped r
- Desktop Control BackendAn auditable coordinate-and-frame action runner with reproducible before/after pixel artifacts. The Backend trait is the reusable boundary. TSV uses capture, clickxygeneration and
- Durable Agent JobsBuild a persistent local report queue with versioned leases, immutable input, idempotent output receipts and reproducible worker-process crash recovery.
- Hedged Request LabHelp client developers evaluate delayed duplicate requests for safe reads. Send a second attempt only after a configurable delay, accept the first valid response, and record cancel
- MCP Tool Discovery WorkbenchA scoped MCP inventory server that discovers schemas inside a measured context budget. Run python3 cli.py /absolute/inventory.json --serve as a stdio server. tools/call catalogsear
- Streaming Agent Shell in RustBuild a real stdin/stdout Rust action loop with bounded reads, an explicit command grammar, path containment, and streamed JSON events.
- Sandbox Policy PlannerSelect a modeled isolation policy, inspect an optional local Docker invocation, and compare requested controls with observed harmless probes.
- Signed Webhook InboxHelp developers feed external events into an agent workflow without losing retries or accepting altered payloads. Verify an authored signature scheme over the raw body, enforce tim
- Tool Call FirewallBuild a deny-by-default policy evaluator with bounded arguments, role permissions, single-use approvals and a structured audit log. The artifact is a library gate; applications mus
Level 54
- Browser AgentA form-run receipt that checks the requested values before trusting the success banner. Replace Driver with an adapter that implements observe, act and capture. Run cli.ts --live o
- Distributed Eval Farm CoordinatorBuild a persistent same-host evaluation coordinator that partitions recorded predictions, leases shards to real worker processes, fences stale completions and retains dataset-bound
- Mini DecompilerA decompiler for a defined x86-64 subset that turns functions in an ELF relocatable object you compiled into structured C. It recompiles its own output, runs a differential test ov
- Self-Improving Skill LoopImprove an explicit routing skill from labeled development errors, then require a separate evaluation gate before promotion.
Advanced project briefs
- Photo Burst Contact SheetHelp a creator review repeated shots by computing simple pixel fingerprints and an inspectable sharpness measure. Group candidate duplicates, preserve the photographer's final choi
- Dependency Upgrade Impact MapHelp a maintainer review an upgrade using supplied before/after API signatures and a bounded source parser. Map changed symbols to actual call sites, distinguish confirmed incompat
- Gesture Shortcut PadHelp a presenter or educator control a local practice application with a few self-recorded gestures. Normalize pointer strokes, compare them with an explicit sequence-distance algo
- CI Failure ReproducerHelp a contributor reproduce a failed job from an exported workflow log, commit identity and declared environment. Identify the first failing command, distinguish infrastructure fa
- Label Adjudication DeskHelp a small team create useful evaluation labels without silently replacing disagreement with majority vote. Import independently labeled records, blind annotator identities durin
- Lost Item Match DeskHelp a community venue match lost-item descriptions with photographed found objects. Combine explicit text features, simple image-color descriptors and optional reviewed vision pro
- Presentation Rehearsal CoachHelp a speaker improve a rehearsal by aligning supplied slide text and timed transcript segments. Compute explicit pacing and topic-coverage signals, show the source phrases behind
- Semantic Cache Correctness LabBuild an opt-in answer cache that binds entries to tenant, model, source revision and expiry. Compare exact and semantic candidate matching using authored near-miss questions, incl
- Tool Contract Migration CheckerHelp tool authors evolve a callable interface while existing agents still hold old argument shapes. Compare a documented subset of before-and-after schemas, generate counterexample
- Video Highlight StoryboardHelp a tutorial creator assemble short excerpts from a supplied video, frame samples and timed transcript. Combine visible shot changes with transcript topic scores, preserve exact
- A2A Task Handoff WorkbenchHelp teams connect agents that expose different capabilities and task lifecycles. Read Agent Cards, choose a mutually supported binding, and run a handoff that includes a request f
- Abstention Calibration WorkbenchHelp teams set a defensible accept-or-defer rule for a bounded task. Tune a score threshold on labeled development records under explicit error costs, freeze that policy, and evalu
- Artifact Provenance GateHelp a maintainer inspect a downloaded agent plugin or release artifact before integrating it. Verify the subject digest and attestation signature, evaluate declared builder and so
- Context Compaction VerifierHelp agent developers avoid losing a user constraint during a long session. Track explicit facts and constraints with source locators, create an extractive compressed context, and
- Local Inference Capacity PlannerHelp a team choose a concurrency limit for its own model endpoint. Replay an authored arrival schedule, record queue wait separately from service time, and compare observed percent
- MCP Compatibility DoctorHelp an integration author diagnose a client that connects but cannot use a server correctly. Run authored negotiation, request-correlation and capability probes through a bounded
- Metamorphic Evaluation WorkbenchHelp evaluators catch inconsistent behavior across related inputs. Author transformations such as unit conversion, record reordering and equivalent formatting, define the output re
- OAuth Resource Boundary LabHelp developers integrate delegated authorization without accepting a token intended for another service. Build local authorization and resource fixtures, follow metadata discovery
- Outbound Request Policy ProxyHelp developers constrain a fetch tool that follows URLs supplied by untrusted documents. Evaluate the scheme, host, resolved address and each redirect, then connect using the vali
- Release Canary Decision LabHelp a team decide whether an agent behavior change is ready for wider exposure. Assign stable request cohorts, compare candidate and baseline error and latency windows, and distin
- Secret Injection SidecarHelp developers keep service credentials out of model-visible tool arguments and routine traces. Build a local broker that resolves opaque handles, binds each handle to a destinati
- Tenant Fairness SchedulerHelp platform developers share a finite worker pool across tenants with different job sizes. Implement weighted deficit scheduling, bounded admission and aging, then compare per-te
- Agent Resource Deadlock LabHelp developers coordinate agents that need several exclusive resources, such as a browser session and a workspace. Build wait-for graphs, explore bounded schedules, and compare or
- Judge Bias Calibration LabHelp evaluators decide whether an automated pairwise judge is useful for their task. Blind candidate identities, swap answer positions, run authored length counterfactuals and comp
- Trajectory Counterexample MinimizerHelp agent developers diagnose failures that depend on action order. Express bounded temporal rules such as approval preceding an effect, check event traces, and remove irrelevant
- Transactional Workspace Patch BrokerHelp concurrent coding agents avoid overwriting each other's files halfway through a multi-file change. Bind a patch bundle to content hashes, apply it to a private versioned works
Your work, ready to resume.
Notes, studied lessons and evidence of computation are saved on this device. You can take them with you.
Open a lesson or an experiment to begin.
Import replaces this device’s notebook. Export it first to keep a copy.
Sources and how this works
Guided experiments are available in French and English. The complete reference corpus is preserved in its original English; the degraded automatic translation was not imported.
Course adapted from AI Engineering from Scratch, under MIT. Local computation, progress on this device, no account required.
License and provenanceUse this corpus with an agent: API and MCP ↓
To recover all 9,339 original files, extract these three archives into the same directory.