<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Riddam Jain — Playbooks</title><description>In-depth references and blueprints I&apos;ve built for certifications, architecture, and core topics — the material I share with the engineers I work with.</description><link>https://riddam.github.io/</link><language>en-us</language><item><title>Model Training, Fine-Tuning &amp; Evaluation — 2026 Guide</title><link>https://riddam.github.io/guides/model-training-finetuning-eval/</link><guid isPermaLink="true">https://riddam.github.io/guides/model-training-finetuning-eval/</guid><description>A practical 2026 reference covering fine-tuning techniques, alignment methods, training frameworks, data curation, distributed training, evaluation harnesses, model optimization, and the open-weight ecosystem.</description><pubDate>Sat, 11 Jul 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;A practical map of the model training and fine-tuning landscape — the techniques, tools, and trade-offs I reach for, minus the hype.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;01 — The Training Landscape&lt;/h2&gt;
&lt;p&gt;Model training in 2026 is a &lt;strong&gt;stack of stages&lt;/strong&gt;, each with its own technique, data requirement, and compute profile. Understanding where each stage sits prevents the most common mistake: applying the wrong technique to the wrong problem. Training is one layer of a larger system, and &lt;a href=&quot;https://riddam.github.io/guides/ai-architecture-master-guide/&quot;&gt;the AI architecture field guide&lt;/a&gt; is where I work out when to reach for it at all rather than prompting or RAG.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The model training stack (stages run top → bottom):&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stage&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Cost &amp;amp; scale&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Pre-training&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Train from scratch on massive text corpus (trillions of tokens). Creates the base model. Only done by frontier labs.&lt;/td&gt;
&lt;td&gt;$M+ · months · 1000s GPUs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Continued pre-training&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Extend the base model with domain-specific corpus (medical, legal, code). Rare — needs large domain data.&lt;/td&gt;
&lt;td&gt;$10K–100K+ · weeks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Supervised fine-tuning (SFT)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Train on (instruction, response) pairs to teach specific behavior, format, tone. The most common fine-tuning.&lt;/td&gt;
&lt;td&gt;$100–5K · hours–days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Preference alignment&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;DPO / ORPO / RLHF on (chosen, rejected) pairs to refine quality, safety, style. Usually after SFT.&lt;/td&gt;
&lt;td&gt;$100–5K · hours–days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Post-training optimization&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Quantization, distillation, pruning to make the model smaller/faster/cheaper for inference.&lt;/td&gt;
&lt;td&gt;$0–100 · minutes–hours&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Where you fit in:&lt;/strong&gt; Most practitioners work at the &lt;strong&gt;SFT + alignment&lt;/strong&gt; layers. Pre-training and continued pre-training are frontier-lab territory (Anthropic, OpenAI, Meta). Your job as an AI architect is to know which layer solves your problem and which technique to apply at that layer.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;02 — Fine-Tuning Techniques&lt;/h2&gt;
&lt;p&gt;The central question: &lt;strong&gt;how many parameters do you actually need to change?&lt;/strong&gt; The answer determines your compute cost, data requirement, and quality ceiling.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Technique&lt;/th&gt;
&lt;th&gt;What it changes&lt;/th&gt;
&lt;th&gt;VRAM&lt;/th&gt;
&lt;th&gt;Data needed&lt;/th&gt;
&lt;th&gt;When to use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Full fine-tuning&lt;/td&gt;
&lt;td&gt;All model weights&lt;/td&gt;
&lt;td&gt;Very high (~16 bytes/param ≈ 8× fp16 model size)&lt;/td&gt;
&lt;td&gt;10K+ examples&lt;/td&gt;
&lt;td&gt;Deep domain adaptation; rarely needed for most tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LoRA&lt;/td&gt;
&lt;td&gt;Small low-rank adapter matrices (0.1–1% of params)&lt;/td&gt;
&lt;td&gt;Moderate (model + adapters)&lt;/td&gt;
&lt;td&gt;500–5K examples&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Default for 2026&lt;/strong&gt; — best quality/cost ratio&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;QLoRA&lt;/td&gt;
&lt;td&gt;Same as LoRA but base model stays 4-bit quantized&lt;/td&gt;
&lt;td&gt;Low (~50–70% less than LoRA)&lt;/td&gt;
&lt;td&gt;500–5K examples&lt;/td&gt;
&lt;td&gt;Memory-constrained (single GPU, consumer hardware)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DoRA&lt;/td&gt;
&lt;td&gt;LoRA + weight decomposition (magnitude + direction)&lt;/td&gt;
&lt;td&gt;Slightly more than LoRA&lt;/td&gt;
&lt;td&gt;500–5K examples&lt;/td&gt;
&lt;td&gt;When LoRA quality isn&apos;t quite enough; marginal improvement&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The 2026 default:&lt;/strong&gt; &lt;strong&gt;QLoRA SFT&lt;/strong&gt; is the starting point for almost every fine-tuning project. LoRA when you have GPU headroom and need maximum throughput. Full fine-tuning only when adapters demonstrably can&apos;t close the quality gap (rare). Unsloth&apos;s optimized kernels brought QLoRA within ~10–20% of LoRA throughput.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;How LoRA works (the key insight)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Instead of updating a huge weight matrix W (billions of params), LoRA freezes W and trains two small matrices A and B such that the update is &lt;strong&gt;ΔW = A × B&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rank r&lt;/strong&gt; controls adapter size: r=8 is common, r=16–64 for harder tasks. Higher rank = more capacity but more compute.&lt;/li&gt;
&lt;li&gt;At inference, merge the adapter into the base model (zero overhead) or keep separate (swap adapters per task).&lt;/li&gt;
&lt;li&gt;QLoRA adds 4-bit NF4 quantization on the frozen base — gradients flow through dequantized weights during training, but the base never leaves 4-bit in memory.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;LoRA vs QLoRA vs full fine-tuning — VRAM for a 70B model:&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;VRAM&lt;/th&gt;
&lt;th&gt;Hardware&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Full fine-tune&lt;/td&gt;
&lt;td&gt;~1.1 TB VRAM (mixed-precision Adam ≈ 16 bytes/param — 2 weights + 2 grads + 8 optimizer + 4 fp32 master ≈ 8× fp16 size); ~16+ H100s, or ~400–600 GB with ZeRO-3/offload&lt;/td&gt;
&lt;td&gt;Multi-GPU required&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LoRA (16-bit base)&lt;/td&gt;
&lt;td&gt;~140 GB (base in 16-bit + small adapters + optimizer for adapters only)&lt;/td&gt;
&lt;td&gt;2–4 GPUs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;QLoRA (4-bit base)&lt;/td&gt;
&lt;td&gt;~48 GB (base in 4-bit + adapters in 16-bit)&lt;/td&gt;
&lt;td&gt;Single H100 (80GB)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;03 — Alignment &amp;amp; Preference Tuning&lt;/h2&gt;
&lt;p&gt;After SFT teaches the model &lt;em&gt;what&lt;/em&gt; to do, alignment teaches it &lt;em&gt;how well&lt;/em&gt; to do it — ranking outputs by human preference.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Technique&lt;/th&gt;
&lt;th&gt;How it works&lt;/th&gt;
&lt;th&gt;Data format&lt;/th&gt;
&lt;th&gt;When to use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;RLHF&lt;/td&gt;
&lt;td&gt;Train a reward model from preference pairs → optimize LLM with PPO against the reward&lt;/td&gt;
&lt;td&gt;(prompt, chosen, rejected) + reward model&lt;/td&gt;
&lt;td&gt;Frontier alignment; most complex but most expressive. Labs only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DPO&lt;/td&gt;
&lt;td&gt;Direct Preference Optimization — skips the reward model; optimizes directly on preference pairs&lt;/td&gt;
&lt;td&gt;(prompt, chosen, rejected)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2026 default&lt;/strong&gt; for preference tuning. Simpler than RLHF, competitive quality.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ORPO&lt;/td&gt;
&lt;td&gt;Merges SFT and DPO into one stage — simplest pipeline&lt;/td&gt;
&lt;td&gt;(prompt, chosen, rejected)&lt;/td&gt;
&lt;td&gt;When you want the simplest possible pipeline and have preference data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;KTO&lt;/td&gt;
&lt;td&gt;Kahneman-Tversky Optimization — works with just thumbs-up/thumbs-down (no paired comparisons needed)&lt;/td&gt;
&lt;td&gt;(prompt, response, good/bad label)&lt;/td&gt;
&lt;td&gt;When you have binary feedback, not pairwise preferences&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GRPO&lt;/td&gt;
&lt;td&gt;Group Relative Policy Optimization — critic-free RL (introduced in DeepSeekMath, the method behind DeepSeek R1) using group-relative advantages; works with learned reward models &lt;em&gt;or&lt;/em&gt; verifiable functions&lt;/td&gt;
&lt;td&gt;(prompt, group of responses, reward)&lt;/td&gt;
&lt;td&gt;General RL post-training; reasoning tasks. RLVR (verifiable rewards — math, code, logic) is one common application, not the only one&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SimPO / IPO&lt;/td&gt;
&lt;td&gt;Variants of DPO addressing edge cases (length bias, BT-model assumption)&lt;/td&gt;
&lt;td&gt;Same as DPO&lt;/td&gt;
&lt;td&gt;When vanilla DPO produces length-biased or unstable results&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The practical default:&lt;/strong&gt; For most fine-tuning projects, &lt;strong&gt;SFT alone is enough&lt;/strong&gt;. Add &lt;strong&gt;DPO/ORPO&lt;/strong&gt; if you have preference pairs and want to refine quality/safety. Reach for &lt;strong&gt;GRPO&lt;/strong&gt; for critic-free RL post-training — most commonly reasoning tasks with verifiable rewards (RLVR), though it also works with a learned reward model. RLHF is the frontier lab&apos;s tool — most teams don&apos;t need it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Alignment technique decision tree:&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;Answer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Do you have &lt;strong&gt;paired preference data&lt;/strong&gt; (chosen vs rejected)?&lt;/td&gt;
&lt;td&gt;→ DPO (default) or ORPO (simpler)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Only &lt;strong&gt;binary feedback&lt;/strong&gt; (thumbs up/down), no pairs?&lt;/td&gt;
&lt;td&gt;→ KTO&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Want &lt;strong&gt;critic-free RL&lt;/strong&gt; — a verifiable reward function (math, code tests) or a learned reward model?&lt;/td&gt;
&lt;td&gt;→ GRPO&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Need &lt;strong&gt;maximum alignment control&lt;/strong&gt;, budget for reward model training?&lt;/td&gt;
&lt;td&gt;→ RLHF (PPO)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No preference data at all?&lt;/td&gt;
&lt;td&gt;→ SFT only (generate synthetic preferences if needed)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;04 — Training Frameworks &amp;amp; Tools&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Framework&lt;/th&gt;
&lt;th&gt;What it is&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;th&gt;2026 status&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;HF TRL (v1.0+)&lt;/td&gt;
&lt;td&gt;Hugging Face&apos;s unified post-training library: SFTTrainer, DPOTrainer, KTOTrainer, ORPOTrainer, GRPOTrainer, RewardTrainer&lt;/td&gt;
&lt;td&gt;Full control over the training loop; the &quot;standard library&quot; for fine-tuning&lt;/td&gt;
&lt;td&gt;v1.0 (April 2026) — the default&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unsloth&lt;/td&gt;
&lt;td&gt;Optimized kernels for LoRA/QLoRA — 2–5x faster, ~50–70% less VRAM than naive HF + bitsandbytes&lt;/td&gt;
&lt;td&gt;Single-GPU fine-tuning; the fastest path to a working fine-tune&lt;/td&gt;
&lt;td&gt;Integrated into TRL v1.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Axolotl&lt;/td&gt;
&lt;td&gt;Config-driven (YAML) fine-tuning framework — supports LoRA, QLoRA, full, DPO, GRPO, ORPO, reward modeling&lt;/td&gt;
&lt;td&gt;Multi-GPU pipelines; teams wanting declarative configs over code&lt;/td&gt;
&lt;td&gt;v0.29 (Feb 2026); active community&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;torchtune&lt;/td&gt;
&lt;td&gt;PyTorch-native fine-tuning library from the PyTorch team&lt;/td&gt;
&lt;td&gt;Teams wanting no HF dependency; pure PyTorch ecosystem&lt;/td&gt;
&lt;td&gt;Growing; good for custom training loops&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MLX-LM&lt;/td&gt;
&lt;td&gt;Apple Silicon native — LoRA, QLoRA, DoRA on Mac&lt;/td&gt;
&lt;td&gt;Local fine-tuning on Mac (32 GB → 7–8B; 96 GB → 70B QLoRA)&lt;/td&gt;
&lt;td&gt;Mature for Apple Silicon users&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DeepSpeed&lt;/td&gt;
&lt;td&gt;Microsoft&apos;s distributed training library — ZeRO stages 1/2/3 for memory optimization&lt;/td&gt;
&lt;td&gt;Multi-GPU/multi-node training; large models that don&apos;t fit on one GPU&lt;/td&gt;
&lt;td&gt;Essential for full fine-tuning at scale&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FSDP (Fully Sharded Data Parallel)&lt;/td&gt;
&lt;td&gt;PyTorch&apos;s native distributed training — shards model across GPUs&lt;/td&gt;
&lt;td&gt;Multi-GPU training without DeepSpeed dependency&lt;/td&gt;
&lt;td&gt;Built into PyTorch; simpler than DeepSpeed&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Starter recommendation:&lt;/strong&gt; &lt;strong&gt;Unsloth + TRL&lt;/strong&gt; for single-GPU QLoRA fine-tuning (fastest, easiest). &lt;strong&gt;Axolotl&lt;/strong&gt; for multi-GPU or when you want YAML configs. &lt;strong&gt;DeepSpeed/FSDP&lt;/strong&gt; when models don&apos;t fit on a single GPU. &lt;strong&gt;torchtune&lt;/strong&gt; if you want pure PyTorch without HF abstractions.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Supporting tools&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Hugging Face Transformers&lt;/td&gt;
&lt;td&gt;Model loading, tokenization, inference — the foundation everything else builds on&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hugging Face PEFT&lt;/td&gt;
&lt;td&gt;LoRA/QLoRA/DoRA adapter management (save, load, merge adapters)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;bitsandbytes&lt;/td&gt;
&lt;td&gt;4-bit/8-bit quantization for loading large models on limited VRAM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Weights &amp;amp; Biases (W&amp;amp;B)&lt;/td&gt;
&lt;td&gt;Experiment tracking, hyperparameter sweeps, model comparison dashboards&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MLflow&lt;/td&gt;
&lt;td&gt;Experiment tracking + model registry (open-source alternative to W&amp;amp;B)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hugging Face Hub&lt;/td&gt;
&lt;td&gt;Model hosting, sharing, versioning — the &quot;GitHub for models&quot;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;05 — Data Preparation &amp;amp; Curation&lt;/h2&gt;
&lt;p&gt;Data quality is the single biggest determinant of fine-tuning success. &lt;strong&gt;5K well-curated examples consistently outperform 50K noisy ones.&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;Data formats by training type&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Training type&lt;/th&gt;
&lt;th&gt;Data format&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SFT (instruction tuning)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;{&quot;instruction&quot;: &quot;...&quot;, &quot;response&quot;: &quot;...&quot;}&lt;/code&gt; or chat format with system/user/assistant turns&lt;/td&gt;
&lt;td&gt;&lt;code&gt;{&quot;instruction&quot;: &quot;Summarize this email&quot;, &quot;response&quot;: &quot;The email discusses...&quot;}&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DPO / ORPO&lt;/td&gt;
&lt;td&gt;&lt;code&gt;{&quot;prompt&quot;: &quot;...&quot;, &quot;chosen&quot;: &quot;...&quot;, &quot;rejected&quot;: &quot;...&quot;}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Two responses to the same prompt, one preferred&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GRPO&lt;/td&gt;
&lt;td&gt;&lt;code&gt;{&quot;prompt&quot;: &quot;...&quot;, &quot;response&quot;: &quot;...&quot;, &quot;reward&quot;: 0.85}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Response + verifiable reward score&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Continued pre-training&lt;/td&gt;
&lt;td&gt;Raw text documents (no instruction format)&lt;/td&gt;
&lt;td&gt;Domain-specific corpus (medical literature, legal filings)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Data quality checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Deduplication:&lt;/strong&gt; remove exact and near-duplicate examples — duplicates cause memorization, not generalization.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Contamination check:&lt;/strong&gt; ensure evaluation data is not in the training set. This is the #1 cause of inflated metrics.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Quality filtering:&lt;/strong&gt; remove low-quality, off-topic, or contradictory examples. Use an LLM judge to score quality if manual review is impractical.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mix base data (5–20%):&lt;/strong&gt; include general instruction data during domain SFT to prevent catastrophic forgetting — the model losing its general capabilities.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Balance:&lt;/strong&gt; ensure class/topic distribution matches what you want the model to learn, not just what&apos;s easiest to collect.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Privacy:&lt;/strong&gt; PII redaction before training. Differential privacy if fine-tuning on user data.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Synthetic data (the 2026 shortcut)&lt;/h3&gt;
&lt;p&gt;Use a frontier model (Claude Opus 5, GPT-5) to generate training data — instruction-response pairs, preference comparisons, or domain examples. &lt;strong&gt;Standard practice in 2026&lt;/strong&gt;, but requires evaluation: always validate synthetic data quality before training on it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Common mistake:&lt;/strong&gt; Fine-tuning on synthetic data generated by the same model you&apos;re fine-tuning → model collapse (the model learns to imitate its own biases). Use a &lt;strong&gt;stronger&lt;/strong&gt; model to generate training data for a &lt;strong&gt;weaker&lt;/strong&gt; model (distillation pattern).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;06 — Distributed Training&lt;/h2&gt;
&lt;p&gt;When a model doesn&apos;t fit on one GPU, or you need faster training, you distribute across multiple GPUs/nodes.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Strategy&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;th&gt;Use when&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Data Parallel (DDP)&lt;/td&gt;
&lt;td&gt;Each GPU has a full model copy; data is split across GPUs. Gradients averaged.&lt;/td&gt;
&lt;td&gt;Model fits on one GPU but you want faster training&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FSDP (Fully Sharded)&lt;/td&gt;
&lt;td&gt;Shards model weights, gradients, and optimizer states across GPUs&lt;/td&gt;
&lt;td&gt;Model doesn&apos;t fit on one GPU; PyTorch native&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DeepSpeed ZeRO-1/2/3&lt;/td&gt;
&lt;td&gt;Progressive memory optimization — ZeRO-3 shards everything&lt;/td&gt;
&lt;td&gt;Very large models; maximum memory efficiency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tensor Parallelism&lt;/td&gt;
&lt;td&gt;Splits individual layers across GPUs (within a node)&lt;/td&gt;
&lt;td&gt;Very large layers that don&apos;t fit on one GPU even sharded&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pipeline Parallelism&lt;/td&gt;
&lt;td&gt;Splits model layers sequentially across GPUs&lt;/td&gt;
&lt;td&gt;Very deep models; used alongside tensor parallelism&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Key training optimizations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Mixed precision (bf16/fp16):&lt;/strong&gt; train in half precision — 2x throughput, half memory, minimal quality loss. bf16 preferred (no loss scaling needed).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Gradient checkpointing:&lt;/strong&gt; recompute activations during backward pass instead of storing them — saves ~60% memory at ~30% speed cost.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flash Attention (2/3):&lt;/strong&gt; memory-efficient attention computation — essential for long sequences. Built into most frameworks. In 2026, &lt;strong&gt;Flash Attention 3&lt;/strong&gt; is the default on Hopper (H100) with FP8 support, and &lt;strong&gt;FA4&lt;/strong&gt; is emerging for next-gen hardware.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Gradient accumulation:&lt;/strong&gt; simulate larger batch sizes by accumulating gradients over multiple micro-batches before updating.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Checkpointing:&lt;/strong&gt; save model state regularly during training — critical when using spot/preemptible GPUs that can be interrupted.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;07 — Evaluation Harnesses &amp;amp; Benchmarks&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The eval harness must exist before training starts.&lt;/strong&gt; Without it, you cannot tell if a checkpoint is better than the last. This is the most under-invested area in most fine-tuning projects.&lt;/p&gt;
&lt;h3&gt;Evaluation frameworks&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Framework&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;lm-evaluation-harness (EleutherAI)&lt;/td&gt;
&lt;td&gt;Standardized benchmark suite: MMLU, GSM8K, HumanEval, HellaSwag, 400+ tasks&lt;/td&gt;
&lt;td&gt;Base model benchmarking; academic comparison. No substitute.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DeepEval&lt;/td&gt;
&lt;td&gt;pytest-native LLM eval — 14+ metrics: hallucination, bias, toxicity, RAG faithfulness&lt;/td&gt;
&lt;td&gt;CI/CD integration; broad application eval; quality gates that block deploys&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RAGAS&lt;/td&gt;
&lt;td&gt;RAG-specific evaluation: context precision, recall, faithfulness, answer relevance&lt;/td&gt;
&lt;td&gt;RAG pipeline evaluation; the standard for retrieval quality&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Promptfoo&lt;/td&gt;
&lt;td&gt;YAML-driven multi-model comparison + red-teaming (500+ adversarial vectors)&lt;/td&gt;
&lt;td&gt;Prompt/model selection; security testing; CLI-first workflow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LLM-as-judge&lt;/td&gt;
&lt;td&gt;Use a stronger model to evaluate a weaker model&apos;s output against rubrics&lt;/td&gt;
&lt;td&gt;Scalable proxy for human eval; runs on 5–10% of production traces&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Human evaluation&lt;/td&gt;
&lt;td&gt;Domain experts rate outputs on rubrics (accuracy, helpfulness, safety)&lt;/td&gt;
&lt;td&gt;Gold standard; expensive; use for final validation&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The evaluation stack for fine-tuning:&lt;/strong&gt; Before training: &lt;strong&gt;lm-evaluation-harness&lt;/strong&gt; baseline on the base model. After each checkpoint: &lt;strong&gt;task-specific metrics&lt;/strong&gt; (exact match, JSON validity, tool-call accuracy) + &lt;strong&gt;LLM-as-judge&lt;/strong&gt; (faithfulness, instruction following, tone). Before production: &lt;strong&gt;human eval&lt;/strong&gt; on a sample + &lt;strong&gt;Promptfoo red-teaming&lt;/strong&gt;. In production: &lt;strong&gt;RAGAS&lt;/strong&gt; for RAG quality + &lt;strong&gt;DeepEval&lt;/strong&gt; as CI gate.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Key benchmarks to know&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Benchmark&lt;/th&gt;
&lt;th&gt;What it measures&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;MMLU&lt;/td&gt;
&lt;td&gt;Broad knowledge across 57 subjects. Historically the headline general-capability metric, but largely &lt;strong&gt;saturated by 2026&lt;/strong&gt; — prefer &lt;strong&gt;MMLU-Pro&lt;/strong&gt; and &lt;strong&gt;GPQA&lt;/strong&gt; as more discriminating successors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GSM8K&lt;/td&gt;
&lt;td&gt;Grade-school math reasoning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HumanEval / MBPP&lt;/td&gt;
&lt;td&gt;Code generation and programming ability&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MTEB&lt;/td&gt;
&lt;td&gt;Embedding model quality (the benchmark for RAG embedding models)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MT-Bench&lt;/td&gt;
&lt;td&gt;Multi-turn conversation quality (LLM-as-judge scored)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IFEval&lt;/td&gt;
&lt;td&gt;Instruction following accuracy (does the model do exactly what you asked?)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TruthfulQA&lt;/td&gt;
&lt;td&gt;Hallucination resistance — does the model say &quot;I don&apos;t know&quot; when it should?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Eval traps to avoid:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Evaluating only on the task you fine-tuned for — check for &lt;strong&gt;catastrophic forgetting&lt;/strong&gt; on general benchmarks too.&lt;/li&gt;
&lt;li&gt;Training data contaminating eval set — always hold out eval data &lt;em&gt;before&lt;/em&gt; any training begins.&lt;/li&gt;
&lt;li&gt;Trusting a single metric — use task metrics + LLM judge + human eval together.&lt;/li&gt;
&lt;li&gt;Evaluating once — evaluate at every checkpoint and after every data change.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;h2&gt;08 — Model Optimization (Post-Training)&lt;/h2&gt;
&lt;p&gt;After training, make the model &lt;strong&gt;smaller, faster, and cheaper&lt;/strong&gt; for inference.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Technique&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;th&gt;Speed-up&lt;/th&gt;
&lt;th&gt;Quality impact&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Quantization (INT8)&lt;/td&gt;
&lt;td&gt;Reduce weight precision from 16-bit to 8-bit&lt;/td&gt;
&lt;td&gt;~2x throughput, ~50% memory&lt;/td&gt;
&lt;td&gt;Minimal (&amp;lt; 1% accuracy loss typically)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Quantization (INT4 / GPTQ / AWQ)&lt;/td&gt;
&lt;td&gt;Reduce to 4-bit with calibration&lt;/td&gt;
&lt;td&gt;~4x throughput, ~75% memory&lt;/td&gt;
&lt;td&gt;Slight (~1–3% loss); good enough for most production&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GGUF (llama.cpp format)&lt;/td&gt;
&lt;td&gt;Optimized quantized format for CPU/local inference&lt;/td&gt;
&lt;td&gt;Runs on CPU/Mac&lt;/td&gt;
&lt;td&gt;Varies by quant level (Q4_K_M is the sweet spot)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Distillation&lt;/td&gt;
&lt;td&gt;Train a small model to mimic a large model&apos;s outputs&lt;/td&gt;
&lt;td&gt;10–100x smaller/faster&lt;/td&gt;
&lt;td&gt;Depends on task; can retain 90%+ of quality on narrow domains&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pruning&lt;/td&gt;
&lt;td&gt;Remove unnecessary weights/neurons&lt;/td&gt;
&lt;td&gt;1.5–3x faster&lt;/td&gt;
&lt;td&gt;Moderate; less common than quantization in 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Speculative decoding&lt;/td&gt;
&lt;td&gt;Small model drafts tokens, large model verifies — net faster generation&lt;/td&gt;
&lt;td&gt;2–3x generation speed&lt;/td&gt;
&lt;td&gt;Identical output (verification ensures quality)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — quantization level:&lt;/strong&gt; &lt;strong&gt;INT8:&lt;/strong&gt; nearly lossless, 2x savings — the safe default. &lt;strong&gt;INT4 (GPTQ/AWQ):&lt;/strong&gt; 4x savings with slight quality loss — production-viable for most tasks. &lt;strong&gt;Aggressive (2-3 bit):&lt;/strong&gt; large quality drop — only for latency-critical, accuracy-tolerant use cases. Always evaluate your specific task after quantization — generic benchmarks don&apos;t predict domain-specific impact.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;09 — Open-Weight Ecosystem&lt;/h2&gt;
&lt;p&gt;The base models you&apos;ll fine-tune. &quot;Open weights&quot; means you download the weights and run/fine-tune them yourself.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Family&lt;/th&gt;
&lt;th&gt;Provider&lt;/th&gt;
&lt;th&gt;Sizes&lt;/th&gt;
&lt;th&gt;Strengths&lt;/th&gt;
&lt;th&gt;License&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Llama 4&lt;/td&gt;
&lt;td&gt;Meta&lt;/td&gt;
&lt;td&gt;Scout (109B MoE), Maverick (400B+ MoE)&lt;/td&gt;
&lt;td&gt;Best open-weight general capability; huge ecosystem&lt;/td&gt;
&lt;td&gt;Llama Community&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Llama 3.3&lt;/td&gt;
&lt;td&gt;Meta&lt;/td&gt;
&lt;td&gt;70B&lt;/td&gt;
&lt;td&gt;Dense model; well-tested; huge fine-tuning ecosystem&lt;/td&gt;
&lt;td&gt;Llama Community&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qwen 3&lt;/td&gt;
&lt;td&gt;Alibaba&lt;/td&gt;
&lt;td&gt;0.6B–235B (MoE + dense)&lt;/td&gt;
&lt;td&gt;Strong multilingual; competitive embeddings; thinking mode&lt;/td&gt;
&lt;td&gt;Apache 2.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemma 3&lt;/td&gt;
&lt;td&gt;Google&lt;/td&gt;
&lt;td&gt;1B–27B&lt;/td&gt;
&lt;td&gt;Efficient; multimodal (vision); strong for size&lt;/td&gt;
&lt;td&gt;Gemma (permissive)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mistral&lt;/td&gt;
&lt;td&gt;Mistral AI&lt;/td&gt;
&lt;td&gt;Small/Medium/Large&lt;/td&gt;
&lt;td&gt;EU-hosted; multilingual; fast inference&lt;/td&gt;
&lt;td&gt;Apache 2.0 (some)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DeepSeek-R1 / V3&lt;/td&gt;
&lt;td&gt;DeepSeek&lt;/td&gt;
&lt;td&gt;R1 (671B MoE), V3 (671B MoE)&lt;/td&gt;
&lt;td&gt;Reasoning; cost-efficient; MoE architecture&lt;/td&gt;
&lt;td&gt;MIT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phi-4&lt;/td&gt;
&lt;td&gt;Microsoft&lt;/td&gt;
&lt;td&gt;14B&lt;/td&gt;
&lt;td&gt;Small but punches above weight; good for edge&lt;/td&gt;
&lt;td&gt;MIT&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;How to choose a base model for fine-tuning:&lt;/strong&gt; &lt;strong&gt;Start with the smallest model that does well on your task with good prompting.&lt;/strong&gt; Fine-tuning a 7B model is 10x cheaper and faster than fine-tuning a 70B. If 7B SFT isn&apos;t good enough, try 14B before jumping to 70B. Benchmark the base model with prompting first — if it&apos;s already 90% there, fine-tuning the last 10% is much cheaper than starting from a weak base.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;10 — The Complete Training Workflow&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;End-to-end fine-tuning workflow:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Define task&lt;/strong&gt; — set success metrics&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Build eval harness&lt;/strong&gt; — &lt;em&gt;before&lt;/em&gt; training&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Curate data&lt;/strong&gt; — 500–5K examples&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Baseline&lt;/strong&gt; — evaluate the base model&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SFT (QLoRA)&lt;/strong&gt; — train + checkpoint&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Evaluate&lt;/strong&gt; — vs baseline&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Alignment?&lt;/strong&gt; — DPO if preference data&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Evaluate again&lt;/strong&gt; — plus catastrophic forgetting check&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Merge adapter&lt;/strong&gt; — and quantize (INT4/8)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deploy&lt;/strong&gt; — vLLM / cloud endpoint&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor&lt;/strong&gt; — drift + quality → retrain as needed&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Steps 10 and 11 are where this guide hands off: serving, drift detection, and the retraining loop are the subject of &lt;a href=&quot;https://riddam.github.io/guides/mlops-production-guide/&quot;&gt;MLOps and AI production operations&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The golden rule:&lt;/strong&gt; Steps 2 and 6 (evaluation) are the most important. Training without evaluation is like flying without instruments — you have no idea if you&apos;re improving or crashing. Build the eval harness &lt;strong&gt;before&lt;/strong&gt; you write a single line of training code.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;11 — Cloud Training Services&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Provider&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SageMaker Training&lt;/td&gt;
&lt;td&gt;AWS&lt;/td&gt;
&lt;td&gt;Managed training jobs + HyperPod for fault-tolerant large runs; deepest GPU selection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vertex AI Training&lt;/td&gt;
&lt;td&gt;GCP&lt;/td&gt;
&lt;td&gt;Managed training + TPU access; tight BigQuery integration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Azure ML Compute&lt;/td&gt;
&lt;td&gt;Azure&lt;/td&gt;
&lt;td&gt;Managed training; ND-series GPUs; Enterprise Agreement pricing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lambda Cloud / RunPod / &lt;a href=&quot;http://Vast.ai&quot;&gt;Vast.ai&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;GPU clouds&lt;/td&gt;
&lt;td&gt;Cheapest GPU hourly rates; no managed MLOps (you manage everything)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Colab Pro&lt;/td&gt;
&lt;td&gt;Google&lt;/td&gt;
&lt;td&gt;Quick experiments; T4/A100 access for prototyping; not for production training&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Managed fine-tuning APIs&lt;/td&gt;
&lt;td&gt;Together, Fireworks, Anyscale&lt;/td&gt;
&lt;td&gt;Upload data → get fine-tuned model endpoint; zero infra management&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — managed fine-tuning API vs self-managed:&lt;/strong&gt; &lt;strong&gt;Managed API&lt;/strong&gt; (Together, Fireworks, OpenAI fine-tuning) = upload data, get model, zero infra — but limited control over hyperparameters, training loop, and model architecture. &lt;strong&gt;Self-managed&lt;/strong&gt; (Unsloth on cloud GPU) = full control, cheaper per hour — but you own the entire training stack. Start with managed for validation; switch to self-managed for production optimization.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;12 — Trade-off Master Reference&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Decision&lt;/th&gt;
&lt;th&gt;Option A&lt;/th&gt;
&lt;th&gt;Option B&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Fine-tuning method&lt;/td&gt;
&lt;td&gt;QLoRA (memory-efficient)&lt;/td&gt;
&lt;td&gt;LoRA (higher throughput)&lt;/td&gt;
&lt;td&gt;QLoRA unless you have GPU headroom&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Full fine-tune vs adapter&lt;/td&gt;
&lt;td&gt;Full (all params)&lt;/td&gt;
&lt;td&gt;LoRA/QLoRA (adapters only)&lt;/td&gt;
&lt;td&gt;Adapters unless proven insufficient&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Alignment technique&lt;/td&gt;
&lt;td&gt;DPO (pairs needed)&lt;/td&gt;
&lt;td&gt;SFT only (no pairs)&lt;/td&gt;
&lt;td&gt;SFT alone; add DPO if you have preference data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Training framework&lt;/td&gt;
&lt;td&gt;Unsloth + TRL (easiest)&lt;/td&gt;
&lt;td&gt;Axolotl (YAML, multi-GPU)&lt;/td&gt;
&lt;td&gt;Unsloth for single-GPU; Axolotl for multi-GPU&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data quality vs quantity&lt;/td&gt;
&lt;td&gt;5K curated examples&lt;/td&gt;
&lt;td&gt;50K noisy examples&lt;/td&gt;
&lt;td&gt;Quality wins — always curate first&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Base model size&lt;/td&gt;
&lt;td&gt;7B (cheapest to fine-tune)&lt;/td&gt;
&lt;td&gt;70B (most capable)&lt;/td&gt;
&lt;td&gt;Smallest model that works on your task&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Quantization level&lt;/td&gt;
&lt;td&gt;INT8 (nearly lossless)&lt;/td&gt;
&lt;td&gt;INT4 (more savings)&lt;/td&gt;
&lt;td&gt;INT8 default; INT4 if memory/cost critical&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Synthetic vs real data&lt;/td&gt;
&lt;td&gt;Synthetic (frontier-generated)&lt;/td&gt;
&lt;td&gt;Real (human-created)&lt;/td&gt;
&lt;td&gt;Mix both; always validate synthetic quality&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Eval approach&lt;/td&gt;
&lt;td&gt;Automated (LLM judge)&lt;/td&gt;
&lt;td&gt;Human evaluation&lt;/td&gt;
&lt;td&gt;Automated for iteration; human for final validation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Distributed strategy&lt;/td&gt;
&lt;td&gt;FSDP (PyTorch native)&lt;/td&gt;
&lt;td&gt;DeepSpeed ZeRO&lt;/td&gt;
&lt;td&gt;FSDP for simplicity; DeepSpeed for maximum memory efficiency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Open weights vs API fine-tuning&lt;/td&gt;
&lt;td&gt;Self-hosted (full control)&lt;/td&gt;
&lt;td&gt;API (Together/Fireworks/OpenAI)&lt;/td&gt;
&lt;td&gt;API for validation; self-hosted for production control&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Training hardware&lt;/td&gt;
&lt;td&gt;Cloud GPU (H100)&lt;/td&gt;
&lt;td&gt;Cloud TPU (v5e)&lt;/td&gt;
&lt;td&gt;GPU for flexibility; TPU for large-scale cost efficiency&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;Built from current frameworks, research papers, and production practice. Independent reference — not affiliated with any vendor. Framework versions and model availability change rapidly; verify before starting a training run.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>fine-tuning</category><category>llm-training</category><category>evaluation</category><category>machine-learning</category></item><item><title>AI Architecture: A Practitioner&apos;s Field Guide (2026)</title><link>https://riddam.github.io/guides/ai-architecture-master-guide/</link><guid isPermaLink="true">https://riddam.github.io/guides/ai-architecture-master-guide/</guid><description>A practitioner&apos;s blueprint covering every layer of modern AI systems — foundation model selection, RAG, fine-tuning, agentic patterns, LLMOps, safety, cloud platforms, and the trade-offs behind each decision.</description><pubDate>Sat, 11 Jul 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;This is the guide I wish I&apos;d had when I first started designing AI systems: every layer, pattern, and trade-off in one place. I keep it current and reach for it whenever I&apos;m helping someone architect something new.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;01 — The AI Architecture Landscape&lt;/h2&gt;
&lt;p&gt;AI architecture in 2026 is no longer &quot;pick a model and prompt it.&quot; It&apos;s a layered system with distinct concerns at each level. Understanding where each decision lives prevents the most common mistake: solving a knowledge problem with fine-tuning, or solving a behavior problem with RAG.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fig 01.1 — The AI system stack&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Concerns&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Application layer&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;chatbots, copilots, autonomous agents, data pipelines, content generation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Orchestration layer&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;single-agent loops, multi-agent coordination, human-in-the-loop, workflow engines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Intelligence layer&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;prompt engineering, RAG (retrieval), fine-tuning, tool use / MCP&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model layer&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;foundation models (GPT, Claude, Gemini, Llama), embedding models, specialized models&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Infrastructure layer&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;GPUs / TPUs, model serving, vector databases, model gateways, observability&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The architect&apos;s job:&lt;/strong&gt; At each layer, you&apos;re making trade-off decisions: which model, how to customize it, how to orchestrate it, what guardrails to apply, and what infrastructure to run it on. The rest of this guide walks through each layer&apos;s decisions systematically.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;02 — Foundation Models &amp;amp; Selection&lt;/h2&gt;
&lt;h3&gt;The major model families (2026)&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Provider&lt;/th&gt;
&lt;th&gt;Frontier&lt;/th&gt;
&lt;th&gt;Workhorse&lt;/th&gt;
&lt;th&gt;Fast / cheap&lt;/th&gt;
&lt;th&gt;Strengths&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Anthropic&lt;/td&gt;
&lt;td&gt;Claude Fable 5 (most capable) / Opus 4.8&lt;/td&gt;
&lt;td&gt;Claude Sonnet 5&lt;/td&gt;
&lt;td&gt;Claude Haiku 4.5&lt;/td&gt;
&lt;td&gt;Safety, long context (1M; Haiku 200K), coding, structured output&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenAI&lt;/td&gt;
&lt;td&gt;GPT-5 / GPT-5.1&lt;/td&gt;
&lt;td&gt;GPT-5 mini&lt;/td&gt;
&lt;td&gt;GPT-5 nano&lt;/td&gt;
&lt;td&gt;Ecosystem breadth, multimodal, reasoning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google&lt;/td&gt;
&lt;td&gt;Gemini 3 Pro (also 2.5 Pro)&lt;/td&gt;
&lt;td&gt;Gemini 3 Pro&lt;/td&gt;
&lt;td&gt;Gemini Flash&lt;/td&gt;
&lt;td&gt;Multimodal native, huge context (1M+), Google integration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Meta&lt;/td&gt;
&lt;td&gt;Llama 4 Maverick (Behemoth was previewed but never shipped)&lt;/td&gt;
&lt;td&gt;Llama 4 Maverick&lt;/td&gt;
&lt;td&gt;Llama 4 Scout&lt;/td&gt;
&lt;td&gt;Open weights, self-hostable, fine-tunable, no API dependency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mistral&lt;/td&gt;
&lt;td&gt;Mistral Large&lt;/td&gt;
&lt;td&gt;Mistral Medium&lt;/td&gt;
&lt;td&gt;Mistral Small&lt;/td&gt;
&lt;td&gt;EU-hosted, multilingual, open weights for some&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DeepSeek&lt;/td&gt;
&lt;td&gt;DeepSeek-R1&lt;/td&gt;
&lt;td&gt;DeepSeek-V3.1 / V3.2&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;Open weights, reasoning, cost-efficient, China-based&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Model selection decision framework&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Fig 02.1 — How to choose a model&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Need &lt;strong&gt;maximum reasoning / complex tasks&lt;/strong&gt; (low volume, high stakes)? → &lt;strong&gt;Frontier (Fable 5 / Opus 4.8 / GPT-5 / Gemini 3 Pro)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Need &lt;strong&gt;balanced cost + capability&lt;/strong&gt; for most production workloads? → &lt;strong&gt;Workhorse (Sonnet 5 / GPT-5 mini / Gemini Flash)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Need &lt;strong&gt;fast, cheap&lt;/strong&gt; for classification / routing / high-volume simple tasks? → &lt;strong&gt;Fast (Haiku 4.5 / GPT-5 nano / Gemini Flash)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Need &lt;strong&gt;data sovereignty / no vendor lock-in / custom fine-tuning&lt;/strong&gt;? → &lt;strong&gt;Open weights (Llama / Mistral / DeepSeek)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — closed API vs open weights:&lt;/strong&gt; &lt;strong&gt;Closed API&lt;/strong&gt; (Claude, GPT) = highest capability, zero infra, pay-per-token, vendor lock-in. &lt;strong&gt;Open weights&lt;/strong&gt; (Llama, Mistral) = self-hostable, fine-tunable, no per-token API cost — but you own GPU infra, ops, and security. Most production systems use a &lt;strong&gt;mix&lt;/strong&gt;: closed API for the hard reasoning, open weights for high-volume/sensitive tasks.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Key principle — right-size the model:&lt;/strong&gt; Don&apos;t use a frontier model for everything. In a multi-agent system, the &lt;strong&gt;router&lt;/strong&gt; uses a fast/cheap model (Haiku 4.5), the &lt;strong&gt;main agent&lt;/strong&gt; uses the workhorse (Sonnet 5), and only the &lt;strong&gt;hardest reasoning steps&lt;/strong&gt; escalate to frontier (Opus 4.8 / Fable 5). This can cut costs 60–80% versus using frontier everywhere.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;03 — The Customization Ladder&lt;/h2&gt;
&lt;p&gt;The single most important strategic decision: &lt;strong&gt;how do you make a general model perform well on your specific task?&lt;/strong&gt; Three approaches, tried in this order.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fig 03.1 — The customization ladder (try from bottom → top)&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Rung&lt;/th&gt;
&lt;th&gt;What it changes&lt;/th&gt;
&lt;th&gt;Tag&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Fine-tuning&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Change the model&apos;s &lt;em&gt;behavior&lt;/em&gt; by training on your data — tone, format, domain reasoning. Most expensive, slowest to iterate.&lt;/td&gt;
&lt;td&gt;behavior&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;RAG&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Give the model &lt;em&gt;knowledge&lt;/em&gt; at runtime by retrieving relevant docs. Doesn&apos;t change the model, changes what it sees.&lt;/td&gt;
&lt;td&gt;knowledge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Prompt engineering&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Change the &lt;em&gt;instructions&lt;/em&gt; — system prompt, examples, context structure. Cheapest, fastest to iterate.&lt;/td&gt;
&lt;td&gt;instructions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The golden rule:&lt;/strong&gt; &lt;strong&gt;Start with prompt engineering. Add RAG when you need knowledge the model doesn&apos;t have. Fine-tune only when behavior still isn&apos;t right after the first two.&lt;/strong&gt; Most teams overshoot — they fine-tune when RAG would&apos;ve solved it, or build RAG when better prompting was enough. The practical default for most production systems in 2026 is prompt engineering + RAG.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Prompt engineering&lt;/th&gt;
&lt;th&gt;RAG&lt;/th&gt;
&lt;th&gt;Fine-tuning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Changes&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Instructions to the model&lt;/td&gt;
&lt;td&gt;Knowledge the model sees&lt;/td&gt;
&lt;td&gt;Model weights / behavior&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Setup time&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Hours to days&lt;/td&gt;
&lt;td&gt;Days to weeks&lt;/td&gt;
&lt;td&gt;Weeks to months&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~$0 (prompt design)&lt;/td&gt;
&lt;td&gt;$70–1000+/mo (infra)&lt;/td&gt;
&lt;td&gt;$1000+ (training) + higher inference&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Data freshness&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Static (in prompt)&lt;/td&gt;
&lt;td&gt;Live (retrieves at runtime)&lt;/td&gt;
&lt;td&gt;Frozen at training time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Best for&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Tone, format, simple tasks&lt;/td&gt;
&lt;td&gt;Knowledge grounding, docs, enterprise data&lt;/td&gt;
&lt;td&gt;Domain style, specialized reasoning, latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Iteration speed&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Minutes&lt;/td&gt;
&lt;td&gt;Hours (re-index)&lt;/td&gt;
&lt;td&gt;Days (re-train)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;The decision flowchart&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Fig 03.2 — Which customization approach?&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Can prompt engineering alone reach acceptable accuracy? → Yes → &lt;strong&gt;Ship it. Iterate prompts.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Does the model need &lt;strong&gt;knowledge it doesn&apos;t have&lt;/strong&gt; (your docs, live data, domain facts)? → Yes → &lt;strong&gt;Add RAG&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Is the model&apos;s &lt;strong&gt;behavior / tone / format&lt;/strong&gt; still wrong after prompt + RAG? → Yes → &lt;strong&gt;Fine-tune&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Do you need &lt;strong&gt;maximum control + data sovereignty + lowest per-token cost at scale&lt;/strong&gt;? → Yes → &lt;strong&gt;Fine-tune open weights + self-host&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;04 — Prompt Engineering (Production Patterns)&lt;/h2&gt;
&lt;h3&gt;Core techniques&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Technique&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;th&gt;Use when&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;System prompt design&lt;/td&gt;
&lt;td&gt;Define persona, role, constraints, output format&lt;/td&gt;
&lt;td&gt;Every production system — the foundation of all customization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Few-shot examples&lt;/td&gt;
&lt;td&gt;Show 2–5 input/output pairs to anchor behavior&lt;/td&gt;
&lt;td&gt;Inconsistent output; need specific tone/format/length&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;XML/structured tags&lt;/td&gt;
&lt;td&gt;Wrap context in tags (&lt;code&gt;&amp;lt;document&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;instructions&amp;gt;&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Complex prompts with multiple context sources&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chain-of-thought&lt;/td&gt;
&lt;td&gt;Ask model to reason step-by-step before answering&lt;/td&gt;
&lt;td&gt;Complex reasoning, math, multi-step logic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prefilled response &lt;em&gt;(legacy)&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;Start the assistant&apos;s response to steer its format&lt;/td&gt;
&lt;td&gt;Older models only — most 2026 frontier models reject assistant prefill; use structured outputs instead&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Self-critique / reflection&lt;/td&gt;
&lt;td&gt;Model evaluates its own output, then revises&lt;/td&gt;
&lt;td&gt;High-quality generation; catch hallucinations&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;The PRECISE framework (community mnemonic)&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;P&lt;/strong&gt;ersona · &lt;strong&gt;R&lt;/strong&gt;ole · &lt;strong&gt;E&lt;/strong&gt;xplicit instructions · &lt;strong&gt;C&lt;/strong&gt;ontext · &lt;strong&gt;I&lt;/strong&gt;nstructions · &lt;strong&gt;S&lt;/strong&gt;teps · &lt;strong&gt;E&lt;/strong&gt;xamples — a community mnemonic (not an official Anthropic framework) for structuring system prompts. It lines up well with Anthropic&apos;s actual published guidance: give clear and direct instructions, use multishot examples, wrap context in XML tags, let the model reason with chain-of-thought, and constrain the output with a schema. (Prefilling the assistant&apos;s reply to force a format was a common older trick, but most current frontier models reject a prefilled turn — reach for structured outputs instead.) The &lt;strong&gt;Examples&lt;/strong&gt; component is the single most impactful lever: without examples, the model guesses format and tone from pretraining.&lt;/p&gt;
&lt;h3&gt;Structured output patterns&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Tool-use extraction:&lt;/strong&gt; define a &quot;tool&quot; whose input schema matches your desired JSON structure, force Claude to &quot;call&quot; it → schema-validated output. Production-grade.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Schema-constrained output:&lt;/strong&gt; point the model at a full JSON Schema the response must satisfy (a &lt;code&gt;response_format&lt;/code&gt; / &lt;code&gt;output_config.format&lt;/code&gt; field). Guarantees parseable, schema-valid output — the modern replacement for prefilling a &lt;code&gt;{&lt;/code&gt; to coax JSON. Older &quot;JSON mode&quot; only guarantees valid-JSON-&lt;em&gt;shaped&lt;/em&gt; text, not &lt;em&gt;your&lt;/em&gt; schema.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Validation-retry loop:&lt;/strong&gt; parse output → validate against schema → if invalid, send error back to model with the original input → retry (cap at 2–3).&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — strict schema vs free-form:&lt;/strong&gt; &lt;strong&gt;Structured (tool_use / JSON Schema):&lt;/strong&gt; deterministic, parseable, production-safe — but constrains the model. &lt;strong&gt;Free-form text:&lt;/strong&gt; more natural, flexible — but requires post-processing and can&apos;t be reliably parsed. Default to structured for any machine-consumed output.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;05 — RAG Architectures&lt;/h2&gt;
&lt;p&gt;RAG (Retrieval-Augmented Generation) is the &lt;strong&gt;dominant enterprise AI pattern in 2026&lt;/strong&gt; — grounding LLM responses in your own data. But &quot;RAG&quot; is no longer one thing; there are 5+ distinct architectures with very different complexity/accuracy trade-offs.&lt;/p&gt;
&lt;h3&gt;The RAG maturity ladder&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Fig 05.1 — RAG architectures (simpler → more capable)&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Architecture&lt;/th&gt;
&lt;th&gt;How it works&lt;/th&gt;
&lt;th&gt;Tag&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;1. Naive RAG&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Embed query → vector search → stuff top-K chunks into prompt → generate. Baseline; works for simple Q&amp;amp;A.&lt;/td&gt;
&lt;td&gt;start here&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;2. Hybrid + rerank&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Combine vector search + keyword (BM25) search → reranker scores results → top chunks to LLM. Much better precision.&lt;/td&gt;
&lt;td&gt;production baseline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;3. Self-RAG&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Model decides &lt;em&gt;whether&lt;/em&gt; to retrieve, evaluates relevance of chunks, may re-retrieve. Reduces noise.&lt;/td&gt;
&lt;td&gt;adaptive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;4. Graph RAG&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Knowledge graph + vector search. Enables multi-hop reasoning over connected entities (contracts, case law, org charts).&lt;/td&gt;
&lt;td&gt;relationships&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;5. Agentic RAG&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Agent decomposes query into sub-queries, decides which retrieval tools to call, iterates until it has enough context. Most capable.&lt;/td&gt;
&lt;td&gt;complex reasoning&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The 60/30/10 rule:&lt;/strong&gt; In a typical enterprise system, ~60% of queries are simple enough for Naive or Hybrid RAG. ~30% benefit from reranking or Self-RAG. Only ~10% need Graph or Agentic RAG. &lt;strong&gt;Adaptive RAG&lt;/strong&gt; routes each query to the cheapest architecture that can handle it — this is the cost-efficient production pattern.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Fig 05.2 — Hybrid RAG pipeline (production baseline)&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
    A[&quot;User query&quot;] --&amp;gt; B[&quot;Embed query&amp;lt;br/&amp;gt;(embedding model)&quot;]
    B --&amp;gt; C[&quot;Vector search&amp;lt;br/&amp;gt;(dense retrieval)&quot;]
    A --&amp;gt; D[&quot;Keyword search&amp;lt;br/&amp;gt;(BM25 / sparse)&quot;]
    C --&amp;gt; E[&quot;Reranker&amp;lt;br/&amp;gt;(cross-encoder)&quot;]
    D --&amp;gt; E
    E --&amp;gt; F[&quot;Top-K chunks&quot;]
    F --&amp;gt; G[&quot;LLM generates&amp;lt;br/&amp;gt;(prompt + context)&quot;]
    G --&amp;gt; H[&quot;Answer + citations&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Fig 05.3 — Agentic RAG (most capable)&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;flowchart TD
    A[&quot;Complex query&quot;] --&amp;gt; B[&quot;Agent decomposes&amp;lt;br/&amp;gt;into sub-queries&quot;]
    B --&amp;gt; C[&quot;Retrieves from&amp;lt;br/&amp;gt;multiple sources&quot;]
    C --&amp;gt; D{&quot;Enough context?&quot;}
    D --&amp;gt;|&quot;gaps remain&quot;| C
    D --&amp;gt;|&quot;yes&quot;| E[&quot;Synthesizes&amp;lt;br/&amp;gt;grounded answer&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Fig 05.4 — Graph RAG (relationship reasoning)&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;flowchart TD
    A[&quot;Query about&amp;lt;br/&amp;gt;connected entities&quot;] --&amp;gt; B[&quot;Knowledge graph&amp;lt;br/&amp;gt;(entity + relation lookup)&quot;]
    A --&amp;gt; C[&quot;Vector search&amp;lt;br/&amp;gt;(supporting docs)&quot;]
    B --&amp;gt; D[&quot;Multi-hop reasoning&amp;lt;br/&amp;gt;(traverse relationships)&quot;]
    C --&amp;gt; D
    D --&amp;gt; E[&quot;Answer with&amp;lt;br/&amp;gt;relationship chain&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;RAG pipeline components&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Fig 05.5 — Document ingestion pipeline (offline / indexing)&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
    A[&quot;Source docs&amp;lt;br/&amp;gt;(PDF, HTML, DB)&quot;] --&amp;gt; B[&quot;Parse / extract&amp;lt;br/&amp;gt;(text + tables + images)&quot;]
    B --&amp;gt; C[&quot;Chunk&amp;lt;br/&amp;gt;(semantic / recursive)&quot;]
    C --&amp;gt; D[&quot;Embed&amp;lt;br/&amp;gt;(embedding model)&quot;]
    D --&amp;gt; E[&quot;Store&amp;lt;br/&amp;gt;(vector DB + metadata)&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Options (2026)&lt;/th&gt;
&lt;th&gt;Decision&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Embedding model&lt;/td&gt;
&lt;td&gt;Voyage 3.5, Cohere Embed v4, OpenAI text-embedding-3-large, Qwen3-Embedding&lt;/td&gt;
&lt;td&gt;Domain-specific fine-tuned embeddings add 5–15% accuracy for specialized corpora&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vector database&lt;/td&gt;
&lt;td&gt;Qdrant, Pinecone, Weaviate, Chroma, pgvector&lt;/td&gt;
&lt;td&gt;Qdrant for greenfield; pgvector if already on Postgres; Pinecone for managed simplicity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chunking strategy&lt;/td&gt;
&lt;td&gt;Fixed-size, semantic, recursive, document-structure-aware&lt;/td&gt;
&lt;td&gt;Structure-aware (respect headings, paragraphs) &amp;gt; fixed-size. Chunk size 256–512 tokens typical.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reranker&lt;/td&gt;
&lt;td&gt;Cohere Rerank, Voyage Rerank, cross-encoder models&lt;/td&gt;
&lt;td&gt;Always add a reranker for production — cheap uplift in relevance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Retrieval method&lt;/td&gt;
&lt;td&gt;Dense (vector), Sparse (BM25), Hybrid (both)&lt;/td&gt;
&lt;td&gt;Hybrid is the 2026 production baseline — catches what pure vector misses&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — chunk size:&lt;/strong&gt; &lt;strong&gt;Small chunks (128–256 tokens):&lt;/strong&gt; more precise retrieval, but lose surrounding context. &lt;strong&gt;Large chunks (512–1024):&lt;/strong&gt; more context per result, but may retrieve irrelevant noise. In practice, &lt;strong&gt;256–512 with overlap&lt;/strong&gt; is the sweet spot. Some systems use &quot;parent-child&quot; chunking — retrieve the small chunk, then expand to include its parent context.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;06 — Fine-Tuning&lt;/h2&gt;
&lt;p&gt;Fine-tuning changes the model&apos;s &lt;strong&gt;weights&lt;/strong&gt; — it&apos;s the most powerful customization but the most expensive and slowest to iterate. Use it only when prompt engineering + RAG can&apos;t achieve the behavior you need. (This section is the architectural summary; I go through the methods, data requirements, and evaluation in detail in &lt;a href=&quot;https://riddam.github.io/guides/model-training-finetuning-eval/&quot;&gt;model training, fine-tuning and evaluation&lt;/a&gt;.)&lt;/p&gt;
&lt;h3&gt;When to fine-tune (and when not to)&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Fine-tune when:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You need a specific &lt;strong&gt;tone, style, or format&lt;/strong&gt; consistently&lt;/li&gt;
&lt;li&gt;Domain-specific &lt;strong&gt;reasoning patterns&lt;/strong&gt; that prompting can&apos;t reliably produce&lt;/li&gt;
&lt;li&gt;You need to &lt;strong&gt;reduce latency&lt;/strong&gt; (smaller fine-tuned model &amp;gt; larger general model)&lt;/li&gt;
&lt;li&gt;You have &lt;strong&gt;large volume&lt;/strong&gt; and need to cut per-token cost by using a smaller model&lt;/li&gt;
&lt;li&gt;You need &lt;strong&gt;data sovereignty&lt;/strong&gt; and will self-host open weights&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Don&apos;t fine-tune when:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You need &lt;strong&gt;knowledge&lt;/strong&gt; — use RAG instead (fine-tuning &quot;bakes in&quot; data that goes stale)&lt;/li&gt;
&lt;li&gt;You&apos;re &lt;strong&gt;still exploring&lt;/strong&gt; the product — iteration speed matters more than optimization&lt;/li&gt;
&lt;li&gt;You have &lt;strong&gt;less than 100 high-quality examples&lt;/strong&gt; — insufficient for meaningful training&lt;/li&gt;
&lt;li&gt;The issue is &lt;strong&gt;prompt quality&lt;/strong&gt;, not model capability — fix the prompt first&lt;/li&gt;
&lt;li&gt;The model &lt;strong&gt;already does it well&lt;/strong&gt; with good prompting — fine-tuning adds complexity for no gain&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Fine-tuning techniques&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Technique&lt;/th&gt;
&lt;th&gt;What it changes&lt;/th&gt;
&lt;th&gt;Data needed&lt;/th&gt;
&lt;th&gt;Use when&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Full fine-tuning&lt;/td&gt;
&lt;td&gt;All model weights&lt;/td&gt;
&lt;td&gt;10K+ examples&lt;/td&gt;
&lt;td&gt;Deep domain adaptation; requires significant compute&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LoRA / QLoRA&lt;/td&gt;
&lt;td&gt;Low-rank adapter layers only&lt;/td&gt;
&lt;td&gt;100–1000 examples&lt;/td&gt;
&lt;td&gt;Most practical for production; fast training, small adapters&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RLHF / DPO&lt;/td&gt;
&lt;td&gt;Alignment / preference&lt;/td&gt;
&lt;td&gt;Preference pairs&lt;/td&gt;
&lt;td&gt;Safety alignment, output quality improvement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Distillation&lt;/td&gt;
&lt;td&gt;Trains small model to mimic large model&lt;/td&gt;
&lt;td&gt;Large model outputs&lt;/td&gt;
&lt;td&gt;Cost reduction: train Haiku-class to act like Opus-class on your domain&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The hybrid pattern (2026 default):&lt;/strong&gt; The best-performing production systems combine all three: &lt;strong&gt;fine-tuned model&lt;/strong&gt; (behavior + domain tone) → &lt;strong&gt;RAG&lt;/strong&gt; (current knowledge at runtime) → &lt;strong&gt;prompt engineering&lt;/strong&gt; (per-request orchestration and guardrails). Each layer addresses a different failure mode.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Fig 06.1 — The hybrid production pattern&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
    A[&quot;User request&quot;] --&amp;gt; B[&quot;Prompt engineering&amp;lt;br/&amp;gt;(system prompt + guardrails)&quot;]
    B --&amp;gt; C[&quot;RAG retrieval&amp;lt;br/&amp;gt;(current knowledge)&quot;]
    C --&amp;gt; D[&quot;Fine-tuned model&amp;lt;br/&amp;gt;(domain behavior)&quot;]
    D --&amp;gt; E[&quot;Response&amp;lt;br/&amp;gt;(grounded + on-brand)&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;07 — Agentic AI Patterns&lt;/h2&gt;
&lt;p&gt;An &lt;strong&gt;agent&lt;/strong&gt; is an LLM that operates in a loop — observe, think, act, repeat — rather than answering one question and stopping. It can use tools, make decisions, and take multi-step actions toward a goal.&lt;/p&gt;
&lt;h3&gt;When to use agentic vs simpler patterns&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Fig 07.1 — Complexity spectrum&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Single question → single answer, no tools needed? → &lt;strong&gt;Simple prompt (no agent)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Fixed multi-step pipeline with no dynamic decisions? → &lt;strong&gt;Workflow / chain (deterministic)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Dynamic decisions + tool use + variable steps? → &lt;strong&gt;Single agent with tools&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Multiple specialized capabilities + coordination? → &lt;strong&gt;Multi-agent system&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — agent vs workflow:&lt;/strong&gt; &lt;strong&gt;Workflow (chain):&lt;/strong&gt; deterministic, predictable, easy to debug, lower cost — but can&apos;t handle dynamic/unknown paths. &lt;strong&gt;Agent:&lt;/strong&gt; flexible, handles ambiguity, can reason about next steps — but unpredictable, harder to debug, more expensive. Default to the &lt;strong&gt;simplest pattern that handles the task&lt;/strong&gt;. Don&apos;t build an agent when a chain would do.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;The agentic loop&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;1. Send request (prompt + tools + history)
2. Model responds
3. Check stop_reason
4. Execute tool(s)
5. Append results
⤴ Loop
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;stop_reason === &quot;tool_use&quot;&lt;/code&gt; → execute tools → loop back.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stop_reason === &quot;end_turn&quot;&lt;/code&gt; → terminate. This is the &lt;strong&gt;only reliable&lt;/strong&gt; termination signal.&lt;/li&gt;
&lt;li&gt;Every iteration: append the assistant response and tool results to conversation history, so the model can reason about the cumulative state.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;What&apos;s new in agent loops (2026)&lt;/h3&gt;
&lt;p&gt;That hand-written loop still describes what happens under the hood, but in 2026 you rarely write it yourself. Four shifts changed how loops are built:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Managed loop runners.&lt;/strong&gt; SDKs now ship a &quot;tool runner&quot; that owns the observe → act → loop cycle: you supply the tool functions, it calls the model, executes tools, feeds results back, and stops on &lt;code&gt;end_turn&lt;/code&gt;. You keep per-iteration hooks — approval gates, logging, result rewriting — without hand-rolling control flow.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Budget-aware loops.&lt;/strong&gt; Instead of an unbounded loop, hand the agent a &lt;strong&gt;token budget&lt;/strong&gt; for the whole task. The model sees a running countdown and paces itself — prioritizing, then wrapping up gracefully — rather than being cut off mid-thought. This is distinct from a hard per-response cap the model can&apos;t see.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Context management inside the loop.&lt;/strong&gt; Long loops overflow the context window. Two complementary tools keep them alive: &lt;strong&gt;context editing&lt;/strong&gt; prunes stale tool results and reasoning from the transcript, and &lt;strong&gt;compaction&lt;/strong&gt; summarizes earlier turns into a compact block. Together they let an agent run for hours without hitting the limit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Server-managed agents.&lt;/strong&gt; The newest option removes the loop from your code entirely: the provider runs the agent loop &lt;em&gt;and&lt;/em&gt; hosts a sandboxed container where the tools execute (bash, files, code). You define the agent once, stream events, and answer any custom-tool calls — the right fit for long-running, scheduled, or stateful agents.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One loop mechanic worth knowing regardless: when a &lt;strong&gt;server-side tool&lt;/strong&gt; (web search, code execution) runs many internal iterations, a turn can stop with a &lt;em&gt;pause&lt;/em&gt; signal instead of finishing. That is a checkpoint, not a termination — you resume by sending the conversation back unchanged.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; reach for the managed runner first; add budgets and context management when loops get long; graduate to a server-managed agent only when you need hosted execution or persistence.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Agent frameworks (2026)&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Framework&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;th&gt;Provider&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Agent SDK&lt;/td&gt;
&lt;td&gt;Production agents on Claude; hooks, subagents, session management&lt;/td&gt;
&lt;td&gt;Anthropic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LangGraph&lt;/td&gt;
&lt;td&gt;Complex stateful workflows with conditional branching, checkpointing&lt;/td&gt;
&lt;td&gt;LangChain&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AutoGen&lt;/td&gt;
&lt;td&gt;Multi-agent conversation, research-oriented architectures&lt;/td&gt;
&lt;td&gt;Microsoft&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CrewAI&lt;/td&gt;
&lt;td&gt;Quick multi-agent prototyping, role-based agents&lt;/td&gt;
&lt;td&gt;Community&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenAI Agents SDK&lt;/td&gt;
&lt;td&gt;Handoff-based agent routing, OpenAI ecosystem (the older Assistants API is being sunset in favor of the Responses API / Agents SDK)&lt;/td&gt;
&lt;td&gt;OpenAI&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;08 — Multi-Agent Systems&lt;/h2&gt;
&lt;p&gt;When a single agent isn&apos;t enough, you coordinate multiple specialized agents. Here are the 6 proven production patterns.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pattern&lt;/th&gt;
&lt;th&gt;How it works&lt;/th&gt;
&lt;th&gt;Use when&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1. Router (classifier)&lt;/td&gt;
&lt;td&gt;Lightweight classifier directs each request to a specialized agent&lt;/td&gt;
&lt;td&gt;Many distinct intents; each handled by a different specialist&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2. Planner-executor&lt;/td&gt;
&lt;td&gt;Planner decomposes goal into steps; executor agents run steps in sequence/parallel&lt;/td&gt;
&lt;td&gt;Complex tasks requiring dynamic decomposition&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3. Tool-use agent&lt;/td&gt;
&lt;td&gt;Single agent with a toolbox; LLM decides which tool to call when&lt;/td&gt;
&lt;td&gt;Moderate complexity; the agent can reason about tool selection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4. Generator-critic&lt;/td&gt;
&lt;td&gt;Primary agent generates output; critic agent verifies; ships only if critic passes&lt;/td&gt;
&lt;td&gt;High-quality output; code review, compliance checking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5. Supervisor-workers&lt;/td&gt;
&lt;td&gt;Manager owns the goal; workers own subtasks; manager delegates and synthesizes&lt;/td&gt;
&lt;td&gt;Enterprise workflows, regulated environments&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6. Parallel + judge&lt;/td&gt;
&lt;td&gt;Multiple agents work the same problem in parallel; a judge picks the best output&lt;/td&gt;
&lt;td&gt;Creative tasks, diverse approaches, consensus needed&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Critical design principles&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Fig 08.1 — Router pattern (classifier → specialists)&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;flowchart TD
    A[&quot;User request&quot;] --&amp;gt; B[&quot;Router / classifier&amp;lt;br/&amp;gt;(Haiku 4.5 — fast, cheap)&quot;]
    B --&amp;gt; C[&quot;Billing agent&quot;]
    B --&amp;gt; D[&quot;Tech support agent&quot;]
    B --&amp;gt; E[&quot;Returns agent&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Fig 08.2 — Planner-executor pattern&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
    A[&quot;Goal&quot;] --&amp;gt; B[&quot;Planner agent&amp;lt;br/&amp;gt;(decomposes into steps)&quot;]
    B --&amp;gt; C[&quot;Step 1 executor&quot;]
    C --&amp;gt; D[&quot;Step 2 executor&quot;]
    D --&amp;gt; E[&quot;Step N executor&quot;]
    E --&amp;gt; F[&quot;Planner synthesizes&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Fig 08.3 — Generator-critic (quality gate)&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;flowchart TD
    A[&quot;Task&quot;] --&amp;gt; B[&quot;Generator agent&amp;lt;br/&amp;gt;(produces output)&quot;]
    B --&amp;gt; C[&quot;Critic agent&amp;lt;br/&amp;gt;(evaluates / verifies)&quot;]
    C --&amp;gt;|&quot;pass&quot;| D[&quot;Ship&quot;]
    C --&amp;gt;|&quot;fail&quot;| E[&quot;Revise&quot;]
    E --&amp;gt; B
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Fig 08.4 — Supervisor-workers (enterprise)&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;flowchart TD
    S[&quot;Supervisor&amp;lt;br/&amp;gt;(owns goal + synthesizes)&quot;] --&amp;gt; A[&quot;Worker A&amp;lt;br/&amp;gt;(subtask 1)&quot;]
    S --&amp;gt; B[&quot;Worker B&amp;lt;br/&amp;gt;(subtask 2)&quot;]
    S --&amp;gt; C[&quot;Worker C&amp;lt;br/&amp;gt;(subtask 3)&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Context isolation:&lt;/strong&gt; each agent gets only the context it needs — never share the coordinator&apos;s full history (prevents context pollution).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Structured handoffs:&lt;/strong&gt; pass JSON between agents, not raw text — preserves attribution and structure.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Minimal footprint:&lt;/strong&gt; each agent scoped to a single responsibility and returns a focused result.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Right-size models:&lt;/strong&gt; router = Haiku 4.5; workers = Sonnet 5; hardest reasoning = Opus 4.8 / Fable 5.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Observability:&lt;/strong&gt; log every agent call, tool use, and decision at the coordinator level. You cannot debug what you cannot see.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Common mistake:&lt;/strong&gt; Building a multi-agent system when a single agent with tools would suffice. Multi-agent adds latency, cost, and debugging complexity. Start with the simplest architecture that works, and only add agents when you hit a clear capability ceiling.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;09 — Tool Use &amp;amp; MCP&lt;/h2&gt;
&lt;h3&gt;Tool use — what it is&lt;/h3&gt;
&lt;p&gt;Tool use lets the model call &lt;strong&gt;functions you define&lt;/strong&gt;. The model doesn&apos;t execute the function — it outputs a structured request (function name + arguments), your code executes it, and you send the result back. This gives the model capabilities beyond text generation: search, calculation, API calls, database queries.&lt;/p&gt;
&lt;h3&gt;MCP (Model Context Protocol)&lt;/h3&gt;
&lt;p&gt;An open standard for connecting AI models to external tools and data sources — &quot;USB-C for AI.&quot; Instead of each app building custom integrations, MCP provides a standard protocol.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;MCP primitive&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;th&gt;Direction&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Tools&lt;/td&gt;
&lt;td&gt;Functions the model can call (actions)&lt;/td&gt;
&lt;td&gt;Model → server (write/execute)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resources&lt;/td&gt;
&lt;td&gt;Data the model can read (files, records, URIs)&lt;/td&gt;
&lt;td&gt;Server → model (read-only)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prompts&lt;/td&gt;
&lt;td&gt;Reusable prompt templates exposed by the server&lt;/td&gt;
&lt;td&gt;Server → model (templates)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tool description quality matters most:&lt;/strong&gt; The model uses the tool&apos;s &lt;strong&gt;description&lt;/strong&gt; to decide which tool to call. Vague descriptions (&quot;handles data&quot;) lead to misrouting. Write descriptions with &lt;strong&gt;distinct verbs, narrow scope, and clear use cases&lt;/strong&gt;. Test with production queries and log selection accuracy.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;10 — LLMOps &amp;amp; Evaluation&lt;/h2&gt;
&lt;p&gt;LLMOps is the discipline of deploying, monitoring, and improving LLM-based systems in production. It&apos;s MLOps adapted for the non-deterministic, prompt-driven world — which I cover as its own subject in &lt;a href=&quot;https://riddam.github.io/guides/mlops-production-guide/&quot;&gt;MLOps and AI production operations&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;The LLMOps lifecycle&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;Develop (prompts, RAG, agents) → Evaluate (test sets, benchmarks)
→ Deploy (gateway, versioning) → Monitor (logs, quality, cost)
→ Improve (feedback loops) → ⤴ Iterate
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Evaluation (the hardest part)&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Eval type&lt;/th&gt;
&lt;th&gt;How it works&lt;/th&gt;
&lt;th&gt;When&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Human evaluation&lt;/td&gt;
&lt;td&gt;Domain experts rate outputs on rubrics (accuracy, helpfulness, safety)&lt;/td&gt;
&lt;td&gt;Gold standard; expensive; use for benchmarking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LLM-as-judge&lt;/td&gt;
&lt;td&gt;A stronger model evaluates a weaker model&apos;s output against criteria&lt;/td&gt;
&lt;td&gt;Scalable proxy for human eval; useful for regression testing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Automated metrics&lt;/td&gt;
&lt;td&gt;BLEU, ROUGE, exact match, retrieval precision/recall&lt;/td&gt;
&lt;td&gt;Coarse signal; best for RAG retrieval quality, not generation quality&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A/B testing&lt;/td&gt;
&lt;td&gt;Route % of traffic to new version, measure business outcomes&lt;/td&gt;
&lt;td&gt;Production; the only eval that matters is real-user impact&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Model gateway pattern&lt;/h3&gt;
&lt;p&gt;A centralized proxy between your application and LLM providers. It handles: rate limiting, token budget tracking, multi-provider failover, prompt/response logging, cost attribution, and policy enforcement. Every production system should have one.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Cost management levers:&lt;/strong&gt; &lt;strong&gt;Prompt caching&lt;/strong&gt; (90% cheaper cached reads) · &lt;strong&gt;Batch API&lt;/strong&gt; (50% cheaper, async) · &lt;strong&gt;Model right-sizing&lt;/strong&gt; (Haiku 4.5 for routing) · &lt;strong&gt;Token budgets&lt;/strong&gt; (per-user, per-team) · &lt;strong&gt;Progressive summarization&lt;/strong&gt; (reduce context growth). A well-run system can cut LLM costs 40–70% vs naive implementation.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;11 — AI Safety &amp;amp; Guardrails&lt;/h2&gt;
&lt;h3&gt;Defense in depth — layered guardrails&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Fig 11.1 — Guardrail layers&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Controls&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Input guardrails (before the model)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;prompt injection detection, PII scrubbing, topic filtering, rate limiting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model-level controls&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;system prompt constraints, operator permissions, tool restrictions, response prefilling&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Output guardrails (after the model)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;content classification, schema validation, PII detection on output, citation verification&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Action guardrails (before execution)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;tool-call validation (hooks), human-in-the-loop gates, irreversible-action blocks, spending limits&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — programmatic vs prompt-based guardrails:&lt;/strong&gt; &lt;strong&gt;Programmatic (hooks, code):&lt;/strong&gt; deterministic, can&apos;t be jailbroken, auditable — use for hard safety (PII, compliance, permissions). &lt;strong&gt;Prompt-based:&lt;/strong&gt; flexible, natural-language, covers nuance — but can be circumvented by adversarial input. &lt;strong&gt;Layer both:&lt;/strong&gt; prompts handle the soft cases, code handles the hard constraints.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Key safety concepts&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Prompt injection:&lt;/strong&gt; adversarial input that overrides system instructions. Defense: input validation + output verification + model-level resistance + separation of trusted/untrusted content.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hallucination mitigation:&lt;/strong&gt; RAG grounding + citation requirements + self-evaluation + nullable fields in schemas (model can say &quot;I don&apos;t know&quot;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Human-in-the-loop:&lt;/strong&gt; mandatory approval gate before irreversible or high-value actions (financial transactions, data deletion, external communications). Design the escalation criteria explicitly.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Red teaming:&lt;/strong&gt; adversarial testing by humans or automated tools to find failure modes before deployment. Run regularly, not just once.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;12 — Enterprise AI Governance&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data governance:&lt;/strong&gt; RAG is only as good as the data it retrieves. Enforce access controls on retrieval (document-level and row-level ACLs). Don&apos;t let the model see data the user shouldn&apos;t see.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compliance:&lt;/strong&gt; regulated industries (healthcare, finance, government) need audit trails of every prompt, response, tool call, and decision. Log everything through the model gateway.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data residency:&lt;/strong&gt; know where your prompts are processed. Closed APIs send data to the provider&apos;s region. For sovereignty, self-host open-weight models or use provider regions that match your jurisdiction.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cost governance:&lt;/strong&gt; set token budgets per team/project; alert on anomalies; review cost-per-outcome, not just cost-per-token.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model risk management:&lt;/strong&gt; treat LLMs as you&apos;d treat any critical vendor: track model versions, test for regression on updates, have a rollback plan, maintain a &quot;model bill of materials.&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;13 — Infrastructure &amp;amp; Serving&lt;/h2&gt;
&lt;h3&gt;Inference infrastructure&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;Use when&lt;/th&gt;
&lt;th&gt;Trade-off&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;API providers (Anthropic, OpenAI, Google)&lt;/td&gt;
&lt;td&gt;Default. Zero infra, pay per token, highest capability&lt;/td&gt;
&lt;td&gt;Vendor dependency, data leaves your control&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Self-hosted (vLLM, TGI, Ollama)&lt;/td&gt;
&lt;td&gt;Data sovereignty, custom models, predictable cost at scale&lt;/td&gt;
&lt;td&gt;You own GPU infra, ops, scaling, security&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Managed serving (AWS Bedrock, GCP Vertex, Azure AI)&lt;/td&gt;
&lt;td&gt;Cloud-provider ecosystem, compliance, hybrid of API + control&lt;/td&gt;
&lt;td&gt;Cloud lock-in, sometimes behind on latest models&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;GPU/TPU landscape&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;NVIDIA H100/H200:&lt;/strong&gt; the workhorse for LLM training and inference; most available, broadest framework support.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;NVIDIA B100/B200 (Blackwell):&lt;/strong&gt; next-gen, higher throughput; becoming available 2025–2026.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Google TPUs (v5e/v6e):&lt;/strong&gt; competitive for training large models on GCP; Jax/TensorFlow-centric.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AMD MI300X:&lt;/strong&gt; growing alternative; good cost/performance for inference.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — API vs self-host:&lt;/strong&gt; &lt;strong&gt;API&lt;/strong&gt; wins when: you&apos;re under ~$50K/mo in inference, you want the latest models immediately, you don&apos;t have GPU ops expertise. &lt;strong&gt;Self-host&lt;/strong&gt; wins when: you&apos;re spending $100K+/mo (amortized GPU cost is lower), you need data sovereignty, or you&apos;ve fine-tuned open weights. Most enterprises use both — API for frontier reasoning, self-hosted for high-volume / sensitive tasks.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;14 — Multimodal AI&lt;/h2&gt;
&lt;p&gt;Modern AI systems aren&apos;t text-only. &lt;strong&gt;Multimodal&lt;/strong&gt; models process images, audio, video, and code alongside text.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Modality&lt;/th&gt;
&lt;th&gt;Models (2026)&lt;/th&gt;
&lt;th&gt;Use cases&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Vision (image → text)&lt;/td&gt;
&lt;td&gt;Claude Sonnet 5 / Opus 4.8, GPT-5, Gemini 3 Pro&lt;/td&gt;
&lt;td&gt;Document understanding, UI analysis, image description, OCR replacement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Image generation&lt;/td&gt;
&lt;td&gt;GPT-image-1, Midjourney, Stable Diffusion 3, Imagen 4&lt;/td&gt;
&lt;td&gt;Creative assets, product mockups, data visualization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Audio / speech&lt;/td&gt;
&lt;td&gt;Whisper (STT), GPT-5 (native audio), ElevenLabs (TTS)&lt;/td&gt;
&lt;td&gt;Transcription, voice agents, real-time conversation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Video&lt;/td&gt;
&lt;td&gt;Gemini (native video), Sora 2, Runway Gen-4, Google Veo 3&lt;/td&gt;
&lt;td&gt;Video understanding, generation, editing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Code&lt;/td&gt;
&lt;td&gt;Claude (Opus 4.8 / Sonnet 5), GPT-5, Codex, DeepSeek-Coder&lt;/td&gt;
&lt;td&gt;Code generation, review, debugging, migration&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Multimodal RAG&lt;/h3&gt;
&lt;p&gt;Standard RAG embeds text. &lt;strong&gt;Multimodal RAG&lt;/strong&gt; also embeds images, tables, and diagrams from documents (using vision models or multimodal embeddings like CLIP/Jina CLIP). This is critical for document-heavy industries (legal, medical, manufacturing) where important information lives in charts, forms, and images — not just text.&lt;/p&gt;
&lt;h2&gt;15 — Cloud AI Platforms — GCP / AWS / Azure&lt;/h2&gt;
&lt;p&gt;Knowing the patterns (§03–§08) is half the job. The other half is knowing &lt;strong&gt;which cloud services implement them&lt;/strong&gt; for a customer deployment. This section maps every AI architecture pattern to its concrete service on each cloud, plus the architect-level trade-offs for platform selection.&lt;/p&gt;
&lt;h3&gt;The three platforms at a glance&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;GCP&lt;/th&gt;
&lt;th&gt;AWS&lt;/th&gt;
&lt;th&gt;Azure&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Primary AI platform&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI / Gemini Enterprise Agent Platform&lt;/td&gt;
&lt;td&gt;SageMaker + Bedrock&lt;/td&gt;
&lt;td&gt;Azure AI Foundry + Azure ML&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Foundation model access&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Gemini (native), Llama, Gemma via Model Garden&lt;/td&gt;
&lt;td&gt;Claude, Llama, Mistral, Cohere via Bedrock; GPT via custom&lt;/td&gt;
&lt;td&gt;GPT-5 via Azure OpenAI (exclusive); Llama, Mistral via Model Catalog&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Unique hardware&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;TPUs (v5e/v6e) — best $/FLOP for large training&lt;/td&gt;
&lt;td&gt;Trainium/Inferentia — purpose-built inference chips&lt;/td&gt;
&lt;td&gt;Maia AI accelerators (emerging)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Best for&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Data in BigQuery, Gemini models, TPU training, opinionated managed workflows&lt;/td&gt;
&lt;td&gt;Deepest flexibility, broadest ecosystem, Bedrock for Claude/multi-model&lt;/td&gt;
&lt;td&gt;Microsoft-centric orgs, Azure OpenAI (GPT), compliance/hybrid&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sweet spot&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Research, startups, warehouse-native ML&lt;/td&gt;
&lt;td&gt;Expert teams, fine-grained control, large inference&lt;/td&gt;
&lt;td&gt;Enterprises on Microsoft stack, regulated industries&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Service mapping — pattern → cloud service&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;AI architecture pattern&lt;/th&gt;
&lt;th&gt;GCP&lt;/th&gt;
&lt;th&gt;AWS&lt;/th&gt;
&lt;th&gt;Azure&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model training (custom)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI Training + TPUs&lt;/td&gt;
&lt;td&gt;SageMaker Training + p5/Trainium&lt;/td&gt;
&lt;td&gt;Azure ML Compute + ND-series GPUs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Fine-tuning (managed)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI Model Tuning&lt;/td&gt;
&lt;td&gt;SageMaker JumpStart fine-tuning / Bedrock custom models&lt;/td&gt;
&lt;td&gt;Azure AI Foundry fine-tuning / Azure OpenAI fine-tuning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model serving / inference&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI Endpoints (dedicated + serverless)&lt;/td&gt;
&lt;td&gt;SageMaker Endpoints (real-time, serverless, async, multi-model)&lt;/td&gt;
&lt;td&gt;Azure ML Managed Endpoints (online + batch)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Foundation model API (hosted)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI Model Garden / Gemini API&lt;/td&gt;
&lt;td&gt;Amazon Bedrock&lt;/td&gt;
&lt;td&gt;Azure OpenAI Service / Azure AI Model Catalog&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;RAG — vector search&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI Vector Search / AlloyDB pgvector&lt;/td&gt;
&lt;td&gt;Amazon OpenSearch / Bedrock Knowledge Bases / Aurora pgvector&lt;/td&gt;
&lt;td&gt;Azure AI Search (vector mode) / Cosmos DB vCore&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;RAG — embedding&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI Embeddings (Gemini) / text-embedding&lt;/td&gt;
&lt;td&gt;Bedrock Embeddings (Titan / Cohere)&lt;/td&gt;
&lt;td&gt;Azure OpenAI Embeddings (ada-002/3-large)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;RAG — orchestration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI Agent Builder&lt;/td&gt;
&lt;td&gt;Bedrock Knowledge Bases + Agents&lt;/td&gt;
&lt;td&gt;Azure AI Foundry Prompt Flow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;MLOps pipeline&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI Pipelines (Kubeflow)&lt;/td&gt;
&lt;td&gt;SageMaker Pipelines&lt;/td&gt;
&lt;td&gt;Azure ML Pipelines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Experiment tracking&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI Experiments&lt;/td&gt;
&lt;td&gt;SageMaker Experiments / MLflow on SageMaker&lt;/td&gt;
&lt;td&gt;Azure ML + MLflow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model registry&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI Model Registry&lt;/td&gt;
&lt;td&gt;SageMaker Model Registry&lt;/td&gt;
&lt;td&gt;Azure ML Model Registry&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Feature store&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI Feature Store&lt;/td&gt;
&lt;td&gt;SageMaker Feature Store&lt;/td&gt;
&lt;td&gt;Azure ML Managed Feature Store&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Data labeling&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI Data Labeling&lt;/td&gt;
&lt;td&gt;SageMaker Ground Truth&lt;/td&gt;
&lt;td&gt;Azure ML Data Labeling&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;AutoML&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI AutoML&lt;/td&gt;
&lt;td&gt;SageMaker Autopilot&lt;/td&gt;
&lt;td&gt;Azure AutoML&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;AI safety / guardrails&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Model Armor + VPC-SC&lt;/td&gt;
&lt;td&gt;Bedrock Guardrails&lt;/td&gt;
&lt;td&gt;Azure AI Content Safety&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Agent framework&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Agent Builder / Vertex AI Agent&lt;/td&gt;
&lt;td&gt;Bedrock Agents&lt;/td&gt;
&lt;td&gt;Azure AI Agent Service&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Notebooks&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI Workbench (managed JupyterLab)&lt;/td&gt;
&lt;td&gt;SageMaker Studio&lt;/td&gt;
&lt;td&gt;Azure ML Notebooks&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Fig 15.1 — Cloud AI training &amp;amp; inference pipeline (generic, all clouds)&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
    A[&quot;Data&amp;lt;br/&amp;gt;(lake / warehouse)&quot;] --&amp;gt; B[&quot;Feature store&amp;lt;br/&amp;gt;(prep + versioning)&quot;]
    B --&amp;gt; C[&quot;Training job&amp;lt;br/&amp;gt;(GPU/TPU cluster)&quot;]
    C --&amp;gt; D[&quot;Model registry&amp;lt;br/&amp;gt;(versioning + metadata)&quot;]
    D --&amp;gt; E[&quot;Serving endpoint&amp;lt;br/&amp;gt;(real-time / batch)&quot;]
    E --&amp;gt; F[&quot;Monitoring&amp;lt;br/&amp;gt;(drift + performance)&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Platform selection decision tree&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Fig 15.2 — Which cloud for your AI workload?&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data gravity:&lt;/strong&gt; where does most of your data already live? → S3 → AWS · BigQuery → GCP · Azure Data Lake → Azure&lt;/li&gt;
&lt;li&gt;Need &lt;strong&gt;Azure OpenAI (GPT-5)&lt;/strong&gt;? → &lt;strong&gt;Azure (exclusive enterprise GPT access)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Need &lt;strong&gt;Claude&lt;/strong&gt; via managed service? → &lt;strong&gt;AWS Bedrock (deepest Claude integration)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Need &lt;strong&gt;Gemini&lt;/strong&gt; or &lt;strong&gt;TPU training&lt;/strong&gt;? → &lt;strong&gt;GCP Vertex AI&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Microsoft-centric&lt;/strong&gt; org (Entra, M365, Power BI)? → &lt;strong&gt;Azure ML&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Need &lt;strong&gt;maximum flexibility&lt;/strong&gt; + deepest service catalog? → &lt;strong&gt;AWS SageMaker&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Greenfield team&lt;/strong&gt; wanting opinionated, fast-to-start pipelines? → &lt;strong&gt;GCP Vertex AI&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The data gravity rule:&lt;/strong&gt; The single strongest predictor of platform choice is &lt;strong&gt;where the data already lives&lt;/strong&gt;. Moving petabytes between clouds is expensive and slow. If your data is in BigQuery, build on Vertex AI. If it&apos;s in S3, build on SageMaker. If it&apos;s in Azure Data Lake or SQL Server, build on Azure ML. Everything else is secondary.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Training infrastructure trade-offs&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Factor&lt;/th&gt;
&lt;th&gt;GCP&lt;/th&gt;
&lt;th&gt;AWS&lt;/th&gt;
&lt;th&gt;Azure&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Best GPU value&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;TPU v5p ~$4.20/hr (best $/FLOP for large training)&lt;/td&gt;
&lt;td&gt;H100 via p5 ~$8.60–10.80/hr; Trainium for AWS-optimized workloads&lt;/td&gt;
&lt;td&gt;H100 via ND-series; best through EA negotiated pricing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Spot / preemptible&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Spot VMs up to ~91% off (good for training)&lt;/td&gt;
&lt;td&gt;Spot Instances (~60–90% off); SageMaker Managed Spot Training&lt;/td&gt;
&lt;td&gt;Spot VMs available but less GPU spot capacity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Distributed training&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;TPU pods (scale natively); GPU with NCCL&lt;/td&gt;
&lt;td&gt;SageMaker HyperPod (auto fault recovery, 99.9% uptime in 6-week runs)&lt;/td&gt;
&lt;td&gt;Azure ML distributed training with DeepSpeed/FSDP&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost savings&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Sustained Use Discounts (auto); CUDs&lt;/td&gt;
&lt;td&gt;SageMaker Savings Plans (up to 64%)&lt;/td&gt;
&lt;td&gt;Enterprise Agreement negotiated rates&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Inference infrastructure trade-offs&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pattern&lt;/th&gt;
&lt;th&gt;GCP&lt;/th&gt;
&lt;th&gt;AWS&lt;/th&gt;
&lt;th&gt;Azure&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Real-time (always-on)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI Dedicated Endpoints (~$7/day min)&lt;/td&gt;
&lt;td&gt;SageMaker Real-time Endpoints&lt;/td&gt;
&lt;td&gt;Azure ML Managed Online Endpoints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Serverless (scale-to-zero)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI Serverless Prediction (limited model types)&lt;/td&gt;
&lt;td&gt;SageMaker Serverless Inference (scales to zero — dev/low-traffic)&lt;/td&gt;
&lt;td&gt;Azure ML Serverless (newer)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Batch&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI Batch Prediction&lt;/td&gt;
&lt;td&gt;SageMaker Batch Transform&lt;/td&gt;
&lt;td&gt;Azure ML Batch Endpoints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Multi-model hosting&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Custom containers (manual routing)&lt;/td&gt;
&lt;td&gt;SageMaker Multi-Model Endpoints + Inference Components (up to 80% savings)&lt;/td&gt;
&lt;td&gt;Custom containers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Async inference&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Custom (Pub/Sub + Cloud Run)&lt;/td&gt;
&lt;td&gt;SageMaker Async Inference (native, built-in)&lt;/td&gt;
&lt;td&gt;Custom (Service Bus + Azure Functions)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Foundation model API&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex AI / Gemini API (pay per token)&lt;/td&gt;
&lt;td&gt;Bedrock (pay per token; 50% batch discount)&lt;/td&gt;
&lt;td&gt;Azure OpenAI (pay per token; provisioned throughput for steady load)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — managed platform vs self-hosted on cloud:&lt;/strong&gt; &lt;strong&gt;Managed platform&lt;/strong&gt; (SageMaker/Vertex/Azure ML) = faster to ship, less ops, built-in MLOps — but 20–40% more expensive than raw compute (e.g., SageMaker ml.* instances cost more than equivalent EC2). &lt;strong&gt;Self-hosted on raw VMs&lt;/strong&gt; (EC2 + your own serving stack like vLLM) = cheaper at scale, full control — but you own infrastructure, scaling, monitoring. Use managed for most workloads; go self-hosted only if you have a dedicated MLOps team &lt;em&gt;and&lt;/em&gt; the cost savings justify it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Multi-cloud AI patterns&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Train on one cloud, infer on another:&lt;/strong&gt; train where GPUs/TPUs are cheapest (GCP TPUs for large models), deploy inference where your app already runs (AWS/Azure). Transfer the trained model weights, not the training data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AI Gateway pattern:&lt;/strong&gt; a proxy layer that routes LLM API calls to the cheapest/fastest/most-available provider (Claude on Bedrock, GPT on Azure, Gemini on Vertex) with automatic failover. Emerging standard for multi-cloud LLM ops.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Portable MLOps:&lt;/strong&gt; standardize on vendor-neutral tools (MLflow for tracking, KubeFlow for pipelines, ONNX for model format) to reduce lock-in. Managed services are faster but create deeper coupling.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Fig 15.3 — Multi-cloud AI gateway pattern&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;flowchart TD
    A[&quot;Application&quot;] --&amp;gt; G[&quot;AI Gateway&amp;lt;br/&amp;gt;(routing, failover, budget)&quot;]
    G --&amp;gt; B[&quot;AWS Bedrock&amp;lt;br/&amp;gt;(Claude, Llama)&quot;]
    G --&amp;gt; C[&quot;GCP Vertex AI&amp;lt;br/&amp;gt;(Gemini, Gemma)&quot;]
    G --&amp;gt; D[&quot;Azure OpenAI&amp;lt;br/&amp;gt;(GPT-5)&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;16 — Trade-off Master Reference&lt;/h2&gt;
&lt;p&gt;Every architectural decision an AI architect makes, in one table.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Decision&lt;/th&gt;
&lt;th&gt;Option A&lt;/th&gt;
&lt;th&gt;Option B&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Customization approach&lt;/td&gt;
&lt;td&gt;Prompt engineering&lt;/td&gt;
&lt;td&gt;RAG → Fine-tuning&lt;/td&gt;
&lt;td&gt;Start with prompts, escalate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model tier&lt;/td&gt;
&lt;td&gt;Frontier (most capable)&lt;/td&gt;
&lt;td&gt;Fast/cheap (cost-efficient)&lt;/td&gt;
&lt;td&gt;Right-size per task&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model source&lt;/td&gt;
&lt;td&gt;Closed API&lt;/td&gt;
&lt;td&gt;Open weights (self-host)&lt;/td&gt;
&lt;td&gt;API unless sovereignty/cost forces self-host&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RAG vs fine-tune&lt;/td&gt;
&lt;td&gt;RAG (knowledge at runtime)&lt;/td&gt;
&lt;td&gt;Fine-tune (behavior change)&lt;/td&gt;
&lt;td&gt;RAG for knowledge, fine-tune for behavior only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Agent vs workflow&lt;/td&gt;
&lt;td&gt;Deterministic workflow/chain&lt;/td&gt;
&lt;td&gt;Dynamic agent loop&lt;/td&gt;
&lt;td&gt;Simplest that works&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Single vs multi-agent&lt;/td&gt;
&lt;td&gt;One agent + tools&lt;/td&gt;
&lt;td&gt;Multi-agent coordination&lt;/td&gt;
&lt;td&gt;Single until you hit capability ceiling&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sequential vs parallel&lt;/td&gt;
&lt;td&gt;Sequential (steps depend on prior)&lt;/td&gt;
&lt;td&gt;Parallel (independent subtasks)&lt;/td&gt;
&lt;td&gt;Sequential for dependent; parallel for independent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Guardrails&lt;/td&gt;
&lt;td&gt;Prompt-based (soft)&lt;/td&gt;
&lt;td&gt;Programmatic hooks (hard)&lt;/td&gt;
&lt;td&gt;Both — prompts for nuance, code for safety&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Structured vs free-form output&lt;/td&gt;
&lt;td&gt;Schema-validated JSON&lt;/td&gt;
&lt;td&gt;Natural language text&lt;/td&gt;
&lt;td&gt;Structured for machine consumption&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chunk size (RAG)&lt;/td&gt;
&lt;td&gt;Small (128–256 tokens)&lt;/td&gt;
&lt;td&gt;Large (512–1024 tokens)&lt;/td&gt;
&lt;td&gt;256–512 with overlap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Retrieval method&lt;/td&gt;
&lt;td&gt;Vector (dense) only&lt;/td&gt;
&lt;td&gt;Hybrid (vector + keyword)&lt;/td&gt;
&lt;td&gt;Hybrid is 2026 production baseline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Evaluation&lt;/td&gt;
&lt;td&gt;Automated metrics&lt;/td&gt;
&lt;td&gt;Human evaluation&lt;/td&gt;
&lt;td&gt;LLM-as-judge for scale, human for gold standard&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Batch vs real-time&lt;/td&gt;
&lt;td&gt;Batch API (50% cheaper)&lt;/td&gt;
&lt;td&gt;Real-time Messages API&lt;/td&gt;
&lt;td&gt;Batch for bulk ETL; real-time for user-facing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Context strategy&lt;/td&gt;
&lt;td&gt;Full history (precise)&lt;/td&gt;
&lt;td&gt;Progressive summarization (efficient)&lt;/td&gt;
&lt;td&gt;Summarize when context exceeds 50% of window&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Caching&lt;/td&gt;
&lt;td&gt;Prompt cache (90% cheaper reads)&lt;/td&gt;
&lt;td&gt;No cache&lt;/td&gt;
&lt;td&gt;Cache anything repeated across turns&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost control&lt;/td&gt;
&lt;td&gt;Per-token optimization&lt;/td&gt;
&lt;td&gt;Per-outcome optimization&lt;/td&gt;
&lt;td&gt;Measure cost per successful outcome, not just tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud AI platform&lt;/td&gt;
&lt;td&gt;Managed (SageMaker/Vertex/Azure ML)&lt;/td&gt;
&lt;td&gt;Self-hosted on raw compute&lt;/td&gt;
&lt;td&gt;Managed unless dedicated MLOps team + cost savings justify self-hosting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Training hardware&lt;/td&gt;
&lt;td&gt;GPUs (H100, universal)&lt;/td&gt;
&lt;td&gt;TPUs (GCP) / Trainium (AWS)&lt;/td&gt;
&lt;td&gt;GPUs for flexibility; TPU/Trainium for cost at large scale&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Foundation model source&lt;/td&gt;
&lt;td&gt;Cloud-managed API (Bedrock/Vertex/Azure OpenAI)&lt;/td&gt;
&lt;td&gt;Direct vendor API (Anthropic/OpenAI)&lt;/td&gt;
&lt;td&gt;Cloud-managed for governance + VPC; direct for latest models + flexibility&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-cloud vs single&lt;/td&gt;
&lt;td&gt;Single cloud (simpler ops)&lt;/td&gt;
&lt;td&gt;Multi-cloud (avoid lock-in)&lt;/td&gt;
&lt;td&gt;Single unless regulatory/cost/model-access forces multi-cloud&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The architect&apos;s mental model:&lt;/strong&gt; Every decision above is a dial, not a switch. The expert architect doesn&apos;t pick &quot;always A&quot; or &quot;always B&quot; — they tune each dial per use case, per constraint, and per organizational context. The table gives you the defaults; the skill is knowing when to deviate.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;17 — Books &amp;amp; Learning Path&lt;/h2&gt;
&lt;p&gt;Organized as a reading path — start at the foundation and work up. Each book is mapped to the guide sections it reinforces. The goal is depth and coherence, not breadth — these are the ones practitioners actually reference.&lt;/p&gt;
&lt;h3&gt;Tier 1 — Foundations (start here)&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Book&lt;/th&gt;
&lt;th&gt;Author(s)&lt;/th&gt;
&lt;th&gt;Covers&lt;/th&gt;
&lt;th&gt;Maps to&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Build a Large Language Model (From Scratch)&lt;/td&gt;
&lt;td&gt;Sebastian Raschka · Manning, 2025&lt;/td&gt;
&lt;td&gt;Attention, tokenization, pretraining, fine-tuning, LoRA — builds a GPT-like model step by step. Understand what&apos;s inside the black box.&lt;/td&gt;
&lt;td&gt;§02, §06&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hands-On Large Language Models&lt;/td&gt;
&lt;td&gt;Jay Alammar &amp;amp; Maarten Grootendorst · O&apos;Reilly, 2024&lt;/td&gt;
&lt;td&gt;Embeddings → RAG → fine-tuning in one accessible flow. Great visual explanations of transformer internals.&lt;/td&gt;
&lt;td&gt;§02, §05, §06&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Designing Machine Learning Systems&lt;/td&gt;
&lt;td&gt;Chip Huyen · O&apos;Reilly, 2022&lt;/td&gt;
&lt;td&gt;The ML lifecycle: data, modeling, deployment, monitoring, iteration. The principles transfer directly to LLM systems.&lt;/td&gt;
&lt;td&gt;§10, §12&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Tier 2 — Production AI engineering&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Book&lt;/th&gt;
&lt;th&gt;Author(s)&lt;/th&gt;
&lt;th&gt;Covers&lt;/th&gt;
&lt;th&gt;Maps to&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;AI Engineering&lt;/td&gt;
&lt;td&gt;Chip Huyen · O&apos;Reilly, 2025&lt;/td&gt;
&lt;td&gt;The full stack: evaluation, prompt design, RAG, agent architectures, deployment trade-offs. Arguably the single best production LLM book.&lt;/td&gt;
&lt;td&gt;§03–§10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The LLM Engineer&apos;s Handbook&lt;/td&gt;
&lt;td&gt;Paul Iusztin &amp;amp; Maxime Labonne · Packt, 2024&lt;/td&gt;
&lt;td&gt;End-to-end project: RAG, fine-tuning, vector DBs, evaluation, deployment, observability, cost optimization.&lt;/td&gt;
&lt;td&gt;§05, §06, §10, §13&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Building LLMs for Production&lt;/td&gt;
&lt;td&gt;Louis-François Bouchard &amp;amp; Louie Peters · Towards AI, 2024&lt;/td&gt;
&lt;td&gt;Practical RAG techniques (vanilla through GraphRAG), prompt engineering, agents, fine-tuning, deployment. Code-heavy.&lt;/td&gt;
&lt;td&gt;§04, §05, §06, §07&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Tier 3 — Agents &amp;amp; multi-agent systems&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Book&lt;/th&gt;
&lt;th&gt;Author(s)&lt;/th&gt;
&lt;th&gt;Covers&lt;/th&gt;
&lt;th&gt;Maps to&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Designing Multi-Agent Systems&lt;/td&gt;
&lt;td&gt;Victor Dibia · independently published, 2025&lt;/td&gt;
&lt;td&gt;Principles, patterns, and implementation for AI agents — orchestration patterns, MCP/A2A, evaluation, failure modes, case studies. Framework-agnostic, build from scratch.&lt;/td&gt;
&lt;td&gt;§07, §08, §09, §11&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Agentic Architectural Patterns for Building Multi-Agent Systems&lt;/td&gt;
&lt;td&gt;Ali Arsanjani &amp;amp; Juan Pablo Bustos · Packt, 2026&lt;/td&gt;
&lt;td&gt;Hierarchical multi-agent architecture, coordination, explainability, fault tolerance, human-agent interaction. Enterprise-focused.&lt;/td&gt;
&lt;td&gt;§08, §11, §12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Building LLM-Powered Applications&lt;/td&gt;
&lt;td&gt;Valentina Alto · Packt, 2024&lt;/td&gt;
&lt;td&gt;LangChain, agent memory, tool integration, multi-agent architectures, failure handling. Prototype-to-production.&lt;/td&gt;
&lt;td&gt;§07, §08, §09&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Tier 4 — Specialized depth&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Book&lt;/th&gt;
&lt;th&gt;Author(s)&lt;/th&gt;
&lt;th&gt;Covers&lt;/th&gt;
&lt;th&gt;Maps to&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Prompt Engineering for LLMs&lt;/td&gt;
&lt;td&gt;John Berryman &amp;amp; Albert Ziegler · O&apos;Reilly, 2025&lt;/td&gt;
&lt;td&gt;Context as &quot;packets of knowledge&quot;; flexible, scalable prompt systems. Written by a core GitHub Copilot engineer.&lt;/td&gt;
&lt;td&gt;§04&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prompt Engineering for Generative AI&lt;/td&gt;
&lt;td&gt;James Phoenix &amp;amp; Mike Taylor · O&apos;Reilly, 2024&lt;/td&gt;
&lt;td&gt;CoT, ReAct, planning loops, agent behavioral architecture, prompt debugging. Strong on why agents fail.&lt;/td&gt;
&lt;td&gt;§04, §07&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Building Reliable AI Systems&lt;/td&gt;
&lt;td&gt;Rush Shahani · Manning, 2026&lt;/td&gt;
&lt;td&gt;Reduce hallucinations, improve performance, manage bias. From prototype to production reliability.&lt;/td&gt;
&lt;td&gt;§10, §11&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Generative AI Design Patterns&lt;/td&gt;
&lt;td&gt;Valliappa Lakshmanan &amp;amp; Hannes Hapke · O&apos;Reilly&lt;/td&gt;
&lt;td&gt;32 patterns including RAG, reasoning, generation, evaluation. Pattern catalog for architects.&lt;/td&gt;
&lt;td&gt;§04–§08&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Machine Learning System Design Interview&lt;/td&gt;
&lt;td&gt;Ali Aminian &amp;amp; Alex Xu&lt;/td&gt;
&lt;td&gt;ML design problems, feature engineering, scalability, monitoring. System-design thinking for ML/AI.&lt;/td&gt;
&lt;td&gt;§10, §12, §13&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Tier 5 — Data &amp;amp; infrastructure foundations&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Book&lt;/th&gt;
&lt;th&gt;Author(s)&lt;/th&gt;
&lt;th&gt;Covers&lt;/th&gt;
&lt;th&gt;Maps to&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Fundamentals of Data Engineering&lt;/td&gt;
&lt;td&gt;Joe Reis &amp;amp; Matt Housley · O&apos;Reilly, 2022&lt;/td&gt;
&lt;td&gt;Data lifecycle: ingestion, storage, transformation, orchestration, serving. The data layer beneath every AI system.&lt;/td&gt;
&lt;td&gt;§05 (data for RAG), §12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Designing Data-Intensive Applications&lt;/td&gt;
&lt;td&gt;Martin Kleppmann · O&apos;Reilly, 2017&lt;/td&gt;
&lt;td&gt;Distributed systems, consistency, replication, partitioning. Still the GOAT for understanding the infrastructure AI runs on.&lt;/td&gt;
&lt;td&gt;§13&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Tier 6 — Cloud AI platforms &amp;amp; MLOps&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Book&lt;/th&gt;
&lt;th&gt;Author(s)&lt;/th&gt;
&lt;th&gt;Covers&lt;/th&gt;
&lt;th&gt;Maps to&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Practical MLOps&lt;/td&gt;
&lt;td&gt;Noah Gift &amp;amp; Alfredo Deza · O&apos;Reilly, 2021&lt;/td&gt;
&lt;td&gt;MLOps on AWS, Azure, GCP — the cross-cloud operational playbook. AutoML, containers, edge, monitoring. Practical case studies.&lt;/td&gt;
&lt;td&gt;§10, §13, §15&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MLOps Engineering at Scale&lt;/td&gt;
&lt;td&gt;Carl Osipov · Manning, 2022&lt;/td&gt;
&lt;td&gt;Serverless ML pipelines on AWS: PyTorch + SageMaker + Lambda + Step Functions. Infrastructure-as-code for ML.&lt;/td&gt;
&lt;td&gt;§10, §13, §15 (AWS)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Cloud Platform (GCP) MLOps Engineer Handbook&lt;/td&gt;
&lt;td&gt;Dilip Kumar Mondal · 2026&lt;/td&gt;
&lt;td&gt;Vertex AI, BigQuery, Cloud Build, Pipelines. End-to-end GCP-native ML platform design with drift detection and monitoring.&lt;/td&gt;
&lt;td&gt;§10, §15 (GCP)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hands-On MLOps on Azure&lt;/td&gt;
&lt;td&gt;Banibrata De · Packt&lt;/td&gt;
&lt;td&gt;Azure ML CLI, GitHub integration, LLMOps, secure and scalable ML workflows on Azure. Enterprise governance focus.&lt;/td&gt;
&lt;td&gt;§10, §12, §15 (Azure)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The Machine Learning Solutions Architect Handbook&lt;/td&gt;
&lt;td&gt;David Ping · Packt, 2nd ed. 2024&lt;/td&gt;
&lt;td&gt;ML lifecycle, system design, MLOps, generative AI from a solutions architect perspective. Cross-cloud strategies and best practices.&lt;/td&gt;
&lt;td&gt;§10–§15&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI Systems Performance Engineering&lt;/td&gt;
&lt;td&gt;Chris Fregly · O&apos;Reilly, 2025&lt;/td&gt;
&lt;td&gt;Optimizing model training and inference with GPUs, CUDA, PyTorch. Hardware-level understanding for architects who need to spec infrastructure.&lt;/td&gt;
&lt;td&gt;§13, §15&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Free &amp;amp; open resources&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Resource&lt;/th&gt;
&lt;th&gt;What it is&lt;/th&gt;
&lt;th&gt;Maps to&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Anthropic Academy (&lt;a href=&quot;http://anthropic.skilljar.com&quot;&gt;anthropic.skilljar.com&lt;/a&gt;)&lt;/td&gt;
&lt;td&gt;19 free courses: Claude API, MCP, Claude Code, AI Fluency, Agentic Architecture. Official Anthropic.&lt;/td&gt;
&lt;td&gt;§04, §07, §09&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Anthropic Cookbook (&lt;a href=&quot;http://github.com/anthropics/anthropic-cookbook&quot;&gt;github.com/anthropics/anthropic-cookbook&lt;/a&gt;)&lt;/td&gt;
&lt;td&gt;43K+ stars. Production recipes: RAG, tool use, agents, structured output, prompt caching.&lt;/td&gt;
&lt;td&gt;§04, §05, §07, §09&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;http://DeepLearning.AI&quot;&gt;DeepLearning.AI&lt;/a&gt; short courses&lt;/td&gt;
&lt;td&gt;Free courses with Andrew Ng: LangChain, LlamaIndex, RAG, agents, fine-tuning, prompt engineering.&lt;/td&gt;
&lt;td&gt;§03–§08&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Full Stack AI Engineering (Towards AI Academy)&lt;/td&gt;
&lt;td&gt;Louis-François Bouchard&apos;s practical course: RAG, agents, fine-tuning, deployment.&lt;/td&gt;
&lt;td&gt;§05–§10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LLM Visualization (&lt;a href=&quot;http://bbycroft.net/llm&quot;&gt;bbycroft.net/llm&lt;/a&gt;)&lt;/td&gt;
&lt;td&gt;Interactive 3D visualization of transformer internals. Best single resource for building intuition on how LLMs work.&lt;/td&gt;
&lt;td&gt;§02&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MCP Specification (&lt;a href=&quot;http://modelcontextprotocol.io&quot;&gt;modelcontextprotocol.io&lt;/a&gt;)&lt;/td&gt;
&lt;td&gt;The open standard specification for tool/resource/prompt integration.&lt;/td&gt;
&lt;td&gt;§09&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud ML Platforms (Coursera — Board Infinity)&lt;/td&gt;
&lt;td&gt;Free course: deploy ML on AWS SageMaker, Azure ML, Vertex AI. Practical cross-cloud comparison.&lt;/td&gt;
&lt;td&gt;§15&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AWS ML Specialty exam guide + free training&lt;/td&gt;
&lt;td&gt;AWS Skill Builder free courses covering SageMaker, Bedrock, MLOps on AWS.&lt;/td&gt;
&lt;td&gt;§15 (AWS)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Cloud Skills Boost — ML Engineer path&lt;/td&gt;
&lt;td&gt;Free labs + courses on Vertex AI, BigQuery ML, MLOps on GCP.&lt;/td&gt;
&lt;td&gt;§15 (GCP)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Microsoft Learn — Azure AI Engineer path&lt;/td&gt;
&lt;td&gt;Free modules on Azure ML, Azure OpenAI, Prompt Flow, responsible AI.&lt;/td&gt;
&lt;td&gt;§15 (Azure)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Recommended reading order&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Fig 17.1 — Learning path (follow the arrows)&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
    A[&quot;1. Raschka&amp;lt;br/&amp;gt;(LLM internals)&quot;] --&amp;gt; B[&quot;2. Chip Huyen&amp;lt;br/&amp;gt;(AI Engineering)&quot;]
    B --&amp;gt; C[&quot;3. LLM Eng Handbook&amp;lt;br/&amp;gt;(production depth)&quot;]
    C --&amp;gt; D[&quot;4. Dibia&amp;lt;br/&amp;gt;(agents)&quot;]
    D --&amp;gt; E[&quot;5. Arsanjani&amp;lt;br/&amp;gt;(multi-agent)&quot;]
    subgraph SG1[&quot;Parallel reads&quot;]
        P1[&quot;Berryman&amp;lt;br/&amp;gt;(prompting)&quot;]
        P2[&quot;Kleppmann&amp;lt;br/&amp;gt;(infra)&quot;]
        P3[&quot;Reis&amp;lt;br/&amp;gt;(data eng)&quot;]
    end
    subgraph SG2[&quot;Platform depth&quot;]
        Q1[&quot;Gift and Deza&amp;lt;br/&amp;gt;(MLOps)&quot;]
        Q2[&quot;Ping&amp;lt;br/&amp;gt;(ML Solutions Arch)&quot;]
        Q3[&quot;Cloud-specific&amp;lt;br/&amp;gt;(GCP/AWS/Azure)&quot;]
    end
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The learning principle:&lt;/strong&gt; Reading is necessary but not sufficient. &lt;strong&gt;Pair each book with a real project:&lt;/strong&gt; build a RAG chatbot after the RAG chapters, fine-tune a model after the fine-tuning chapters, deploy an agent after the agent chapters. The combination of strong mental models from books and hands-on experience building real systems is what separates architects from tutorial-watchers.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;Built from current industry practice, research, and production patterns. Independent reference — not affiliated with any vendor. The AI landscape moves fast; verify current model availability and pricing before making procurement decisions.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>ai-architecture</category><category>llm</category><category>rag</category><category>agents</category></item><item><title>CCAR-F: Claude Certified Architect Foundations — 2026 Blueprint</title><link>https://riddam.github.io/guides/cca-f-study-guide/</link><guid isPermaLink="true">https://riddam.github.io/guides/cca-f-study-guide/</guid><description>An exam-day reference for the CCAR-F certification covering all five domains, the six exam scenarios, anti-patterns, trade-offs, and scenario triggers.</description><pubDate>Sat, 04 Jul 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;Everything I&apos;d want a teammate to walk into the Claude Certified Architect exam knowing — the five domains, the scenarios that trip people up, and the reasoning behind each answer.&lt;/em&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Questions&lt;/th&gt;
&lt;th&gt;Duration&lt;/th&gt;
&lt;th&gt;Fee&lt;/th&gt;
&lt;th&gt;Pass mark&lt;/th&gt;
&lt;th&gt;Scenarios&lt;/th&gt;
&lt;th&gt;Proctored&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;60&lt;/td&gt;
&lt;td&gt;120 min&lt;/td&gt;
&lt;td&gt;$125 USD&lt;/td&gt;
&lt;td&gt;720 / 1000&lt;/td&gt;
&lt;td&gt;4 of 6&lt;/td&gt;
&lt;td&gt;Yes, closed-book&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Exam Format &amp;amp; Domains&lt;/h2&gt;
&lt;p&gt;Launched March 12, 2026, &lt;strong&gt;Claude Certified Architect — Foundations (CCAR-F)&lt;/strong&gt; was Anthropic&apos;s first proctored technical certification. (Early coverage widely wrote it &lt;em&gt;CCA-F&lt;/em&gt;; &lt;strong&gt;CCAR-F&lt;/strong&gt; is the official code, and it now sits alongside an Associate, a Developer, and a Professional-tier Architect exam.) It validates that you can &lt;strong&gt;design and ship production-grade Claude applications at enterprise scale&lt;/strong&gt;. Every question is scenario-based — a realistic production system with a problem, and you pick the architecturally correct fix among plausible alternatives. No simple recall questions.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Before you plan around this:&lt;/strong&gt; the certification is offered through the &lt;strong&gt;Claude Partner Network&lt;/strong&gt; — registration runs via the Anthropic &lt;strong&gt;Partner Academy&lt;/strong&gt;, which validates partner credentials at login. Confirm your organization&apos;s eligibility before budgeting exam time.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Five domains &amp;amp; weighting&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Domain&lt;/th&gt;
&lt;th&gt;Weight&lt;/th&gt;
&lt;th&gt;Core concepts&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;1.&lt;/strong&gt; Agentic Architecture &amp;amp; Orchestration&lt;/td&gt;
&lt;td&gt;27%&lt;/td&gt;
&lt;td&gt;Agentic loop, stop_reason, hub-and-spoke, subagents, hooks, task decomposition, session state&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;2.&lt;/strong&gt; Tool Design &amp;amp; MCP Integration&lt;/td&gt;
&lt;td&gt;18%&lt;/td&gt;
&lt;td&gt;MCP servers (resources/tools/prompts), JSON Schema, stdio vs SSE, tool descriptions, tool_choice&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;3.&lt;/strong&gt; Claude Code Configuration &amp;amp; Workflows&lt;/td&gt;
&lt;td&gt;20%&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://CLAUDE.md&quot;&gt;CLAUDE.md&lt;/a&gt; hierarchy, skills, slash commands, plan mode, path-specific rules, CI/CD (-p flag)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;4.&lt;/strong&gt; Prompt Engineering &amp;amp; Structured Output&lt;/td&gt;
&lt;td&gt;20%&lt;/td&gt;
&lt;td&gt;PRECISE (community mnemonic), few-shot, XML tags, JSON schemas, tool_use for extraction, validation-retry, Batch API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;5.&lt;/strong&gt; Context Management &amp;amp; Reliability&lt;/td&gt;
&lt;td&gt;15%&lt;/td&gt;
&lt;td&gt;Context window, prompt caching, token budgets, CALM (informal study aid), escalation, error propagation, human-in-the-loop&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Scoring:&lt;/strong&gt; Scaled 100–1000, pass at &lt;strong&gt;720&lt;/strong&gt;. Domain-weighted — you can&apos;t pass by acing one domain and ignoring others. 4 of 6 published scenarios are randomly selected per exam; each provides the context for ~15 questions.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;The 6 Exam Scenarios&lt;/h2&gt;
&lt;p&gt;You get &lt;strong&gt;4 of these 6&lt;/strong&gt; on exam day — randomly selected. Study all six so you&apos;re not caught off guard. Each is a realistic production system that spans multiple domains.&lt;/p&gt;
&lt;h3&gt;Scenario 1 — Customer Support Resolution Agent&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What it tests:&lt;/strong&gt; Agent SDK + MCP tools + escalation triggers + error propagation&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Key decisions:&lt;/strong&gt; When to escalate to a human, how to structure the agentic loop, how to handle policy gaps and ambiguity&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Scenario 2 — Code Generation with Claude Code&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What it tests:&lt;/strong&gt; &lt;a href=&quot;http://CLAUDE.md&quot;&gt;CLAUDE.md&lt;/a&gt; config + plan mode + slash commands + built-in tools&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Key decisions:&lt;/strong&gt; Autonomous PR review/generation, skills with context: fork, how to structure project instructions&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Scenario 3 — Multi-Agent Research System&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What it tests:&lt;/strong&gt; Coordinator-subagent orchestration + context isolation + structured passing&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Key decisions:&lt;/strong&gt; Hub-and-spoke vs pipeline, parallel vs sequential, preventing context pollution&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Scenario 4 — Developer Productivity with Claude&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What it tests:&lt;/strong&gt; Built-in tools + MCP servers + tool descriptions + tool distribution&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Key decisions:&lt;/strong&gt; When to use existing MCP servers vs build custom, IDE integration patterns&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Scenario 5 — Claude Code for CI/CD&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What it tests:&lt;/strong&gt; Non-interactive mode (&lt;code&gt;-p&lt;/code&gt; flag) + structured output + independent review&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Key decisions:&lt;/strong&gt; Headless pipeline design, &lt;code&gt;--output-format json&lt;/code&gt;, when to use &lt;code&gt;--json-schema&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Scenario 6 — Structured Data Extraction&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What it tests:&lt;/strong&gt; JSON schemas + tool_use for extraction + validation-retry loops + batch processing&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Key decisions:&lt;/strong&gt; Nullable fields to reduce hallucination, single-pass vs multi-pass, Message Batches API&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;§1 — Agentic Architecture &amp;amp; Orchestration (27%)&lt;/h2&gt;
&lt;p&gt;The heaviest domain and the one most candidates find hardest. It covers the full lifecycle of the &lt;strong&gt;agentic loop&lt;/strong&gt;, multi-agent coordination, hooks, task decomposition, and session management. What follows is scoped to what the exam asks; for the same patterns treated as design decisions rather than answers, see &lt;a href=&quot;https://riddam.github.io/guides/ai-architecture-master-guide/&quot;&gt;the AI architecture field guide&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;The agentic loop — the single most important concept&lt;/h3&gt;
&lt;p&gt;The agentic loop lifecycle:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;1. Send request (history + tools)
   → 2. Receive response
   → 3. Check stop_reason        ← the key step
   → 4. Execute tools (if tool_use)
   → 5. Append results (to history)
   → Loop back to 1
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;stop_reason === &quot;tool_use&quot;&lt;/code&gt; → Claude wants to call tools → execute them → append results → loop back.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stop_reason === &quot;end_turn&quot;&lt;/code&gt; → Claude is finished → &lt;strong&gt;terminate the loop&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stop_reason === &quot;pause_turn&quot;&lt;/code&gt; → a long &lt;strong&gt;server-side-tool&lt;/strong&gt; turn (web search, code execution) checkpointed instead of finishing → re-send the conversation unchanged to resume. It&apos;s a checkpoint, not a termination — don&apos;t treat it as &quot;done.&quot;&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;stop_reason&lt;/code&gt; field is a &lt;strong&gt;structured API signal&lt;/strong&gt; — the &lt;em&gt;only&lt;/em&gt; reliable termination mechanism.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Anti-patterns (exam favorites):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parsing natural language to detect &quot;done&quot; / &quot;task complete&quot; — non-deterministic, fails silently.&lt;/li&gt;
&lt;li&gt;Arbitrary iteration cap as the &lt;em&gt;primary&lt;/em&gt; stopping mechanism — fragile, not semantically meaningful.&lt;/li&gt;
&lt;li&gt;Checking assistant text content like &lt;code&gt;response.content[0].text.includes(&apos;complete&apos;)&lt;/code&gt; — brittle string matching.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Multi-agent orchestration — hub-and-spoke&lt;/h3&gt;
&lt;p&gt;The hub-and-spoke (coordinator-subagent) pattern:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;            Coordinator (hub)
           /       |        \
  Web search   Doc analysis   Synthesis
   subagent      subagent      subagent
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;coordinator&lt;/strong&gt; manages all inter-subagent communication, error handling, and routing. Subagents never talk to each other directly.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Context isolation:&lt;/strong&gt; each subagent gets only the context it needs — never the coordinator&apos;s full context (prevents context pollution).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Structured passing:&lt;/strong&gt; when handing findings between subagents, pass structured data (JSON with source, date, content), not plain text blobs — preserves attribution.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Minimal footprint:&lt;/strong&gt; subagents should be scoped to a single responsibility and return a focused result.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Anti-pattern:&lt;/strong&gt; Sharing the coordinator&apos;s full conversation history with every subagent. This causes &lt;strong&gt;context pollution&lt;/strong&gt; — subagents get confused by irrelevant context and waste tokens.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Agent SDK hooks&lt;/h3&gt;
&lt;p&gt;Hooks are &lt;strong&gt;programmatic enforcement points&lt;/strong&gt; — Python/TypeScript functions invoked by the Agent SDK at specific loop points. They are &lt;em&gt;not&lt;/em&gt; invoked by Claude (the model never sees them).&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Hook type&lt;/th&gt;
&lt;th&gt;When it fires&lt;/th&gt;
&lt;th&gt;Use for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Pre-tool&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Before a tool is executed&lt;/td&gt;
&lt;td&gt;Validate inputs, check permissions, block dangerous actions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Post-tool&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;After a tool returns&lt;/td&gt;
&lt;td&gt;Log results, sanitize output, enforce PII rules&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Pre-message&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Before Claude&apos;s response is sent to the user&lt;/td&gt;
&lt;td&gt;Content filtering, compliance checks, redaction&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — hooks vs prompt-based guardrails:&lt;/strong&gt; &lt;strong&gt;Hooks&lt;/strong&gt; = programmatic, deterministic, enforced by code, can&apos;t be jailbroken → use for &lt;em&gt;hard constraints&lt;/em&gt; (compliance, PII blocking, permission checks). &lt;strong&gt;Prompt instructions&lt;/strong&gt; = flexible, natural-language guidance, can be circumvented → use for &lt;em&gt;soft guidelines&lt;/em&gt; (tone, style, preference). Default to hooks for anything safety-critical.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Task decomposition &amp;amp; execution patterns&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pattern&lt;/th&gt;
&lt;th&gt;When to use&lt;/th&gt;
&lt;th&gt;Trade-off&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sequential&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Steps depend on prior results; order matters&lt;/td&gt;
&lt;td&gt;Slower but safer; each step informed by the last&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Parallel&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Independent subtasks with no dependencies&lt;/td&gt;
&lt;td&gt;Faster but costs more tokens; harder to debug&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Dynamic planning&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Task scope unclear upfront; agent decides next steps&lt;/td&gt;
&lt;td&gt;Most flexible but needs guardrails to prevent drift&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Session management:&lt;/strong&gt; Know: &lt;code&gt;fork_session&lt;/code&gt; creates an isolated branch (subagent work doesn&apos;t pollute the main conversation). Sessions can be &lt;strong&gt;resumed&lt;/strong&gt; with conversation history. State can be &lt;strong&gt;in-context&lt;/strong&gt; (conversation history) or &lt;strong&gt;external&lt;/strong&gt; (database/file); external is more durable for long-running agents.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;§2 — Tool Design &amp;amp; MCP Integration (18%)&lt;/h2&gt;
&lt;p&gt;Tests your ability to design tool interfaces, write schemas Claude can reliably use, and build/integrate MCP servers.&lt;/p&gt;
&lt;h3&gt;MCP (Model Context Protocol) — three primitives&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Primitive&lt;/th&gt;
&lt;th&gt;What it is&lt;/th&gt;
&lt;th&gt;Analog&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Tools&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Functions Claude can &lt;em&gt;call&lt;/em&gt; — input schema, returns a result&lt;/td&gt;
&lt;td&gt;POST / RPC&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Resources&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Data Claude can &lt;em&gt;read&lt;/em&gt; — files, DB records, URIs&lt;/td&gt;
&lt;td&gt;GET / read-only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Prompts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reusable prompt templates exposed by the server&lt;/td&gt;
&lt;td&gt;Templates&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Tool schema design&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;JSON Schema&lt;/strong&gt; defines tool inputs. Every tool needs &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;description&lt;/code&gt;, and &lt;code&gt;input_schema&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Descriptions&lt;/strong&gt; are how Claude decides which tool to use. They must be precise, use distinct verbs, and have narrow scope. &quot;Two good matches&quot; and &quot;no good match&quot; are both failures of description quality.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Nullable fields&lt;/strong&gt; (e.g. &lt;code&gt;&quot;type&quot;: [&quot;string&quot;, &quot;null&quot;]&lt;/code&gt;) reduce hallucination — Claude can explicitly return null instead of inventing a value.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Anti-patterns:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Vague descriptions (&quot;does stuff with data&quot;) — Claude can&apos;t select the right tool.&lt;/li&gt;
&lt;li&gt;Overlapping tools with similar descriptions — Claude oscillates between them.&lt;/li&gt;
&lt;li&gt;Missing required fields in the JSON Schema — Claude hallucinates the structure.&lt;/li&gt;
&lt;li&gt;Giant monolithic tools that do many things — hard to select, hard to debug.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Transport: stdio vs SSE&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;stdio (standard I/O):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Subprocess on the same machine&lt;/li&gt;
&lt;li&gt;Lower latency, simpler setup&lt;/li&gt;
&lt;li&gt;Best for local development, CLI tools&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;SSE (Server-Sent Events):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;HTTP-based, works across network boundaries&lt;/li&gt;
&lt;li&gt;Supports real-time streaming&lt;/li&gt;
&lt;li&gt;Best for remote/cloud servers, team sharing&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Note:&lt;/strong&gt; the standalone HTTP+SSE transport is &lt;strong&gt;deprecated in favor of Streamable HTTP&lt;/strong&gt;, which is now the recommended remote transport. Treat &quot;SSE&quot; here as shorthand for HTTP-based remote transport.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Scenario trigger:&lt;/strong&gt; &quot;Stream large file contents across a network&quot; → &lt;strong&gt;SSE&lt;/strong&gt;. &quot;Local subprocess, same machine&quot; → &lt;strong&gt;stdio&lt;/strong&gt;. &quot;Share MCP server across a team&quot; → &lt;strong&gt;SSE&lt;/strong&gt; (or Streamable HTTP).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;tool_choice parameter&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;th&gt;Behavior&lt;/th&gt;
&lt;th&gt;Use when&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;auto&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Claude decides whether/which tool to call&lt;/td&gt;
&lt;td&gt;Default; most scenarios&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;any&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Claude must call a tool (any one)&lt;/td&gt;
&lt;td&gt;Force tool use; extraction pipelines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tool&lt;/code&gt; (specific)&lt;/td&gt;
&lt;td&gt;Claude must call this exact tool&lt;/td&gt;
&lt;td&gt;Deterministic extraction; structured output&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;none&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Claude cannot use any tools&lt;/td&gt;
&lt;td&gt;Force text-only response&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Structured error responses&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Transient errors&lt;/strong&gt; (network timeout, rate limit) → retry with backoff.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Business errors&lt;/strong&gt; (record not found, invalid input) → return structured error to Claude so it can reason about next steps.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Permission errors&lt;/strong&gt; → escalate or inform the user; don&apos;t retry silently.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;§3 — Claude Code Configuration &amp;amp; Workflows (20%)&lt;/h2&gt;
&lt;p&gt;Tests your ability to configure &lt;strong&gt;Claude Code&lt;/strong&gt; (Anthropic&apos;s agentic CLI/IDE tool) for production projects and team workflows.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;http://CLAUDE.md&quot;&gt;CLAUDE.md&lt;/a&gt; hierarchy &amp;amp; scoping&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Level&lt;/th&gt;
&lt;th&gt;Location&lt;/th&gt;
&lt;th&gt;Scope&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Enterprise&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Set by admin (operator)&lt;/td&gt;
&lt;td&gt;All users in the org — hard constraints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;User / global&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;~/.claude/CLAUDE.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Personal preferences across all projects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Project&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;./CLAUDE.md&lt;/code&gt; (repo root)&lt;/td&gt;
&lt;td&gt;Shared team conventions, committed to VCS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Path-specific rules&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.claude/rules/*.md&lt;/code&gt; with YAML frontmatter&lt;/td&gt;
&lt;td&gt;Activated only when editing matching file paths&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;Higher levels override lower: Enterprise &amp;gt; User &amp;gt; Project.&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;operator&lt;/strong&gt; (enterprise admin) can set constraints that &lt;strong&gt;users cannot override&lt;/strong&gt; — this is the trust hierarchy.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.claude/rules/&lt;/code&gt; with path-scoped YAML frontmatter is the &lt;strong&gt;recommended&lt;/strong&gt; approach over a monolithic &lt;a href=&quot;http://CLAUDE.md&quot;&gt;CLAUDE.md&lt;/a&gt; — reduces irrelevant context.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Skills, commands &amp;amp; built-in tools&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Concept&lt;/th&gt;
&lt;th&gt;What it is&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Custom slash commands&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Defined in &lt;code&gt;.claude/commands/&lt;/code&gt;; reusable workflows invoked by &lt;code&gt;/command-name&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Skills (SKILL.md)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Project- or user-scoped instructions for specific tasks (e.g. &quot;how to create a docx&quot;); &lt;code&gt;context: fork&lt;/code&gt; in frontmatter runs the skill in an isolated sub-agent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Built-in tools&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Read, Write, Edit, Bash, Search, List — Claude Code&apos;s native file/code tools&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;MCP servers in Claude Code&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Configured in &lt;code&gt;.claude/mcp.json&lt;/code&gt; (project) or &lt;code&gt;~/.claude/mcp.json&lt;/code&gt; (user)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Scenario trigger:&lt;/strong&gt; &lt;code&gt;context: fork&lt;/code&gt; = the skill runs as an isolated sub-agent, preventing verbose output from polluting the main session. Use it for tasks that generate large output (code generation, data processing).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Execution modes&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;How it works&lt;/th&gt;
&lt;th&gt;Use when&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Plan mode&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Claude plans the approach before executing; shows the plan for review&lt;/td&gt;
&lt;td&gt;Complex tasks; want to review before committing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Direct execution&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Claude executes immediately&lt;/td&gt;
&lt;td&gt;Simple / well-understood tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Non-interactive (-p flag)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Headless mode, no user prompts; outputs to stdout&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;CI/CD pipelines&lt;/strong&gt;; add &lt;code&gt;--output-format json&lt;/code&gt; for structured output&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;CI/CD (scenario 5):&lt;/strong&gt; For CI/CD: use &lt;code&gt;claude -p &quot;review this PR&quot; --output-format json --json-schema schema.json&lt;/code&gt;. This gives deterministic, machine-parseable output. Remember: &lt;code&gt;-p&lt;/code&gt; = non-interactive / print mode.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;§4 — Prompt Engineering &amp;amp; Structured Output (20%)&lt;/h2&gt;
&lt;h3&gt;The PRECISE mnemonic&lt;/h3&gt;
&lt;p&gt;A community mnemonic — not official Anthropic terminology — for a structured approach to designing system prompts. Know the acronym and what each component does:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Letter&lt;/th&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;P&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Persona&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Who Claude is (&quot;You are a senior code reviewer&quot;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;R&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Role&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The function it performs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Explicit instructions&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Clear, direct guidance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Context&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Background information&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;I&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Instructions&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Step-by-step task rules&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;S&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Steps&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Ordered process to follow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Examples&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Few-shot demonstrations of ideal output&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Key insight:&lt;/strong&gt; The &lt;strong&gt;Examples&lt;/strong&gt; component is the behavioral anchor — it shows Claude what a correct response looks like in terms of length, tone, and structure. Without examples, Claude interpolates from pre-training, producing variance. This is often the fastest fix for inconsistent output.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Core techniques&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Few-shot prompting:&lt;/strong&gt; 2–3 input/output examples to anchor behavior. Place them after the instructions, before the actual task.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;XML tags&lt;/strong&gt; for context structure: &lt;code&gt;&amp;lt;document&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;instructions&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;example&amp;gt;&lt;/code&gt; — Claude respects these boundaries for parsing and retrieval.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Chain-of-thought / extended thinking:&lt;/strong&gt; for complex reasoning, let Claude think step-by-step before producing the final answer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prefilled assistant responses:&lt;/strong&gt; start the assistant turn with a partial response to steer format/structure. &lt;em&gt;Note: most current frontier Claude models (Opus 4.6+, Sonnet 4.6+, Fable 5) reject a prefilled assistant turn — prefer schema-constrained structured outputs there.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Structured output via tool_use&lt;/h3&gt;
&lt;p&gt;The exam&apos;s preferred pattern for extracting structured data: define a tool whose &lt;code&gt;input_schema&lt;/code&gt; matches your desired JSON structure, then set &lt;code&gt;tool_choice&lt;/code&gt; to force Claude to call it. This gives you validated, schema-conforming output.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — tool_use extraction vs raw JSON prompting:&lt;/strong&gt; &lt;strong&gt;tool_use with JSON Schema&lt;/strong&gt; = schema-validated, deterministic structure, nullable fields reduce hallucination → preferred for production. &lt;strong&gt;Prompting for JSON&lt;/strong&gt; = simpler to set up, but output can drift from schema, requires post-processing validation → acceptable for prototyping only.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Validation-retry loops&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;After extraction, validate the output programmatically against the schema.&lt;/li&gt;
&lt;li&gt;If validation fails, send the error back to Claude with the original input and ask it to fix the specific issue.&lt;/li&gt;
&lt;li&gt;Cap retries (2–3) to avoid infinite loops on truly malformed input.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Batch processing — Message Batches API&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;For high-volume extraction (hundreds/thousands of documents), use the &lt;strong&gt;Message Batches API&lt;/strong&gt; — asynchronous, 50% cheaper than real-time, 24-hour processing window.&lt;/li&gt;
&lt;li&gt;Trade-off: latency (not real-time) for cost savings — ideal for overnight/batch ETL.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Per-item error isolation:&lt;/strong&gt; if one item in a batch fails, the rest still succeed. Design for this.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;§5 — Context Management &amp;amp; Reliability (15%)&lt;/h2&gt;
&lt;p&gt;The lightest domain by weight but consistently underestimated. These questions are often the &lt;strong&gt;easiest marks available&lt;/strong&gt; once you know the patterns — and the easiest to lose if you don&apos;t.&lt;/p&gt;
&lt;h3&gt;Context window fundamentals&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Context window = input tokens + output tokens.&lt;/strong&gt; Know the model limits: Opus (4.6/4.7/4.8), Sonnet (4.6/5), and Fable 5 = 1M-token context; only Haiku 4.5 = 200K.&lt;/li&gt;
&lt;li&gt;System prompt + conversation history + tool definitions + tool results all consume input tokens. They add up fast in agentic loops.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Progressive summarization:&lt;/strong&gt; as conversation grows, periodically summarize older turns and replace the raw history → keeps context under budget without losing critical information.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Conversation compaction:&lt;/strong&gt; similar idea, applied at the system level — compress older context to make room for new.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Prompt caching&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;cache_control&lt;/code&gt; breakpoints on large, static content blocks (system prompts, reference docs, tool definitions) that don&apos;t change between turns.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cached reads are 90% cheaper&lt;/strong&gt; than uncached — massive savings in multi-turn agentic loops where the system prompt is repeated every turn.&lt;/li&gt;
&lt;li&gt;Cache has a &lt;strong&gt;5-minute TTL by default&lt;/strong&gt;, with a &lt;strong&gt;1-hour TTL option&lt;/strong&gt; also available — if the next request comes within the TTL window, you get the cached price.&lt;/li&gt;
&lt;li&gt;Trade-off: write cost to populate cache is 25% more than a normal read, so caching only pays off if you&apos;re making multiple requests against the same prefix.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — when caching pays off:&lt;/strong&gt; Cache if: multi-turn conversation, repeated system prompt, agentic loop (many iterations). Don&apos;t cache if: one-shot request with unique content. The break-even is roughly &lt;strong&gt;2+ requests&lt;/strong&gt; with the same cached prefix within 5 minutes.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;The CALM mnemonic&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Context-Aware LLM Management&lt;/strong&gt; — an informal study aid, not an official Anthropic concept — for managing what goes into the context window:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Curate:&lt;/strong&gt; only include information Claude actually needs for this turn.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Arrange:&lt;/strong&gt; put the most important information at the start and end of context (primacy/recency bias).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Limit:&lt;/strong&gt; enforce token budgets; summarize or truncate when approaching limits.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor:&lt;/strong&gt; track token usage, cache hit rates, and quality over time.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Error handling &amp;amp; escalation&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Error type&lt;/th&gt;
&lt;th&gt;Pattern&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Tool failure (transient)&lt;/td&gt;
&lt;td&gt;Retry with exponential backoff; return structured error to Claude if retries exhausted&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reasoning failure&lt;/td&gt;
&lt;td&gt;Self-evaluation / confidence scoring; if confidence below threshold → escalate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Environment failure&lt;/td&gt;
&lt;td&gt;Graceful degradation; fall back to cached/stale data or inform user&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Policy gap / ambiguity&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Human-in-the-loop&lt;/strong&gt; escalation — don&apos;t guess, ask&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Anti-pattern:&lt;/strong&gt; Using &lt;strong&gt;self-reported confidence scores&lt;/strong&gt; as the sole escalation signal. Claude&apos;s self-assessed confidence is unreliable — it may be confidently wrong. Combine with programmatic validation (schema checks, business-rule assertions) for robust escalation.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Model Selection &amp;amp; API Essentials&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Strength&lt;/th&gt;
&lt;th&gt;Use when&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Opus (largest)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Highest reasoning, complex tasks, nuanced judgment&lt;/td&gt;
&lt;td&gt;Hard reasoning, complex orchestration, low-volume high-stakes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Sonnet (mid)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Best balance of capability and cost; fast&lt;/td&gt;
&lt;td&gt;Default for most production workloads, agentic loops, coding&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Haiku (smallest)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Fastest, cheapest, good for simple tasks&lt;/td&gt;
&lt;td&gt;Classification, routing, simple extraction, high-volume low-complexity&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — model selection:&lt;/strong&gt; Bigger = better reasoning but slower and costlier. &lt;strong&gt;Right-size to the task:&lt;/strong&gt; use Haiku for routing/classification, Sonnet for the main workload, Opus for the hardest reasoning steps. In multi-agent systems, subagents can use smaller models than the coordinator.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;API concepts the exam assumes&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Messages API:&lt;/strong&gt; the core endpoint. Send a list of messages (system, user, assistant), receive a response with &lt;code&gt;content&lt;/code&gt; blocks and &lt;code&gt;stop_reason&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Streaming:&lt;/strong&gt; &lt;code&gt;stream: true&lt;/code&gt; for real-time token delivery. Use for user-facing responses.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Extended thinking:&lt;/strong&gt; &lt;code&gt;thinking&lt;/code&gt; blocks that let Claude reason before responding. On current models this is &lt;strong&gt;adaptive&lt;/strong&gt; (&lt;code&gt;thinking: {type: &quot;adaptive&quot;}&lt;/code&gt; plus an &lt;code&gt;effort&lt;/code&gt; level) rather than a fixed token budget. Useful for complex tasks; costs extra tokens.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;System / Operator / User hierarchy:&lt;/strong&gt; operator instructions (set by the app developer) can restrict what user prompts can override. Users can&apos;t elevate their own permissions beyond what the operator allows.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Anti-Pattern Master List&lt;/h2&gt;
&lt;p&gt;The exam &lt;em&gt;loves&lt;/em&gt; presenting anti-patterns as plausible answer choices. Memorize these — they&apos;re the wrong answers that look right.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Anti-pattern&lt;/th&gt;
&lt;th&gt;Why it&apos;s wrong&lt;/th&gt;
&lt;th&gt;Correct approach&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Parse NL to detect loop end&lt;/td&gt;
&lt;td&gt;Non-deterministic; Claude may paraphrase&lt;/td&gt;
&lt;td&gt;Check &lt;code&gt;stop_reason === &quot;end_turn&quot;&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Arbitrary iteration cap as primary stop&lt;/td&gt;
&lt;td&gt;Not semantically meaningful&lt;/td&gt;
&lt;td&gt;Use &lt;code&gt;stop_reason&lt;/code&gt;; iteration cap as safety net only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Share full coordinator context with subagents&lt;/td&gt;
&lt;td&gt;Context pollution; wasted tokens&lt;/td&gt;
&lt;td&gt;Pass only relevant, structured context&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vague / overlapping tool descriptions&lt;/td&gt;
&lt;td&gt;Claude misroutes tool calls&lt;/td&gt;
&lt;td&gt;Distinct verbs, narrow scope, precise descriptions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Self-reported confidence as sole escalation trigger&lt;/td&gt;
&lt;td&gt;Claude can be confidently wrong&lt;/td&gt;
&lt;td&gt;Combine with programmatic validation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prompt-only guardrails for hard safety constraints&lt;/td&gt;
&lt;td&gt;Can be jailbroken / circumvented&lt;/td&gt;
&lt;td&gt;Use hooks for hard constraints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Monolithic &lt;a href=&quot;http://CLAUDE.md&quot;&gt;CLAUDE.md&lt;/a&gt; with all rules&lt;/td&gt;
&lt;td&gt;Irrelevant context for most edits&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.claude/rules/&lt;/code&gt; with path-specific scoping&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JSON via prompting alone in production&lt;/td&gt;
&lt;td&gt;Output drifts from schema&lt;/td&gt;
&lt;td&gt;&lt;code&gt;tool_use&lt;/code&gt; with JSON Schema for structured extraction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Retry on all errors equally&lt;/td&gt;
&lt;td&gt;Wastes tokens on permanent failures&lt;/td&gt;
&lt;td&gt;Classify errors: transient → retry; business → return; permission → escalate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No token budget monitoring&lt;/td&gt;
&lt;td&gt;Silent degradation as context grows&lt;/td&gt;
&lt;td&gt;Track usage; progressive summarization; prompt caching&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Trade-off Master List&lt;/h2&gt;
&lt;p&gt;Decisions the exam tests repeatedly. Know the trigger phrase → right answer.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Decision&lt;/th&gt;
&lt;th&gt;Option A&lt;/th&gt;
&lt;th&gt;Option B&lt;/th&gt;
&lt;th&gt;Pick A when&lt;/th&gt;
&lt;th&gt;Pick B when&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Loop termination&lt;/td&gt;
&lt;td&gt;&lt;code&gt;stop_reason&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Iteration cap&lt;/td&gt;
&lt;td&gt;Always primary&lt;/td&gt;
&lt;td&gt;Safety net only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Guardrails&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Hooks (code)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Prompt instructions&lt;/td&gt;
&lt;td&gt;Hard safety constraints&lt;/td&gt;
&lt;td&gt;Soft style/tone guidance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Execution&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Sequential&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Parallel&lt;/td&gt;
&lt;td&gt;Steps depend on prior results&lt;/td&gt;
&lt;td&gt;Independent subtasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Transport&lt;/td&gt;
&lt;td&gt;&lt;code&gt;stdio&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;SSE&lt;/td&gt;
&lt;td&gt;Local, same machine&lt;/td&gt;
&lt;td&gt;Remote, team sharing, streaming&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Structured output&lt;/td&gt;
&lt;td&gt;&lt;code&gt;tool_use + schema&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Prompt for JSON&lt;/td&gt;
&lt;td&gt;Production extraction&lt;/td&gt;
&lt;td&gt;Quick prototyping only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model size&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Haiku&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Opus&lt;/td&gt;
&lt;td&gt;Simple / routing / high-volume&lt;/td&gt;
&lt;td&gt;Complex reasoning / high-stakes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Caching&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Cache (90% cheaper reads)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No cache&lt;/td&gt;
&lt;td&gt;Multi-turn / agentic loop&lt;/td&gt;
&lt;td&gt;One-shot unique requests&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Batch vs real-time&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Batches API (50% off)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Real-time Messages&lt;/td&gt;
&lt;td&gt;Bulk ETL, overnight jobs&lt;/td&gt;
&lt;td&gt;User-facing, low-latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Context strategy&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Progressive summarization&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Full history&lt;/td&gt;
&lt;td&gt;Long conversations / budgets&lt;/td&gt;
&lt;td&gt;Short conversations / precision&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;http://CLAUDE.md&quot;&gt;CLAUDE.md&lt;/a&gt; structure&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Path-scoped rules&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Monolithic file&lt;/td&gt;
&lt;td&gt;Large repos, mixed stacks&lt;/td&gt;
&lt;td&gt;Tiny projects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Execution mode&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Plan mode&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Direct execution&lt;/td&gt;
&lt;td&gt;Complex / high-risk changes&lt;/td&gt;
&lt;td&gt;Simple / well-understood tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Skill isolation&lt;/td&gt;
&lt;td&gt;&lt;code&gt;context: fork&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Inline execution&lt;/td&gt;
&lt;td&gt;Verbose output / risk of pollution&lt;/td&gt;
&lt;td&gt;Simple, brief tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Exam-Day Tips&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Study all 6 scenarios&lt;/strong&gt; — you get 4 randomly. Map each to its primary domains: Customer Support → agentic loop + escalation; Code Gen → Claude Code config; Multi-Agent → hub-and-spoke + context isolation; CI/CD → &lt;code&gt;-p&lt;/code&gt; flag + structured output; Data Extraction → tool_use + validation-retry.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;stop_reason is the answer&lt;/strong&gt; for any loop-termination question. If an option says &quot;parse the text for &apos;done&apos;&quot; — eliminate it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Two answer choices will &quot;work&quot;&lt;/strong&gt; — pick the architecturally superior one. The exam rewards the production-grade, scalable, safe choice over the quick hack.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hooks for hard constraints, prompts for soft guidance.&lt;/strong&gt; This distinction appears across multiple scenarios.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Context isolation is a theme.&lt;/strong&gt; Any time a subagent gets &quot;too much&quot; context, or a coordinator shares everything, it&apos;s the wrong answer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Structured &amp;gt; unstructured.&lt;/strong&gt; Passing structured JSON between agents beats plain text. tool_use extraction beats prompting for JSON. Schema-validated output beats unvalidated.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Right-size the model.&lt;/strong&gt; Using Opus for classification or Haiku for complex reasoning are both wrong in scenario questions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prompt caching math:&lt;/strong&gt; 90% cheaper reads, 25% more expensive writes, 5-min default TTL (1-hour option available), break-even at ~2 requests. Know this for cost-optimization questions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2 min/question average.&lt;/strong&gt; Don&apos;t overthink — recognize the pattern (it maps to one of the anti-patterns or trade-offs above), pick the answer, and move on. Flag and return if unsure.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Preparation resources (free):&lt;/strong&gt; &lt;strong&gt;Anthropic Academy&lt;/strong&gt; (&lt;a href=&quot;http://anthropic.skilljar.com&quot;&gt;anthropic.skilljar.com&lt;/a&gt;): 13+ free courses covering all domains. Key courses: &lt;em&gt;Building Applications with the Claude API&lt;/em&gt; (8+ hrs), &lt;em&gt;Claude Code in Action&lt;/em&gt;, &lt;em&gt;Introduction to MCP&lt;/em&gt;, &lt;em&gt;AI Fluency Framework&lt;/em&gt;. Also: the official &lt;strong&gt;Exam Guide PDF&lt;/strong&gt; (12 sample questions with explanations) and the official &lt;strong&gt;60-question practice exam&lt;/strong&gt; on Skilljar. Score 850+ on the practice before booking the real exam. Note the three-way split as of mid-2026: the public Academy hosts the &lt;strong&gt;free training courses&lt;/strong&gt;, registration goes through the &lt;strong&gt;Partner Academy&lt;/strong&gt; (&lt;a href=&quot;http://anthropic-partners.skilljar.com&quot;&gt;anthropic-partners.skilljar.com&lt;/a&gt;, partner login required), and the exam itself is &lt;strong&gt;scheduled and proctored via Pearson VUE (OnVUE)&lt;/strong&gt;. Retakes are capped at 4 attempts per rolling 12 months, with waiting periods that lengthen after each failure (14 days, then 30, then 90).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;Claude Certified Architect — Foundations (CCAR-F), 2026 Blueprint. Built from the official exam guide, Anthropic Academy materials, and community sources. Independent study aid — not affiliated with or endorsed by Anthropic. Exam format, fees, and scheduling change; verify current details on Pearson VUE&apos;s Anthropic certification page before booking.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>claude</category><category>certification</category><category>study-guide</category><category>ai-architecture</category></item><item><title>GCP Professional Cloud Architect — 2026 Blueprint</title><link>https://riddam.github.io/guides/gcp-pca-study-guide/</link><guid isPermaLink="true">https://riddam.github.io/guides/gcp-pca-study-guide/</guid><description>A last-minute review guide for the Google Cloud Professional Cloud Architect exam covering the format, all six domains, service trade-offs, scenario triggers, HA/DR, cost optimization, and the new 2026 AI focus.</description><pubDate>Sat, 20 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;The review I&apos;d hand an engineer the week before their GCP Professional Cloud Architect exam: all six domains, the service trade-offs that actually decide questions, and the reasoning I want them to carry in.&lt;/em&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Questions&lt;/th&gt;
&lt;th&gt;Duration&lt;/th&gt;
&lt;th&gt;Fee&lt;/th&gt;
&lt;th&gt;Validity&lt;/th&gt;
&lt;th&gt;Case studies&lt;/th&gt;
&lt;th&gt;Pass mark&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;50–60&lt;/td&gt;
&lt;td&gt;2 hours&lt;/td&gt;
&lt;td&gt;$200 USD&lt;/td&gt;
&lt;td&gt;2 years&lt;/td&gt;
&lt;td&gt;2 of 4 · 20–30%&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;⚠ 2026 naming change:&lt;/strong&gt; the exam is transitioning from &lt;strong&gt;Vertex AI&lt;/strong&gt; to &lt;strong&gt;Gemini Enterprise Agent Platform&lt;/strong&gt;. Both names may appear on questions. Renamed services are flagged here with the old name in brackets, e.g. &lt;em&gt;GKE Enterprise (Anthos)&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;00 — Exam Format &amp;amp; Domains&lt;/h2&gt;
&lt;p&gt;The PCA is Google Cloud&apos;s flagship architect credential. It rewards &lt;strong&gt;architectural judgment and case-study reasoning, not memorization&lt;/strong&gt;. Roughly 20–30% of questions attach to a case study; the rest are standalone scenarios where you pick the &lt;em&gt;best&lt;/em&gt; answer among several that all &quot;work&quot;. The &lt;strong&gt;Well-Architected Framework&lt;/strong&gt; is woven through every domain — treat its six pillars as your default tie-breaker.&lt;/p&gt;
&lt;h3&gt;Standard vs Renewal exam&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Attribute&lt;/th&gt;
&lt;th&gt;Standard exam&lt;/th&gt;
&lt;th&gt;Renewal exam&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Length&lt;/td&gt;
&lt;td&gt;2 hours&lt;/td&gt;
&lt;td&gt;1 hour&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fee&lt;/td&gt;
&lt;td&gt;$200&lt;/td&gt;
&lt;td&gt;$100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Questions&lt;/td&gt;
&lt;td&gt;50–60 MC &amp;amp; multi-select&lt;/td&gt;
&lt;td&gt;25 MC &amp;amp; multi-select&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Case studies&lt;/td&gt;
&lt;td&gt;2 (from a pool of 4), 20–30%&lt;/td&gt;
&lt;td&gt;2 available, gen-AI focused, 90–100%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Who&lt;/td&gt;
&lt;td&gt;First-timers / expired certs&lt;/td&gt;
&lt;td&gt;Active cert, within renewal window&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Languages&lt;/td&gt;
&lt;td&gt;English, Japanese&lt;/td&gt;
&lt;td&gt;English, Japanese&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Six domains &amp;amp; weighting (2026 guide)&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;⚠ Weightings are unofficial estimates — Google does not publish per-domain weightings for this exam.&lt;/strong&gt; The percentages below are community/author estimates to help you prioritize study time; treat all six domains as testable and don&apos;t rely on these numbers.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Domain&lt;/th&gt;
&lt;th&gt;Weight (est.*)&lt;/th&gt;
&lt;th&gt;Watch for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;1.&lt;/strong&gt; Designing &amp;amp; planning a cloud solution architecture&lt;/td&gt;
&lt;td&gt;~25%*&lt;/td&gt;
&lt;td&gt;Business→technical mapping, trade-offs, HA/DR, Gemini Cloud Assist&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;2.&lt;/strong&gt; Managing &amp;amp; provisioning solution infrastructure&lt;/td&gt;
&lt;td&gt;~17.5%*&lt;/td&gt;
&lt;td&gt;Network topology, storage/compute config, Agent Platform ML workflows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;3.&lt;/strong&gt; Designing for security &amp;amp; compliance&lt;/td&gt;
&lt;td&gt;~17.5%*&lt;/td&gt;
&lt;td&gt;IAM hierarchy, KMS, VPC-SC, &lt;strong&gt;Securing AI&lt;/strong&gt; (Model Armor)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;4.&lt;/strong&gt; Analyzing &amp;amp; optimizing processes&lt;/td&gt;
&lt;td&gt;~15%*&lt;/td&gt;
&lt;td&gt;SDLC, CI/CD, cost (CapEx/OpEx), stakeholder mgmt&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;5.&lt;/strong&gt; Managing implementation&lt;/td&gt;
&lt;td&gt;~12.5%*&lt;/td&gt;
&lt;td&gt;Apigee, IaC/Terraform, &lt;code&gt;gcloud&lt;/code&gt;/&lt;code&gt;gsutil&lt;/code&gt;/&lt;code&gt;bq&lt;/code&gt;, emulators&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;6.&lt;/strong&gt; Ensuring solution and operations reliability&lt;/td&gt;
&lt;td&gt;~12.5%*&lt;/td&gt;
&lt;td&gt;Cloud Observability, SLO/alerting, chaos/load testing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;* Estimated — Google doesn&apos;t publish official per-domain weightings.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Read this first:&lt;/strong&gt; The case studies are &lt;strong&gt;published in advance&lt;/strong&gt;. Read all four cold before exam day — know each company&apos;s existing tech, business goals, constraints and compliance needs so you don&apos;t burn time reading during the exam.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;01 — The Four Case Studies (2026 pool)&lt;/h2&gt;
&lt;p&gt;The old pool (Mountkirk Games, TerramEarth, Helicopter Racing League) is &lt;strong&gt;retired&lt;/strong&gt;. Several current cases explicitly use Google&apos;s &lt;strong&gt;generative-AI solutions&lt;/strong&gt;. Learn each as &lt;em&gt;challenge → key services → themes&lt;/em&gt;.&lt;/p&gt;
&lt;h3&gt;Altostrat Media (Media)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Core challenge:&lt;/strong&gt; Global streaming/media platform; personalization &amp;amp; gen-AI content features, cost-efficient transcoding, global low-latency delivery.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Key services:&lt;/strong&gt; Global External App LB · Cloud CDN/Media CDN · Transcoder API · Agent Platform (Vertex AI) · BigQuery&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Themes:&lt;/strong&gt; Global delivery, personalization, cost at scale, gen-AI features.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Cymbal Retail (Retail)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Core challenge:&lt;/strong&gt; Omnichannel retailer; demand forecasting, recommendations/search, seasonal traffic spikes, unifying operational + analytical data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Key services:&lt;/strong&gt; GKE / Cloud Run · Spanner or Cloud SQL · BigQuery · Agent Builder (search/recs) · Pub/Sub&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Themes:&lt;/strong&gt; Elastic scale, recommendations, HTAP data, gen-AI search.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;EHR Healthcare (Healthcare)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Core challenge:&lt;/strong&gt; Multi-hospital EHR SaaS migrating off legacy on-prem; &lt;strong&gt;HIPAA&lt;/strong&gt;, multi-region HA, hybrid connectivity, strict governance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Key services:&lt;/strong&gt; Cloud Healthcare API · Cloud SQL (HA) · Shared VPC · Cloud Armor · Cloud KMS (CMEK) · VPC-SC · Assured Workloads&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Themes:&lt;/strong&gt; Compliance, security, hybrid migration, minimal downtime.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;KnightMotives Automotive (Automotive / IoT)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Core challenge:&lt;/strong&gt; Connected-vehicle telemetry at massive scale; time-series ingest, predictive-maintenance ML, modern data platform.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Key services:&lt;/strong&gt; Pub/Sub · Dataflow · Bigtable · BigQuery · Agent Platform (Vertex AI) predictive models&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Themes:&lt;/strong&gt; IoT pipeline, batch vs streaming, ML integration, data lifecycle.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Pattern to internalize:&lt;/strong&gt; Healthcare → compliance + Assured Workloads/CMEK. IoT telemetry → Pub/Sub → Dataflow → Bigtable/BigQuery. Retail/media personalization → Agent Platform (Vertex AI) + BigQuery.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;02 — Service Renames — Old → New&lt;/h2&gt;
&lt;p&gt;Questions may use either name. These are the renames and deprecations most likely to trip you up in 2026.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Current name&lt;/th&gt;
&lt;th&gt;Old / former name&lt;/th&gt;
&lt;th&gt;Note&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Gemini Enterprise Agent Platform&lt;/td&gt;
&lt;td&gt;Vertex AI&lt;/td&gt;
&lt;td&gt;The headline change — unified ML + gen-AI + agent platform&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GKE Enterprise&lt;/td&gt;
&lt;td&gt;Anthos&lt;/td&gt;
&lt;td&gt;Fleet mgmt, multicluster/multicloud, Config Mgmt, Service Mesh&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Run functions&lt;/td&gt;
&lt;td&gt;Cloud Functions&lt;/td&gt;
&lt;td&gt;FaaS folded under the Cloud Run brand&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Service Mesh&lt;/td&gt;
&lt;td&gt;Traffic Director / Anthos Service Mesh&lt;/td&gt;
&lt;td&gt;Managed Istio/Envoy mesh&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Cloud Observability&lt;/td&gt;
&lt;td&gt;Stackdriver&lt;/td&gt;
&lt;td&gt;= Cloud Monitoring + Logging + Trace + Profiler&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sensitive Data Protection&lt;/td&gt;
&lt;td&gt;Data Loss Prevention (DLP)&lt;/td&gt;
&lt;td&gt;Discover/classify/de-identify PII&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Artifact Registry&lt;/td&gt;
&lt;td&gt;Container Registry (GCR)&lt;/td&gt;
&lt;td&gt;GCR deprecated — use Artifact Registry&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Infrastructure Manager&lt;/td&gt;
&lt;td&gt;Deployment Manager&lt;/td&gt;
&lt;td&gt;Terraform-based; Deployment Manager is being retired&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chrome Enterprise Premium&lt;/td&gt;
&lt;td&gt;BeyondCorp Enterprise&lt;/td&gt;
&lt;td&gt;Zero-trust context-aware access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Security Operations (SecOps)&lt;/td&gt;
&lt;td&gt;Chronicle&lt;/td&gt;
&lt;td&gt;SIEM/SOAR under Google SecOps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spot VMs&lt;/td&gt;
&lt;td&gt;Preemptible VMs&lt;/td&gt;
&lt;td&gt;Spot = successor, no 24h cap; preemptible is legacy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Migrate to Virtual Machines&lt;/td&gt;
&lt;td&gt;Migrate for Compute Engine&lt;/td&gt;
&lt;td&gt;VM lift-and-shift&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Migrate to Containers&lt;/td&gt;
&lt;td&gt;Migrate for Anthos&lt;/td&gt;
&lt;td&gt;VM → container modernization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Managed Service for Apache Spark&lt;/td&gt;
&lt;td&gt;(new, complements Dataproc)&lt;/td&gt;
&lt;td&gt;Serverless Spark option&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hyperdisk / Block Storage&lt;/td&gt;
&lt;td&gt;Persistent Disk (still valid)&lt;/td&gt;
&lt;td&gt;Hyperdisk = next-gen, decoupled IOPS/throughput&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;gcloud storage&lt;/td&gt;
&lt;td&gt;gsutil&lt;/td&gt;
&lt;td&gt;Newer, faster CLI for Cloud Storage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dataplex Catalog&lt;/td&gt;
&lt;td&gt;Data Catalog&lt;/td&gt;
&lt;td&gt;Now part of Dataplex governance&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Deprecated — don&apos;t pick these:&lt;/strong&gt; Cloud Debugger (retired), Cloud IoT Core (retired — use Pub/Sub + partners), and Deployment Manager (superseded by Terraform / Infrastructure Manager). If an answer relies on a retired service, it&apos;s almost certainly a distractor.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;03 — AI &amp;amp; ML — the 2026 Focus Area&lt;/h2&gt;
&lt;p&gt;AI now appears across &lt;strong&gt;design (§1.3), provisioning (§2.4/2.5), and security (§3.1)&lt;/strong&gt;. Almost everything routes through the &lt;strong&gt;Gemini Enterprise Agent Platform (Vertex AI)&lt;/strong&gt;. Learn the stack and how the pieces fit.&lt;/p&gt;
&lt;p&gt;This is more than a rename: Google has stated that Vertex AI services and roadmap are delivered &lt;strong&gt;exclusively&lt;/strong&gt; through the Agent Platform rather than as a standalone service. In current docs and console the platform is organised under five top-level areas — &lt;strong&gt;Studio&lt;/strong&gt;, &lt;strong&gt;Agents&lt;/strong&gt;, &lt;strong&gt;Models&lt;/strong&gt;, &lt;strong&gt;Notebooks&lt;/strong&gt;, and &lt;strong&gt;CodeMender&lt;/strong&gt; — so expect either vocabulary on exam questions and don&apos;t be thrown when a stem says &quot;Vertex AI&quot; and the answer options say &quot;Agent Platform&quot;. The exam wants the Google service names; if you want the vendor-neutral reasoning underneath them, that&apos;s &lt;a href=&quot;https://riddam.github.io/guides/ai-architecture-master-guide/&quot;&gt;the AI architecture field guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fig 03.1 — Gemini Enterprise Agent Platform stack&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Components&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Assist &amp;amp; agents (business value)&lt;/td&gt;
&lt;td&gt;Gemini Cloud Assist · Agent Builder / Agent Studio · Gemini Enterprise / AI Agents · NotebookLM · Code Assist&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Agent operations (new with the platform)&lt;/td&gt;
&lt;td&gt;Agent-to-agent orchestration · Agent Registry · Agent Identity · Agent Gateway · Agent Observability&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Models &amp;amp; APIs (build with)&lt;/td&gt;
&lt;td&gt;Gemini LLMs · Model Garden (200+ models) · Search · Conversation · Vision · Image · Video · Audio (Speech)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MLOps (operate)&lt;/td&gt;
&lt;td&gt;Agent Platform Pipelines (Vertex Pipelines) · Feature Store · Model Registry · Endpoints / serving&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Infrastructure (train &amp;amp; serve)&lt;/td&gt;
&lt;td&gt;AI Hypercomputer · GPUs · TPUs · Cloud Run functions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Securing AI (§3.1)&lt;/td&gt;
&lt;td&gt;Model Armor · Sensitive Data Protection (DLP) · Secure model deployment / VPC-SC&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;What each piece is for&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Choose when…&lt;/th&gt;
&lt;th&gt;AWS analog&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Gemini Enterprise Agent Platform (Vertex AI)&lt;/td&gt;
&lt;td&gt;Any custom-model training, tuning, deployment, or end-to-end MLOps&lt;/td&gt;
&lt;td&gt;SageMaker&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model Garden&lt;/td&gt;
&lt;td&gt;Pick from 200+ first/third-party models (Gemini, Llama, etc.) without building from scratch&lt;/td&gt;
&lt;td&gt;Bedrock catalog&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Agent Builder&lt;/td&gt;
&lt;td&gt;Build RAG / search / conversational agents grounded on your data, low-code&lt;/td&gt;
&lt;td&gt;Bedrock Agents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini Cloud Assist&lt;/td&gt;
&lt;td&gt;AI help &lt;em&gt;designing, deploying &amp;amp; troubleshooting&lt;/em&gt; the architecture itself (in-console)&lt;/td&gt;
&lt;td&gt;Amazon Q Developer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI Hypercomputer&lt;/td&gt;
&lt;td&gt;Large-scale training/serving; integrates GPUs &amp;amp; TPUs, optimized consumption models&lt;/td&gt;
&lt;td&gt;EC2 UltraClusters&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prebuilt AI APIs&lt;/td&gt;
&lt;td&gt;Off-the-shelf Vision, Speech-to-Text, Text-to-Speech, Translation, Document AI&lt;/td&gt;
&lt;td&gt;Rekognition / Transcribe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Conversational Agents (Dialogflow CX / CCAI)&lt;/td&gt;
&lt;td&gt;Build virtual agents / contact-center bots (voice &amp;amp; chat)&lt;/td&gt;
&lt;td&gt;Lex / Connect&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model Armor&lt;/td&gt;
&lt;td&gt;Screen prompts/responses for safety, prompt injection, data leakage&lt;/td&gt;
&lt;td&gt;Bedrock Guardrails&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — prebuilt API vs custom model:&lt;/strong&gt; &lt;strong&gt;Prebuilt API / Model Garden model&lt;/strong&gt; = fastest, cheapest, no ML expertise, but generic. &lt;strong&gt;Custom-trained model on Agent Platform&lt;/strong&gt; = best domain accuracy, but needs labeled data, MLOps, GPU/TPU cost, maintenance. Default: reach for &lt;strong&gt;prebuilt or a foundation model + RAG&lt;/strong&gt; unless the scenario says pretrained accuracy is insufficient.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Scenario triggers:&lt;/strong&gt; &quot;Chatbot grounded on our docs/catalog&quot; → &lt;strong&gt;Agent Builder + RAG&lt;/strong&gt;. &quot;Generate architecture / debug a failing deployment&quot; → &lt;strong&gt;Gemini Cloud Assist&lt;/strong&gt;. &quot;Protect an LLM app from prompt injection / PII leakage&quot; → &lt;strong&gt;Model Armor + Sensitive Data Protection&lt;/strong&gt;. &quot;Off-the-shelf image labels / transcription&quot; → &lt;strong&gt;prebuilt AI API&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;04 — Compute&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Control&lt;/th&gt;
&lt;th&gt;Choose when…&lt;/th&gt;
&lt;th&gt;AWS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Compute Engine&lt;/td&gt;
&lt;td&gt;Max (IaaS)&lt;/td&gt;
&lt;td&gt;OS access, custom kernels, licensed software, lift-and-shift, GPUs&lt;/td&gt;
&lt;td&gt;EC2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GKE Standard&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Kubernetes with node control, GPUs, custom node configs&lt;/td&gt;
&lt;td&gt;EKS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GKE Autopilot&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;td&gt;Kubernetes without node ops, pay-per-pod, simplified ops&lt;/td&gt;
&lt;td&gt;EKS+Fargate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GKE Enterprise (Anthos)&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Fleet mgmt across clusters / on-prem / multicloud&lt;/td&gt;
&lt;td&gt;EKS Anywhere&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Run&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;td&gt;Stateless containers, pay-per-request, scale-to-zero, HTTP&lt;/td&gt;
&lt;td&gt;Fargate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Run functions (Functions)&lt;/td&gt;
&lt;td&gt;Minimal&lt;/td&gt;
&lt;td&gt;Event-driven code (Pub/Sub, HTTP triggers), short execution&lt;/td&gt;
&lt;td&gt;Lambda&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;App Engine&lt;/td&gt;
&lt;td&gt;Minimal&lt;/td&gt;
&lt;td&gt;Opinionated PaaS web apps (Standard = runtimes; Flex = containers)&lt;/td&gt;
&lt;td&gt;Beanstalk&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Batch&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;td&gt;Managed batch/HPC job scheduling&lt;/td&gt;
&lt;td&gt;AWS Batch&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Fig 04.1 — Compute decision tree&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Need &lt;strong&gt;specific OS / kernel / licensing / GPUs&lt;/strong&gt; or lift-and-shift? → &lt;strong&gt;Compute Engine&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Existing &lt;strong&gt;Kubernetes&lt;/strong&gt; / need portability &amp;amp; fine control? → &lt;strong&gt;GKE (Autopilot if no node ops)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Stateless &lt;strong&gt;containerized&lt;/strong&gt; HTTP service, want scale-to-zero? → &lt;strong&gt;Cloud Run&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Small &lt;strong&gt;event-driven&lt;/strong&gt; glue (Pub/Sub, Storage triggers)? → &lt;strong&gt;Cloud Run functions&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Multi-cluster / hybrid / &lt;strong&gt;multicloud&lt;/strong&gt; fleet? → &lt;strong&gt;GKE Enterprise&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Compute Engine essentials&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Spot VMs (Preemptible):&lt;/strong&gt; up to ~91% cheaper, reclaimed with 30s notice — fault-tolerant/batch only. Spot has &lt;strong&gt;no 24-hour cap&lt;/strong&gt; (old preemptible did).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MIG:&lt;/strong&gt; autoscaling + autohealing + rolling/canary + regional multi-zone spread. Unmanaged = static, no autoscale.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CUDs&lt;/strong&gt; for steady state; &lt;strong&gt;Sustained Use Discounts&lt;/strong&gt; apply automatically; &lt;strong&gt;custom machine types&lt;/strong&gt; right-size vCPU/RAM.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sole-tenant nodes&lt;/strong&gt; for compliance/licensing; &lt;strong&gt;Confidential VMs&lt;/strong&gt; encrypt memory in-use.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Scenario triggers:&lt;/strong&gt; &quot;Reduce operational overhead&quot; → serverless (&lt;strong&gt;Cloud Run / functions&lt;/strong&gt;). &quot;Fine-grained control / custom nodes&quot; → &lt;strong&gt;Compute Engine or GKE Standard&lt;/strong&gt;. &quot;Event-driven&quot; → &lt;strong&gt;Cloud Run functions&lt;/strong&gt;. &quot;Operational simplicity for K8s&quot; → &lt;strong&gt;Autopilot&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — Cloud Run vs GKE:&lt;/strong&gt; &lt;strong&gt;Cloud Run:&lt;/strong&gt; zero infra, scale-to-zero, per-request billing, fastest to ship — but HTTP/event-centric, less control. &lt;strong&gt;GKE:&lt;/strong&gt; full K8s (DaemonSets, operators, mesh, stateful, GPUs), portability — but you own upgrades/scaling/node cost even when idle. Default Cloud Run unless you need K8s primitives.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;GKE scaling (concept level):&lt;/strong&gt; GKE scales at &lt;strong&gt;two layers&lt;/strong&gt;: the &lt;strong&gt;Horizontal Pod Autoscaler (HPA)&lt;/strong&gt; adds/removes &lt;em&gt;pods&lt;/em&gt; on CPU/memory/custom metrics, while the &lt;strong&gt;Cluster Autoscaler&lt;/strong&gt; and &lt;strong&gt;Node Auto-Provisioning&lt;/strong&gt; add/remove &lt;em&gt;nodes&lt;/em&gt; to fit those pods. (Autopilot manages both for you.) You don&apos;t need kubectl or manifests for PCA — just know GKE autoscales pods and nodes separately, and that node pools can run on &lt;strong&gt;Spot VMs&lt;/strong&gt; to cut cost.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Cloud Run: services vs jobs:&lt;/strong&gt; &lt;strong&gt;Cloud Run services&lt;/strong&gt; handle requests (HTTP/events, scale-to-zero). &lt;strong&gt;Cloud Run jobs&lt;/strong&gt; run to completion (batch/ETL/scheduled scripts) with no listening port — the answer for &quot;containerized batch task&quot; without standing up GKE.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;05 — Storage&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Choose when…&lt;/th&gt;
&lt;th&gt;AWS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Storage&lt;/td&gt;
&lt;td&gt;Object&lt;/td&gt;
&lt;td&gt;Unstructured data, backups, data lake, static sites, ML files&lt;/td&gt;
&lt;td&gt;S3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Persistent Disk / Hyperdisk&lt;/td&gt;
&lt;td&gt;Block&lt;/td&gt;
&lt;td&gt;VM boot &amp;amp; data disks; Hyperdisk decouples IOPS/throughput&lt;/td&gt;
&lt;td&gt;EBS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local SSD&lt;/td&gt;
&lt;td&gt;Block (ephemeral)&lt;/td&gt;
&lt;td&gt;Scratch/cache — highest IOPS, data lost on stop&lt;/td&gt;
&lt;td&gt;Instance Store&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Filestore&lt;/td&gt;
&lt;td&gt;File (NFS)&lt;/td&gt;
&lt;td&gt;Shared POSIX file storage for VMs/GKE&lt;/td&gt;
&lt;td&gt;EFS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NetApp Volumes / Managed Lustre&lt;/td&gt;
&lt;td&gt;File&lt;/td&gt;
&lt;td&gt;Enterprise NFS/SMB; HPC parallel FS&lt;/td&gt;
&lt;td&gt;FSx&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Fig 05.1 — Cloud Storage classes (hotter → colder = cheaper storage, pricier retrieval)&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Class&lt;/th&gt;
&lt;th&gt;Access pattern&lt;/th&gt;
&lt;th&gt;Retrieval cost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Standard&lt;/td&gt;
&lt;td&gt;Frequent access · no min duration · hot data, serving&lt;/td&gt;
&lt;td&gt;no retrieval fee&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nearline&lt;/td&gt;
&lt;td&gt;&amp;lt; once / month · 30-day min · backups&lt;/td&gt;
&lt;td&gt;low retrieval&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Coldline&lt;/td&gt;
&lt;td&gt;&amp;lt; once / quarter · 90-day min · DR&lt;/td&gt;
&lt;td&gt;higher retrieval&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Archive&lt;/td&gt;
&lt;td&gt;&amp;lt; once / year · 365-day min · compliance&lt;/td&gt;
&lt;td&gt;highest retrieval&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Location:&lt;/strong&gt; region (lowest latency/cost), dual-region, or multi-region (highest availability). Bucket location &amp;amp; name are immutable; names globally unique.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Object Lifecycle Management:&lt;/strong&gt; auto-transition classes or delete by age — the go-to for &quot;reduce storage cost over time&quot;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Autoclass:&lt;/strong&gt; automatically moves each object between classes based on its &lt;em&gt;actual&lt;/em&gt; access pattern (no age rules to write) — pick this when access is unpredictable.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bucket Lock + retention policy&lt;/strong&gt; for WORM/compliance; &lt;strong&gt;versioning&lt;/strong&gt; for accidental deletes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Signed URLs&lt;/strong&gt; give time-limited object access to users &lt;em&gt;without&lt;/em&gt; Google accounts; &lt;strong&gt;signed policy documents&lt;/strong&gt; constrain browser-based uploads.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Access control:&lt;/strong&gt; prefer &lt;strong&gt;uniform bucket-level access&lt;/strong&gt; (IAM only, recommended) over &lt;strong&gt;fine-grained&lt;/strong&gt; (IAM + legacy per-object ACLs).&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — colder classes:&lt;/strong&gt; Each colder class lowers &lt;strong&gt;storage $/GB&lt;/strong&gt; but adds a &lt;strong&gt;retrieval fee + minimum duration&lt;/strong&gt;. Frequently-read data in Coldline/Archive costs &lt;em&gt;more&lt;/em&gt;. Match the class to true access frequency and let &lt;strong&gt;lifecycle rules&lt;/strong&gt; tier automatically.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;06 — Databases&lt;/h2&gt;
&lt;p&gt;The single most-tested topic — know the decision rule cold.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Choose when…&lt;/th&gt;
&lt;th&gt;AWS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cloud SQL&lt;/td&gt;
&lt;td&gt;Relational OLTP&lt;/td&gt;
&lt;td&gt;MySQL/PostgreSQL/SQL Server, single region, standard OLTP&lt;/td&gt;
&lt;td&gt;RDS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AlloyDB&lt;/td&gt;
&lt;td&gt;Relational (PG)&lt;/td&gt;
&lt;td&gt;High-perf PostgreSQL, HTAP, AI-ready&lt;/td&gt;
&lt;td&gt;Aurora&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spanner&lt;/td&gt;
&lt;td&gt;Relational, global&lt;/td&gt;
&lt;td&gt;Multi-region strong consistency, 99.999% SLA, horizontal scale, &amp;gt;1000 TPS&lt;/td&gt;
&lt;td&gt;Aurora Global&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Firestore&lt;/td&gt;
&lt;td&gt;NoSQL document&lt;/td&gt;
&lt;td&gt;Mobile/web, real-time sync, offline, flexible schema&lt;/td&gt;
&lt;td&gt;DynamoDB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bigtable&lt;/td&gt;
&lt;td&gt;NoSQL wide-column&lt;/td&gt;
&lt;td&gt;IoT/time-series, high-throughput low-latency, &amp;gt;1TB&lt;/td&gt;
&lt;td&gt;DynamoDB / Timestream&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memorystore&lt;/td&gt;
&lt;td&gt;In-memory&lt;/td&gt;
&lt;td&gt;Redis/Memcached caching, sessions, leaderboards, sub-ms&lt;/td&gt;
&lt;td&gt;ElastiCache&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BigQuery&lt;/td&gt;
&lt;td&gt;Analytical OLAP&lt;/td&gt;
&lt;td&gt;Petabyte analytics, warehouse, serverless SQL, BI&lt;/td&gt;
&lt;td&gt;Redshift&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Fig 06.1 — Database decision tree&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Analytics / warehousing / SQL over huge datasets? → &lt;strong&gt;BigQuery&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Relational + &lt;strong&gt;global&lt;/strong&gt; scale &amp;amp; strong consistency? → &lt;strong&gt;Spanner&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Relational, &lt;strong&gt;regional&lt;/strong&gt; OLTP, standard engines? → &lt;strong&gt;Cloud SQL (AlloyDB if high-perf PG/HTAP)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;NoSQL, real-time &lt;strong&gt;mobile/web&lt;/strong&gt;, offline sync? → &lt;strong&gt;Firestore&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;NoSQL, &lt;strong&gt;high write throughput&lt;/strong&gt;, time-series/IoT, &amp;gt;1TB? → &lt;strong&gt;Bigtable&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Sub-ms caching / session store? → &lt;strong&gt;Memorystore&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Scenario triggers (memorize):&lt;/strong&gt; &quot;&lt;strong&gt;Financial transactions&lt;/strong&gt;&quot; + &quot;&lt;strong&gt;global&lt;/strong&gt;&quot; in one sentence → &lt;strong&gt;Spanner&lt;/strong&gt;. &quot;&lt;strong&gt;Sensor data&lt;/strong&gt; / &lt;strong&gt;time-series&lt;/strong&gt;&quot; → &lt;strong&gt;Bigtable&lt;/strong&gt;. Plain &quot;&lt;strong&gt;relational&lt;/strong&gt;&quot; with no scale requirement → &lt;strong&gt;Cloud SQL&lt;/strong&gt;. &quot;Real-time mobile sync&quot; → &lt;strong&gt;Firestore&lt;/strong&gt;. &quot;Ad-hoc SQL / dashboards / ML on history&quot; → &lt;strong&gt;BigQuery&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — Cloud SQL vs Spanner:&lt;/strong&gt; &lt;strong&gt;Cloud SQL:&lt;/strong&gt; cheaper, familiar engines, easy migration — but vertical ceiling &amp;amp; regional (replicas scale reads only). &lt;strong&gt;Spanner:&lt;/strong&gt; unlimited horizontal scale + global strong consistency + 99.999% — but expensive and needs key design to avoid hotspots. Choose Spanner only for &lt;strong&gt;global writes or scale beyond one big instance&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — Firestore vs Bigtable:&lt;/strong&gt; &lt;strong&gt;Firestore:&lt;/strong&gt; document model, real-time listeners, strong consistency, app backends — modest write throughput. &lt;strong&gt;Bigtable:&lt;/strong&gt; wide-column, single-digit-ms at millions of ops/sec, ideal for time-series/IoT — no cross-row transactions, no secondary indexes, min 1-node cost. Row-key design is everything.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;07 — Networking&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;AWS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;VPC&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Global&lt;/strong&gt; virtual network (spans all regions)&lt;/td&gt;
&lt;td&gt;VPC (regional)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Subnet&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Regional&lt;/strong&gt; (spans all zones in region)&lt;/td&gt;
&lt;td&gt;Subnet (per-AZ)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shared VPC&lt;/td&gt;
&lt;td&gt;Host project shares subnets with service projects — centralised network admin&lt;/td&gt;
&lt;td&gt;VPC sharing (RAM)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;VPC Peering&lt;/td&gt;
&lt;td&gt;Private connectivity between VPCs — &lt;strong&gt;non-transitive&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;VPC Peering&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Private Service Connect&lt;/td&gt;
&lt;td&gt;Private access to services/APIs across VPCs/orgs&lt;/td&gt;
&lt;td&gt;PrivateLink&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Private Google Access&lt;/td&gt;
&lt;td&gt;VMs without external IP reach Google APIs (per-subnet)&lt;/td&gt;
&lt;td&gt;Gateway endpoints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Interconnect&lt;/td&gt;
&lt;td&gt;Dedicated/Partner private link to on-prem&lt;/td&gt;
&lt;td&gt;Direct Connect&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud VPN (HA VPN)&lt;/td&gt;
&lt;td&gt;Encrypted IPsec over internet (99.99% w/ 2 tunnels)&lt;/td&gt;
&lt;td&gt;Site-to-Site VPN&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Router&lt;/td&gt;
&lt;td&gt;Dynamic BGP for VPN &amp;amp; Interconnect&lt;/td&gt;
&lt;td&gt;(TGW/DXGW)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Armor&lt;/td&gt;
&lt;td&gt;WAF + DDoS at the global LB (IP/geo/OWASP)&lt;/td&gt;
&lt;td&gt;WAF + Shield&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud NAT&lt;/td&gt;
&lt;td&gt;Egress for private instances&lt;/td&gt;
&lt;td&gt;NAT Gateway&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Network Connectivity Center&lt;/td&gt;
&lt;td&gt;Hub-and-spoke transit — connects many VPCs/sites (works around peering&apos;s non-transitivity)&lt;/td&gt;
&lt;td&gt;Transit Gateway&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud DNS&lt;/td&gt;
&lt;td&gt;Managed DNS — public &amp;amp; private zones, split-horizon&lt;/td&gt;
&lt;td&gt;Route 53&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Service Mesh (Traffic Director)&lt;/td&gt;
&lt;td&gt;Managed service-to-service traffic, mTLS, canary routing (Istio/Envoy)&lt;/td&gt;
&lt;td&gt;App Mesh&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud IDS&lt;/td&gt;
&lt;td&gt;Managed intrusion detection (inspects traffic for threats)&lt;/td&gt;
&lt;td&gt;GuardDuty (network)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;GCP vs AWS — the key mental model&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;GCP&lt;/th&gt;
&lt;th&gt;AWS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;VPC scope&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Global&lt;/strong&gt; — one VPC spans every region&lt;/td&gt;
&lt;td&gt;Regional — one VPC per region&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Subnet scope&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Regional&lt;/strong&gt; — spans all zones&lt;/td&gt;
&lt;td&gt;Per-AZ&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Global LB&lt;/td&gt;
&lt;td&gt;Single anycast IP, one LB worldwide&lt;/td&gt;
&lt;td&gt;CloudFront + regional LBs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Load balancer selection&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;HTTP/HTTPS, global, multiple regions&lt;/td&gt;
&lt;td&gt;Global External Application LB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HTTP/HTTPS, must stay in one region (data residency)&lt;/td&gt;
&lt;td&gt;Regional External Application LB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TCP/UDP, preserve client IP, non-HTTP&lt;/td&gt;
&lt;td&gt;External Network LB (passthrough)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Internal microservices / private VPC traffic&lt;/td&gt;
&lt;td&gt;Internal Application or Network LB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Fig 07.1 — Hybrid connectivity: choosing the on-prem link&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Highest bandwidth&lt;/strong&gt;, dedicated physical fibre, lowest latency (10/100 Gbps)? → &lt;strong&gt;Dedicated Interconnect&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cannot co-locate&lt;/strong&gt; at a Google PoP / lower bandwidth (50 Mbps–50 Gbps)? → &lt;strong&gt;Partner Interconnect&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Quick / cheap / encrypted over public internet (&amp;lt;3 Gbps)? → &lt;strong&gt;HA VPN (99.99%)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Reach Google APIs privately from on-prem/VMs? → &lt;strong&gt;Private Google Access / PSC&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Scenario triggers:&lt;/strong&gt; &quot;Cannot co-locate at a Google facility&quot; → &lt;strong&gt;Partner Interconnect&lt;/strong&gt;. &quot;Dedicated physical link, highest bandwidth&quot; → &lt;strong&gt;Dedicated Interconnect&lt;/strong&gt;. &quot;Global users, one IP, HTTP&quot; → &lt;strong&gt;Global External App LB&lt;/strong&gt;. &quot;Preserve source IP / non-HTTP&quot; → &lt;strong&gt;Network (passthrough) LB&lt;/strong&gt;. Remember VPC peering is &lt;strong&gt;non-transitive&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Network observability:&lt;/strong&gt; For &quot;diagnose connectivity / see traffic&quot; answers: &lt;strong&gt;VPC Flow Logs&lt;/strong&gt; (traffic records), &lt;strong&gt;Firewall Rules Logging / Insights&lt;/strong&gt; (what rules allow/deny), and &lt;strong&gt;Network Intelligence Center&lt;/strong&gt; (Connectivity Tests, Topology, Performance Dashboard) to troubleshoot reachability and latency.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;IP / CIDR planning:&lt;/strong&gt; Before any hybrid connectivity, ensure &lt;strong&gt;non-overlapping RFC 1918 ranges&lt;/strong&gt; across on-prem and every VPC/subnet — overlapping CIDRs break routing and can&apos;t be corrected without re-addressing. Plan ranges with headroom; subnet ranges can expand but must never overlap.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;08 — High Availability &amp;amp; Disaster Recovery&lt;/h2&gt;
&lt;h3&gt;RTO vs RPO — know the difference cold&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;RTO — Recovery Time Objective&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Max acceptable &lt;strong&gt;downtime&lt;/strong&gt; after a failure.&lt;/li&gt;
&lt;li&gt;&quot;How long until we&apos;re back up?&quot;&lt;/li&gt;
&lt;li&gt;Lower RTO → hot standby, automated failover, MIGs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;RPO — Recovery Point Objective&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Max acceptable &lt;strong&gt;data loss&lt;/strong&gt; (measured in time).&lt;/li&gt;
&lt;li&gt;&quot;How much recent data can we lose?&quot;&lt;/li&gt;
&lt;li&gt;Lower RPO → synchronous replication, frequent snapshots.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Fig 08.1 — DR strategy ladder (cheaper/slower → pricier/faster)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Backup &amp;amp; Restore&lt;/strong&gt; — snapshots/exports to Cloud Storage → high RTO/RPO · lowest cost&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cold standby (pilot light)&lt;/strong&gt; — minimal core running, scale on failover → medium RTO&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Warm standby&lt;/strong&gt; — scaled-down full env, promote on failover → low RTO&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hot / multi-region active-active&lt;/strong&gt; — no data loss → near-zero RTO/RPO · highest cost&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;HA patterns by service&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;HA configuration&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Compute Engine&lt;/td&gt;
&lt;td&gt;Regional MIG across multiple zones + autoscaling + health checks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud SQL&lt;/td&gt;
&lt;td&gt;HA config with standby in a 2nd zone, automatic failover&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spanner&lt;/td&gt;
&lt;td&gt;Multi-region config = 99.999%, synchronous replication&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GKE&lt;/td&gt;
&lt;td&gt;Regional cluster spreads nodes across 3 zones automatically&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Storage&lt;/td&gt;
&lt;td&gt;Multi-region / dual-region bucket = geo-redundant objects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BigQuery&lt;/td&gt;
&lt;td&gt;Multi-region dataset; cross-region dataset replication for DR&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backup and DR Service&lt;/td&gt;
&lt;td&gt;Centralized managed backup/restore for GCE, disks, databases — the managed backup answer&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Scenario triggers:&lt;/strong&gt; &quot;Cannot tolerate &lt;strong&gt;data loss&lt;/strong&gt;&quot; (RPO≈0) → synchronous replication → &lt;strong&gt;Spanner multi-region&lt;/strong&gt; or &lt;strong&gt;Cloud SQL HA&lt;/strong&gt;. &quot;Low-cost DR, some data loss acceptable&quot; → async replication / cross-region GCS copy. &quot;Survive a &lt;strong&gt;zone&lt;/strong&gt; failure&quot; → regional (multi-zone). &quot;Survive a &lt;strong&gt;region&lt;/strong&gt; failure&quot; → multi-region.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — availability tiers:&lt;/strong&gt; &lt;strong&gt;Zonal&lt;/strong&gt; = cheapest, single point of failure. &lt;strong&gt;Regional&lt;/strong&gt; (multi-zone) = survives a zone outage, the usual production baseline. &lt;strong&gt;Multi-region&lt;/strong&gt; = survives a region outage, highest cost and higher write latency. Buy only the tier the SLA demands.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;09 — IAM &amp;amp; Security&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Fig 09.1 — Resource hierarchy (policies inherit downward; org policies + deny rules override)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Organization → Folder(s) → Project(s) → Resources (VMs, buckets, DBs)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Roles:&lt;/strong&gt; Basic (Owner/Editor/Viewer — too broad, never in prod) → Predefined (service-specific, recommended) → Custom (exact least-privilege permissions).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Service accounts:&lt;/strong&gt; both identity &lt;em&gt;and&lt;/em&gt; resource. Prefer &lt;strong&gt;attached SAs + short-lived tokens&lt;/strong&gt; and &lt;strong&gt;impersonation&lt;/strong&gt; (separation of duties) over exported keys. &lt;strong&gt;Workload Identity Federation&lt;/strong&gt; = GitHub Actions / AWS / on-prem auth &lt;em&gt;without&lt;/em&gt; keys.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;IAM Conditions:&lt;/strong&gt; attribute-based (time, resource, IP). &lt;strong&gt;Deny policies&lt;/strong&gt; override allow.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Human identity:&lt;/strong&gt; Cloud Identity is the user/group directory (IdaaS). Google Cloud Directory Sync (GCDS) one-way syncs on-prem AD/LDAP → Cloud Identity. Use &lt;strong&gt;SSO via SAML/OIDC&lt;/strong&gt; with an external IdP (Okta, Entra ID). Workforce Identity Federation lets external-IdP &lt;em&gt;employees&lt;/em&gt; use GCP with short-lived creds and no user provisioning — the human analog to Workload Identity Federation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Org policies:&lt;/strong&gt; preventive guardrails (restrict regions, block external IPs, enforce CMEK) applied hierarchy-wide.&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;AWS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cloud KMS / HSM / EKM&lt;/td&gt;
&lt;td&gt;Managed / hardware / external key management (CMEK)&lt;/td&gt;
&lt;td&gt;KMS / CloudHSM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Secret Manager&lt;/td&gt;
&lt;td&gt;Secrets storage + rotation + versioning + audit&lt;/td&gt;
&lt;td&gt;Secrets Manager&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;VPC Service Controls&lt;/td&gt;
&lt;td&gt;Perimeter to stop data exfiltration from managed APIs&lt;/td&gt;
&lt;td&gt;(no direct equal)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Identity-Aware Proxy (IAP)&lt;/td&gt;
&lt;td&gt;Zero-trust access to apps/VMs without VPN&lt;/td&gt;
&lt;td&gt;Verified Access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Access Context Manager&lt;/td&gt;
&lt;td&gt;Defines access levels (IP, device, region) that power IAP &amp;amp; VPC-SC&lt;/td&gt;
&lt;td&gt;(condition keys)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chrome Enterprise Premium (BeyondCorp)&lt;/td&gt;
&lt;td&gt;Context-aware zero-trust access&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Binary Authorization&lt;/td&gt;
&lt;td&gt;Only trusted/signed container images deploy to GKE/Run&lt;/td&gt;
&lt;td&gt;(Signer)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Security Command Center&lt;/td&gt;
&lt;td&gt;Posture mgmt, vuln scanning, threat detection&lt;/td&gt;
&lt;td&gt;Security Hub&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Asset Inventory&lt;/td&gt;
&lt;td&gt;Search/export/monitor all resources &amp;amp; IAM across the org (governance, audits)&lt;/td&gt;
&lt;td&gt;Config / Resource Explorer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Security Operations (Chronicle)&lt;/td&gt;
&lt;td&gt;SIEM/SOAR — threat hunting &amp;amp; correlation (behind SCC Enterprise)&lt;/td&gt;
&lt;td&gt;Security Lake + Detective&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sensitive Data Protection (DLP)&lt;/td&gt;
&lt;td&gt;Discover / classify / de-identify PII&lt;/td&gt;
&lt;td&gt;Macie&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Assured Workloads&lt;/td&gt;
&lt;td&gt;Compliance-controlled envs (residency, personnel)&lt;/td&gt;
&lt;td&gt;(compliance controls)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model Armor&lt;/td&gt;
&lt;td&gt;Guardrails for LLM prompts/responses&lt;/td&gt;
&lt;td&gt;Bedrock Guardrails&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — key management tiers:&lt;/strong&gt; Encryption at rest is &lt;strong&gt;always on&lt;/strong&gt;. &lt;strong&gt;Google-managed keys&lt;/strong&gt; = zero effort. &lt;strong&gt;CMEK&lt;/strong&gt; (Cloud KMS) = you control rotation/disable for compliance. &lt;strong&gt;Cloud HSM&lt;/strong&gt; = FIPS 140-2 L3 hardware. &lt;strong&gt;Cloud EKM&lt;/strong&gt; = key held by an external/third-party manager (max control &amp;amp; separation, most overhead). Escalate only as compliance demands.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Scenario triggers:&lt;/strong&gt; &quot;Prevent data leaving a perimeter even with valid creds&quot; → &lt;strong&gt;VPC Service Controls&lt;/strong&gt;. &quot;Access internal app, no VPN&quot; → &lt;strong&gt;IAP&lt;/strong&gt;. &quot;External CI/CD auth without long-lived keys&quot; → &lt;strong&gt;Workload Identity Federation&lt;/strong&gt;. &quot;Only signed images to GKE&quot; → &lt;strong&gt;Binary Authorization&lt;/strong&gt;. &quot;Regulator requires keys off-cloud&quot; → &lt;strong&gt;Cloud EKM&lt;/strong&gt;. &quot;Federate on-prem AD / external IdP for employees&quot; → &lt;strong&gt;Cloud Identity + GCDS + SSO&lt;/strong&gt; (or &lt;strong&gt;Workforce Identity Federation&lt;/strong&gt; for no provisioning).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;10 — Operations &amp;amp; Observability&lt;/h2&gt;
&lt;p&gt;All under &lt;strong&gt;Google Cloud Observability (Stackdriver)&lt;/strong&gt;.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;AWS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Monitoring&lt;/td&gt;
&lt;td&gt;Metrics, dashboards, uptime checks, SLOs, alerting&lt;/td&gt;
&lt;td&gt;CloudWatch Metrics&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Logging&lt;/td&gt;
&lt;td&gt;Log ingest; &lt;strong&gt;Log Sinks&lt;/strong&gt; export to BigQuery/GCS/Pub/Sub&lt;/td&gt;
&lt;td&gt;CloudWatch Logs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Trace&lt;/td&gt;
&lt;td&gt;Distributed latency tracing across microservices&lt;/td&gt;
&lt;td&gt;X-Ray&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Profiler&lt;/td&gt;
&lt;td&gt;Continuous CPU/heap profiling&lt;/td&gt;
&lt;td&gt;CodeGuru Profiler&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Error Reporting&lt;/td&gt;
&lt;td&gt;Aggregates + surfaces app errors in real time&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Managed Service for Prometheus&lt;/td&gt;
&lt;td&gt;Managed Prometheus for GKE/metrics&lt;/td&gt;
&lt;td&gt;AMP&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Audit Logs&lt;/td&gt;
&lt;td&gt;Admin / Data Access / System / Policy logs&lt;/td&gt;
&lt;td&gt;CloudTrail&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Scenario triggers:&lt;/strong&gt; &quot;Centralise logs across all projects&quot; → &lt;strong&gt;Log Sinks&lt;/strong&gt; to a central project&apos;s logging/GCS bucket (aggregated sink at org/folder). &quot;Long-term log retention/analytics&quot; → sink to &lt;strong&gt;BigQuery/GCS&lt;/strong&gt;. Admin Activity audit logs are &lt;strong&gt;always-on &amp;amp; immutable&lt;/strong&gt;; Data Access logs are opt-in (high volume/cost).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;SRE mindset (§6):&lt;/strong&gt; Reliability answers favor &lt;strong&gt;SLIs/SLOs + error budgets&lt;/strong&gt;, alerting on symptoms not causes, and validating resilience with &lt;strong&gt;chaos / load / penetration testing&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;CI/CD &amp;amp; orchestration (§5 Managing implementation)&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;AWS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Build&lt;/td&gt;
&lt;td&gt;CI — build, test, containerize from source&lt;/td&gt;
&lt;td&gt;CodeBuild&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Artifact Registry (GCR)&lt;/td&gt;
&lt;td&gt;Store build artifacts / container images&lt;/td&gt;
&lt;td&gt;ECR / CodeArtifact&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Deploy&lt;/td&gt;
&lt;td&gt;CD — managed progressive delivery to GKE/Run&lt;/td&gt;
&lt;td&gt;CodeDeploy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Eventarc&lt;/td&gt;
&lt;td&gt;Event routing (Cloud/Audit/Pub-Sub events → services)&lt;/td&gt;
&lt;td&gt;EventBridge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Workflows&lt;/td&gt;
&lt;td&gt;Serverless orchestration of API/service steps&lt;/td&gt;
&lt;td&gt;Step Functions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Scheduler&lt;/td&gt;
&lt;td&gt;Managed cron for jobs/HTTP/Pub-Sub&lt;/td&gt;
&lt;td&gt;EventBridge Scheduler&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Tasks&lt;/td&gt;
&lt;td&gt;Async task queue with rate/retry control&lt;/td&gt;
&lt;td&gt;SQS (task-style)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Scenario triggers:&lt;/strong&gt; Pipeline chain: &lt;strong&gt;Cloud Build → Artifact Registry → Cloud Deploy&lt;/strong&gt;. &quot;Trigger a service from a GCS/Audit event&quot; → &lt;strong&gt;Eventarc&lt;/strong&gt;. &quot;Coordinate multi-step API calls&quot; → &lt;strong&gt;Workflows&lt;/strong&gt;. &quot;Run on a schedule&quot; → &lt;strong&gt;Cloud Scheduler&lt;/strong&gt;. &quot;Rate-limited async work queue&quot; → &lt;strong&gt;Cloud Tasks&lt;/strong&gt;. Note &lt;strong&gt;Cloud Composer&lt;/strong&gt; (Airflow) is for heavy data pipelines; Workflows is lighter service orchestration.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;11 — Data &amp;amp; Analytics&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;AWS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Pub/Sub&lt;/td&gt;
&lt;td&gt;Global async messaging — entry point for streaming pipelines&lt;/td&gt;
&lt;td&gt;SNS+SQS / Kinesis&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dataflow&lt;/td&gt;
&lt;td&gt;Managed Apache Beam — unified stream + batch ETL&lt;/td&gt;
&lt;td&gt;Kinesis Data Analytics&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dataproc&lt;/td&gt;
&lt;td&gt;Managed Hadoop/Spark — migrate existing jobs&lt;/td&gt;
&lt;td&gt;EMR&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Managed Service for Apache Spark&lt;/td&gt;
&lt;td&gt;Serverless Spark&lt;/td&gt;
&lt;td&gt;EMR Serverless&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BigQuery&lt;/td&gt;
&lt;td&gt;Serverless warehouse + BQML + BI Engine&lt;/td&gt;
&lt;td&gt;Redshift&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Composer&lt;/td&gt;
&lt;td&gt;Managed Apache Airflow orchestration&lt;/td&gt;
&lt;td&gt;MWAA&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Data Fusion&lt;/td&gt;
&lt;td&gt;Visual, code-free ETL/ELT&lt;/td&gt;
&lt;td&gt;Glue (visual)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dataplex&lt;/td&gt;
&lt;td&gt;Governance, lakehouse, catalog&lt;/td&gt;
&lt;td&gt;Lake Formation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Looker / Looker Studio&lt;/td&gt;
&lt;td&gt;Governed BI &amp;amp; visualization on BigQuery&lt;/td&gt;
&lt;td&gt;QuickSight&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Datastream&lt;/td&gt;
&lt;td&gt;Serverless change-data-capture (CDC) — replicate DB changes into BigQuery/GCS&lt;/td&gt;
&lt;td&gt;DMS (CDC)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Healthcare API&lt;/td&gt;
&lt;td&gt;Managed FHIR/HL7v2/DICOM store — the EHR-case ingestion/interop layer&lt;/td&gt;
&lt;td&gt;HealthLake&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Fig 11.1 — Canonical streaming pipeline (the IoT / telemetry answer)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Pub/Sub → Dataflow (transform) → Bigtable (low-latency serving) + BigQuery (analytics)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — Dataflow vs Dataproc:&lt;/strong&gt; &lt;strong&gt;Dataflow:&lt;/strong&gt; serverless, autoscaling, one pipeline for batch &lt;em&gt;and&lt;/em&gt; stream — preferred greenfield. &lt;strong&gt;Dataproc:&lt;/strong&gt; when &lt;strong&gt;migrating existing Hadoop/Spark/Hive&lt;/strong&gt; with minimal rewrite. Lift-and-shift Spark → Dataproc; net-new streaming → Dataflow.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;12 — Migration Strategy (the 6 R&apos;s)&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Strategy&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;th&gt;GCP tooling&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Rehost&lt;/strong&gt; (lift &amp;amp; shift)&lt;/td&gt;
&lt;td&gt;Move as-is, fastest&lt;/td&gt;
&lt;td&gt;Migrate to VMs, Migration Center&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Replatform&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Minor optimization (self-managed DB → Cloud SQL)&lt;/td&gt;
&lt;td&gt;Database Migration Service&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Refactor&lt;/strong&gt; / modernize&lt;/td&gt;
&lt;td&gt;Re-architect to cloud-native&lt;/td&gt;
&lt;td&gt;Migrate to Containers, GKE, Cloud Run&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Repurchase&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Switch to SaaS&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Retire&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Decommission unused&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Retain&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Keep on-prem for now (hybrid)&lt;/td&gt;
&lt;td&gt;Interconnect / GKE Enterprise&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Assess first&lt;/strong&gt; with &lt;strong&gt;Migration Center&lt;/strong&gt; (discovery, TCO, dependency mapping) — always the step before choosing a strategy.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data transfer sizing:&lt;/strong&gt; Storage Transfer Service (online), &lt;strong&gt;Transfer Appliance&lt;/strong&gt; (petabyte-scale offline), &lt;code&gt;gcloud storage&lt;/code&gt; for smaller sets.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — speed vs value:&lt;/strong&gt; &lt;strong&gt;Rehost&lt;/strong&gt; = fastest, least cloud value, keeps tech debt. &lt;strong&gt;Refactor&lt;/strong&gt; = highest long-term value but most time/cost/risk. &quot;Tight deadline / minimize change&quot; → rehost; &quot;reduce operational burden / scale elastically&quot; → refactor to managed/serverless.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;13 — Cost Optimization&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Lever&lt;/th&gt;
&lt;th&gt;Savings / trigger&lt;/th&gt;
&lt;th&gt;Use when…&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Committed Use Discounts (CUD)&lt;/td&gt;
&lt;td&gt;up to ~57–70% for 1- or 3-yr commit&lt;/td&gt;
&lt;td&gt;Steady-state, predictable baseline load&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spot VMs (Preemptible)&lt;/td&gt;
&lt;td&gt;up to ~91% off; 30s reclaim notice&lt;/td&gt;
&lt;td&gt;Batch, fault-tolerant, stateless workers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sustained Use Discounts&lt;/td&gt;
&lt;td&gt;automatic after &amp;gt;25% of the month&lt;/td&gt;
&lt;td&gt;Always — no action needed (Compute Engine)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rightsizing / Recommender&lt;/td&gt;
&lt;td&gt;flags idle/underused VMs&lt;/td&gt;
&lt;td&gt;Regular reviews; Active Assist&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Storage Lifecycle policies&lt;/td&gt;
&lt;td&gt;auto-tier to Nearline/Coldline/Archive&lt;/td&gt;
&lt;td&gt;Aging data with dropping access frequency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Autoscaling / scale-to-zero&lt;/td&gt;
&lt;td&gt;pay only for what runs&lt;/td&gt;
&lt;td&gt;Spiky/variable traffic → Cloud Run, MIGs, Autopilot&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BigQuery editions vs on-demand&lt;/td&gt;
&lt;td&gt;reservations for heavy, on-demand for variable&lt;/td&gt;
&lt;td&gt;Predictable heavy analytics → capacity/reservations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Budget alerts&lt;/td&gt;
&lt;td&gt;catch overspend early&lt;/td&gt;
&lt;td&gt;Always — set in Cloud Billing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Billing export to BigQuery&lt;/td&gt;
&lt;td&gt;detailed spend analysis &amp;amp; dashboards&lt;/td&gt;
&lt;td&gt;&quot;Analyze / break down cloud spend&quot;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Labels&lt;/td&gt;
&lt;td&gt;tag resources for cost allocation &amp;amp; reporting&lt;/td&gt;
&lt;td&gt;Chargeback / show-back by team/env&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Scenario triggers:&lt;/strong&gt; &quot;Steady 24/7 workload, cut compute cost&quot; → &lt;strong&gt;CUDs&lt;/strong&gt;. &quot;Batch jobs, cost-sensitive, interruptible&quot; → &lt;strong&gt;Spot VMs&lt;/strong&gt;. &quot;Reduce storage cost over time&quot; → &lt;strong&gt;lifecycle policies&lt;/strong&gt;. &quot;Right-size / find waste&quot; → &lt;strong&gt;Recommender / Active Assist&lt;/strong&gt;. &quot;Prevent surprise bills&quot; → &lt;strong&gt;budget alerts&lt;/strong&gt; (they don&apos;t cap spend — they notify).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — CUD vs Spot:&lt;/strong&gt; &lt;strong&gt;CUD&lt;/strong&gt; guarantees capacity + discount but locks you into a 1/3-yr spend commitment (best for baseline). &lt;strong&gt;Spot&lt;/strong&gt; is far cheaper with no commitment but can vanish in 30s (best for fault-tolerant/batch). Many designs combine: CUD for the steady baseline + Spot for burst/batch.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;14 — Business, Process &amp;amp; Governance&lt;/h2&gt;
&lt;p&gt;Domain §4 (~15%, unofficial estimate — Google doesn&apos;t publish weightings) is &lt;strong&gt;not about services&lt;/strong&gt; — it tests architect judgment: stakeholders, process maturity, buy-vs-build, and how responsibility is shared. These questions have no product in the answer; they reward the option that reflects sound engineering-organization practice.&lt;/p&gt;
&lt;h3&gt;People &amp;amp; process&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Stakeholder &amp;amp; change management:&lt;/strong&gt; identify stakeholders early, communicate trade-offs in business terms, and plan training/change so a technically correct design actually gets adopted.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Success = business KPIs&lt;/strong&gt;, not tech metrics. Tie the architecture to measurable outcomes (cost per transaction, time-to-market, latency SLA) and define them up front.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SDLC &amp;amp; DevOps maturity:&lt;/strong&gt; favor CI/CD, IaC, automated testing, and small frequent releases. The &lt;strong&gt;DORA metrics&lt;/strong&gt; — deployment frequency, lead time for changes, change-failure rate, MTTR — are the standard health signals.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Team skills &amp;amp; topology:&lt;/strong&gt; assess current skills and plan upskilling; managed/serverless reduces the ops burden on a stretched team.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Buy vs build&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Default heuristic:&lt;/strong&gt; Prefer &lt;strong&gt;managed services / SaaS (repurchase)&lt;/strong&gt; to remove undifferentiated heavy lifting; build custom only where it is a genuine competitive differentiator. &quot;Reduce operational burden / focus engineers on the product&quot; points to buy/managed.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Shared Responsibility &amp;amp; Shared Fate&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Google secures (&quot;of the cloud&quot;)&lt;/th&gt;
&lt;th&gt;You secure (&quot;in the cloud&quot;)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Hardware, network, hypervisor, physical DCs, managed-service internals&lt;/td&gt;
&lt;td&gt;Your data, IAM &amp;amp; access, configuration, OS/patching (on IaaS), app code&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;The more managed the service, the more responsibility shifts to Google (IaaS → PaaS → serverless).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Shared fate&lt;/strong&gt; goes further: Google actively helps you succeed via secure blueprints, Assured Workloads, and Security Command Center.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Compliance &amp;amp; data governance&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Certifications (ISO 27001, SOC 1/2/3, PCI-DSS, HIPAA, FedRAMP) — find attestations in the &lt;strong&gt;Compliance Reports Manager&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data residency / sovereignty:&lt;/strong&gt; Assured Workloads enforces location + personnel controls; the &lt;strong&gt;org policy resource-locations constraint&lt;/strong&gt; restricts where resources can be created.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Deployment strategies&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Strategy&lt;/th&gt;
&lt;th&gt;How it works&lt;/th&gt;
&lt;th&gt;Trade-off&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Recreate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Stop old, deploy new&lt;/td&gt;
&lt;td&gt;Simplest; causes downtime&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Rolling&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Replace instances gradually&lt;/td&gt;
&lt;td&gt;No downtime; mixed versions during rollout (MIG/GKE default)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Blue/Green&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Full parallel env, switch traffic&lt;/td&gt;
&lt;td&gt;Instant rollback; double the resources briefly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Canary&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Route a small % to the new version first&lt;/td&gt;
&lt;td&gt;Limits blast radius; needs good metrics/automation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;A/B&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Route by attribute to test variants&lt;/td&gt;
&lt;td&gt;Experimentation, not just release safety&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Scenario triggers:&lt;/strong&gt; &quot;Zero downtime, instant rollback&quot; → &lt;strong&gt;Blue/Green&lt;/strong&gt;. &quot;Limit risk / test on real traffic first&quot; → &lt;strong&gt;Canary&lt;/strong&gt;. &quot;No downtime, minimal extra cost&quot; → &lt;strong&gt;Rolling&lt;/strong&gt;. &lt;strong&gt;Cloud Deploy&lt;/strong&gt; automates progressive (canary/rolling) delivery.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;15 — Well-Architected Framework — 6 Pillars&lt;/h2&gt;
&lt;p&gt;Your &lt;strong&gt;default tie-breaker&lt;/strong&gt; when two answers both &quot;work&quot;. Explicitly referenced throughout the exam guide.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Operational Excellence&lt;/strong&gt; — Observability, automation, incident response, deployment discipline.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security, Privacy &amp;amp; Compliance&lt;/strong&gt; — Least privilege, defense in depth, encryption, governance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reliability&lt;/strong&gt; — HA/DR, redundancy, graceful degradation, SLOs &amp;amp; error budgets.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Performance Optimization&lt;/strong&gt; — Right-sizing, autoscaling, caching, managed services.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cost Optimization&lt;/strong&gt; — CapEx→OpEx, commitment discounts, lifecycle tiering, cleanup.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sustainability&lt;/strong&gt; — Region carbon data, efficient utilization, right-sizing.&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;How to use it in questions:&lt;/strong&gt; Stuck between two valid options? Pick the one serving the pillar the scenario stresses: &quot;always available&quot; → reliability; &quot;sensitive data&quot; → security; &quot;reduce spend&quot; → cost. Managed/serverless usually wins on operational excellence.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;16 — Trade-off Master List&lt;/h2&gt;
&lt;p&gt;The decisions examiners most love to test — memorize the &quot;choose X when&quot; trigger.&lt;/p&gt;
&lt;h3&gt;Compute pricing models&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Cheaper:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Spot VMs&lt;/strong&gt; — up to ~91% off, interruptible&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CUDs&lt;/strong&gt; — steady, predictable load&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sustained Use&lt;/strong&gt; — automatic, no commitment&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Autopilot / serverless&lt;/strong&gt; — pay for what runs&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Pricier but safer:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;On-demand VMs&lt;/strong&gt; — no interruption, no commit&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reserved capacity&lt;/strong&gt; — guaranteed availability&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Over-provisioned nodes&lt;/strong&gt; — headroom, waste&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Consistency vs scale (databases)&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Strong consistency:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Spanner&lt;/strong&gt; — global + strong (premium)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cloud SQL / AlloyDB&lt;/strong&gt; — ACID, regional&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Firestore&lt;/strong&gt; — strong within region&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Scale / throughput:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Bigtable&lt;/strong&gt; — huge throughput, no cross-row txns&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;BigQuery&lt;/strong&gt; — analytics scale, not OLTP&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Read replicas&lt;/strong&gt; — scale reads, eventual lag&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Managed vs self-managed&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Default heuristic:&lt;/strong&gt; &lt;strong&gt;Managed / serverless usually beats self-managed&lt;/strong&gt; — less ops = better operational excellence + often lower TCO. Choose self-managed (Compute Engine, self-hosted DB, Dataproc) only when you need OS control, a specific engine/version, licensing, or a low-effort lift-and-shift.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;AI build vs buy&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Escalation ladder:&lt;/strong&gt; &lt;strong&gt;Prebuilt API&lt;/strong&gt; → &lt;strong&gt;Foundation model from Model Garden&lt;/strong&gt; → &lt;strong&gt;RAG / Agent Builder on your data&lt;/strong&gt; → &lt;strong&gt;Fine-tune&lt;/strong&gt; → &lt;strong&gt;Train custom on Agent Platform + AI Hypercomputer&lt;/strong&gt;. Climb only when the cheaper rung can&apos;t meet accuracy/latency/data-control needs.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;17 — Exam-Day Tips&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Read the case studies days before.&lt;/strong&gt; Know each company&apos;s goals, existing tech, and constraints so questions become fast lookups.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Every answer maps to a WAF pillar.&lt;/strong&gt; When two options both work, pick the one serving the pillar the scenario emphasizes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Least privilege &amp;amp; managed services&lt;/strong&gt; are the safe defaults for &quot;best practice&quot; questions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Watch the qualifier:&lt;/strong&gt; &quot;most cost-effective&quot;, &quot;least operational overhead&quot;, &quot;fastest to deploy&quot;, &quot;minimize change&quot;, &quot;global&quot;, &quot;cannot tolerate data loss&quot; — the qualifier decides between otherwise-valid answers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Eliminate deprecated services&lt;/strong&gt; (Cloud Debugger, IoT Core, Deployment Manager) — they&apos;re distractors.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AI questions:&lt;/strong&gt; prefer prebuilt/RAG over custom training unless accuracy demands it; remember &lt;strong&gt;Model Armor&lt;/strong&gt; + &lt;strong&gt;Sensitive Data Protection&lt;/strong&gt; for securing AI.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Global VPC / regional subnets&lt;/strong&gt; — a recurring networking trick; VPC peering is non-transitive.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compliance flags&lt;/strong&gt; (HIPAA, PCI, residency, sovereignty) → &lt;strong&gt;Assured Workloads + CMEK/EKM + VPC-SC&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flag &amp;amp; move on.&lt;/strong&gt; ~2 min/question; mark for review and return.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;18 — Exam FAQs&lt;/h2&gt;
&lt;h3&gt;How hard is the PCA, and how long should I prepare?&lt;/h3&gt;
&lt;p&gt;It&apos;s one of the harder GCP exams — 50–60 questions in 2 hours, heavily scenario-based. Most candidates with 2+ years of cloud experience pass in one attempt after 4–8 focused weeks, with the emphasis on case studies and service trade-offs rather than rote facts.&lt;/p&gt;
&lt;h3&gt;What are the current official case studies?&lt;/h3&gt;
&lt;p&gt;The 2026 pool is &lt;strong&gt;Altostrat Media, Cymbal Retail, EHR Healthcare, and KnightMotives Automotive&lt;/strong&gt; — you get 2 of the 4 on your exam. The older Mountkirk Games / TerramEarth / Helicopter Racing League set has been retired. Read all four in advance and map their requirements to services.&lt;/p&gt;
&lt;h3&gt;Cloud SQL vs Spanner — when do I pick each?&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Cloud SQL&lt;/strong&gt; for standard OLTP in a single region (MySQL/PostgreSQL/SQL Server). &lt;strong&gt;Spanner&lt;/strong&gt; when you need multi-region strong consistency, a 99.999% SLA, or horizontal scale beyond one instance (roughly &amp;gt;1,000 TPS or global writes). &quot;Financial + global&quot; in one sentence is almost always Spanner.&lt;/p&gt;
&lt;h3&gt;GKE Autopilot vs Standard — quick rule?&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Autopilot&lt;/strong&gt; when the scenario prioritizes reduced operational burden — Google manages nodes, scaling, and patching, billed per pod. &lt;strong&gt;Standard&lt;/strong&gt; when you need specific machine types, GPUs/TPUs, or custom node configs. On the exam, &quot;operational simplicity&quot; almost always points to Autopilot.&lt;/p&gt;
&lt;h3&gt;Which storage class for archival / compliance data?&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Archive&lt;/strong&gt; for &amp;lt; once/year (regulatory records), &lt;strong&gt;Coldline&lt;/strong&gt; for &amp;lt; once/quarter, &lt;strong&gt;Nearline&lt;/strong&gt; for &amp;lt; once/month. Use &lt;strong&gt;Object Lifecycle Management&lt;/strong&gt; to auto-transition so you never pay Standard rates for cold data. Colder = cheaper to store but pricier to retrieve.&lt;/p&gt;
&lt;h3&gt;What changed for AI in 2026?&lt;/h3&gt;
&lt;p&gt;Generative AI is now explicitly in scope and the exam is moving from the &lt;strong&gt;Vertex AI&lt;/strong&gt; name to &lt;strong&gt;Gemini Enterprise Agent Platform&lt;/strong&gt;. Expect questions on Model Garden, Agent Builder (RAG), Gemini Cloud Assist, AI Hypercomputer, and securing AI with Model Armor + Sensitive Data Protection. Both old and new product names may appear.&lt;/p&gt;
&lt;h3&gt;Standard vs renewal exam?&lt;/h3&gt;
&lt;p&gt;First-timers and expired certs take the &lt;strong&gt;standard&lt;/strong&gt; exam (2 hrs, $200, 50–60 questions, 2 case studies). If you hold an active cert within the renewal window, you can take the shorter &lt;strong&gt;renewal&lt;/strong&gt; exam (1 hr, $100, 25 questions, with 2 gen-AI case studies available and case-study-weighted questions making up 90–100% of it).&lt;/p&gt;
&lt;h2&gt;Appendix A1 — CLI Quick Reference&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Recognition, not memorization:&lt;/strong&gt; The PCA is a &lt;strong&gt;design&lt;/strong&gt; exam — it won&apos;t ask you to type commands with exact flags (that&apos;s the &lt;strong&gt;Associate Cloud Engineer&lt;/strong&gt; exam). §5.2 only expects you to know &lt;em&gt;which tool does what&lt;/em&gt; and to recognize a command in an answer choice. Learn the &lt;strong&gt;tool-to-service mapping&lt;/strong&gt; below; don&apos;t over-invest here.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;The three CLIs — know the split&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Scope&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;gcloud&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Everything except the two below — compute, IAM, networking, GKE, projects, config&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gcloud compute instances list&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;gcloud storage&lt;/code&gt; (gsutil)&lt;/td&gt;
&lt;td&gt;Cloud Storage objects &amp;amp; buckets&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gcloud storage cp file gs://bucket&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;bq&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;BigQuery datasets, tables, queries&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bq query &apos;SELECT ...&apos;&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;In-cluster GKE objects — after &lt;code&gt;get-credentials&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl get pods&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Commands worth recognizing&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Area&lt;/th&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Config&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gcloud init&lt;/code&gt; / &lt;code&gt;gcloud auth login&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Set up + authenticate the SDK&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Config&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gcloud config set project PROJECT_ID&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Switch the active project&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Projects&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gcloud projects create|list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Create / list projects in the hierarchy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compute&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gcloud compute instances create|list|delete&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Manage individual VMs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compute&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gcloud compute instance-templates create&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Define the VM blueprint for a MIG&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compute&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gcloud compute instance-groups managed create&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Create a MIG (autoscaling + autohealing)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GKE&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gcloud container clusters create --region ...&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Regional cluster = nodes across 3 zones (HA)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GKE&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gcloud container clusters get-credentials NAME&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Fetch kubeconfig → then use &lt;code&gt;kubectl&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IAM&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gcloud projects add-iam-policy-binding PROJECT --member=... --role=roles/...&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Grant a role to a principal (least privilege)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IAM&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gcloud iam service-accounts create NAME&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Create a service-account identity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Storage&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gcloud storage cp | ls | rm&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Copy / list / delete objects (old: &lt;code&gt;gsutil&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BigQuery&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bq mk&lt;/code&gt; · &lt;code&gt;bq load&lt;/code&gt; · &lt;code&gt;bq query&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Make dataset · load data · run SQL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pub/Sub&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gcloud pubsub topics create&lt;/code&gt; / &lt;code&gt;subscriptions create&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Create streaming entry points&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Network&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gcloud compute networks create --subnet-mode=custom&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Custom-mode VPC (global; subnets regional)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Network&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gcloud compute firewall-rules create&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Allow/deny VPC traffic&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The one fact that actually earns points:&lt;/strong&gt; It&apos;s the &lt;strong&gt;tool-to-service mapping&lt;/strong&gt;, not flags: &lt;code&gt;bq&lt;/code&gt; = BigQuery · &lt;code&gt;gcloud storage&lt;/code&gt;/&lt;code&gt;gsutil&lt;/code&gt; = Cloud Storage · &lt;code&gt;kubectl&lt;/code&gt; (after &lt;code&gt;get-credentials&lt;/code&gt;) = inside a GKE cluster. And for provisioning: prefer &lt;strong&gt;Terraform / Infrastructure Manager&lt;/strong&gt; (IaC) over the deprecated &lt;strong&gt;Deployment Manager&lt;/strong&gt;. Also know the emulators — Bigtable, Spanner, Pub/Sub, Firestore — exist for local testing without touching real resources.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Don&apos;t over-study this:&lt;/strong&gt; If you find yourself memorizing exact flag names or output formats, stop — you&apos;re studying for the ACE exam, not PCA. Spend that time on case studies and service trade-offs instead.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Appendix A2 — Editions &amp;amp; Tiers&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Why this matters:&lt;/strong&gt; The exam tests tiers &lt;em&gt;indirectly&lt;/em&gt;: a scenario names a capability (threat detection, global backbone routing, high IOPS) and the right answer depends on knowing which tier provides it. Learn &lt;strong&gt;what unlocks at each tier&lt;/strong&gt;, not the prices.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Security Command Center&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tier&lt;/th&gt;
&lt;th&gt;Unlocks&lt;/th&gt;
&lt;th&gt;Scenario signal&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Standard (free)&lt;/td&gt;
&lt;td&gt;Basic posture — Security Health Analytics (misconfigs, exposed resources), Web Security Scanner custom scans. GCP only.&lt;/td&gt;
&lt;td&gt;&quot;Free dashboard / find misconfigurations&quot;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Premium&lt;/td&gt;
&lt;td&gt;+ Threat detection (Event / Container / VM), &lt;strong&gt;attack-path simulation&lt;/strong&gt;, &lt;strong&gt;compliance monitoring&lt;/strong&gt; (CIS, PCI-DSS, NIST, HIPAA, ISO). Org or project level.&lt;/td&gt;
&lt;td&gt;&quot;Detect active threats / monitor PCI-HIPAA / attack paths&quot;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enterprise&lt;/td&gt;
&lt;td&gt;Multi-cloud CNAPP across &lt;strong&gt;AWS/Azure&lt;/strong&gt;, integrated &lt;strong&gt;Google SecOps&lt;/strong&gt; (SIEM/SOAR), CIEM. Org level only.&lt;/td&gt;
&lt;td&gt;&quot;One security view across GCP + AWS + Azure with SIEM&quot;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The SCC &lt;strong&gt;Enterprise&lt;/strong&gt; tier is scheduled to shut down on &lt;strong&gt;May 21, 2027&lt;/strong&gt;, with those orgs moving to &lt;strong&gt;Premium&lt;/strong&gt;. If a question forces a choice, Premium is the safe &quot;paid tier&quot; default for threat detection + compliance.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Network Service Tiers&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Premium (default):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Traffic rides Google&apos;s &lt;strong&gt;global backbone&lt;/strong&gt; end-to-end&lt;/li&gt;
&lt;li&gt;Supports &lt;strong&gt;global&lt;/strong&gt; load balancing &amp;amp; anycast&lt;/li&gt;
&lt;li&gt;Best performance &amp;amp; reliability&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Standard:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Egresses to public internet near the region&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Regional&lt;/strong&gt; load balancing only&lt;/li&gt;
&lt;li&gt;Cheaper — trade performance/global reach for cost&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trigger:&lt;/strong&gt; &quot;Minimize network egress cost, single-region app&quot; → &lt;strong&gt;Standard tier&lt;/strong&gt;. &quot;Global users, best latency/reliability&quot; → &lt;strong&gt;Premium tier&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Other capability-gated choices&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Choice&lt;/th&gt;
&lt;th&gt;Options (cheaper → pricier / more capable)&lt;/th&gt;
&lt;th&gt;Pick on&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Persistent Disk / Hyperdisk&lt;/td&gt;
&lt;td&gt;pd-standard (HDD) → pd-balanced (default SSD) → pd-ssd → pd-extreme / &lt;strong&gt;Hyperdisk&lt;/strong&gt; (tunable)&lt;/td&gt;
&lt;td&gt;cost vs IOPS/latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BigQuery compute&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;On-demand&lt;/strong&gt; (per-TB scanned, spiky) vs &lt;strong&gt;Editions&lt;/strong&gt; (Standard / Enterprise / Enterprise Plus — slot capacity + autoscale + commitments)&lt;/td&gt;
&lt;td&gt;predictable heavy load → Editions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Firestore&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Native mode&lt;/strong&gt; (real-time sync + offline) vs &lt;strong&gt;Datastore mode&lt;/strong&gt; (server-side, no real-time)&lt;/td&gt;
&lt;td&gt;new apps → Native&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GKE&lt;/td&gt;
&lt;td&gt;Autopilot / Standard modes → &lt;strong&gt;GKE Enterprise (Anthos)&lt;/strong&gt; for fleet/multicloud&lt;/td&gt;
&lt;td&gt;hybrid/multicluster → Enterprise&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud VPN&lt;/td&gt;
&lt;td&gt;Classic VPN (99.9%) → &lt;strong&gt;HA VPN&lt;/strong&gt; (99.99%)&lt;/td&gt;
&lt;td&gt;production → HA VPN&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;Built from the official Google Cloud exam guide and certification page. Verify current details at &lt;a href=&quot;http://cloud.google.com/learn/certification/cloud-architect&quot;&gt;cloud.google.com/learn/certification/cloud-architect&lt;/a&gt;. Independent study aid, not affiliated with Google.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>gcp</category><category>cloud-architect</category><category>certification</category><category>study-guide</category></item><item><title>MLOps &amp; AI Production Operations: The 2026 Guide</title><link>https://riddam.github.io/guides/mlops-production-guide/</link><guid isPermaLink="true">https://riddam.github.io/guides/mlops-production-guide/</guid><description>An end-to-end guide to CI/CD and production operations for AI systems, covering the MLOps pipeline, tooling, cloud infrastructure, deployment and release patterns, monitoring, drift, LLMOps, cost optimization, and governance.</description><pubDate>Thu, 04 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;How I think about taking AI from a working notebook to something that runs reliably in production — the full path from commit to monitoring, and the decisions that matter along the way.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;01 — DevOps vs MLOps: What&apos;s Different&lt;/h2&gt;
&lt;p&gt;MLOps extends DevOps principles to machine learning — but ML systems have fundamentally different properties that traditional CI/CD wasn&apos;t built for. Everything here assumes the architecture upstream of it is already settled; that groundwork is &lt;a href=&quot;https://riddam.github.io/guides/ai-architecture-master-guide/&quot;&gt;the AI architecture field guide&lt;/a&gt;.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Traditional DevOps&lt;/th&gt;
&lt;th&gt;MLOps&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;What you version&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Code&lt;/td&gt;
&lt;td&gt;Code + data + model weights + hyperparameters + environment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;What you test&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Correctness (unit/integration)&lt;/td&gt;
&lt;td&gt;Correctness + accuracy + fairness + drift + latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;What degrades&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Bugs (introduced by code changes)&lt;/td&gt;
&lt;td&gt;Bugs + &lt;strong&gt;model drift&lt;/strong&gt; (performance degrades even without code changes, because real-world data shifts)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Deployment artifact&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Container / binary&lt;/td&gt;
&lt;td&gt;Container + model weights + feature schema + serving config&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Rollback&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Revert to last good container&lt;/td&gt;
&lt;td&gt;Revert model version + verify feature compatibility + validate data pipeline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Monitoring&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Latency, errors, CPU, memory&lt;/td&gt;
&lt;td&gt;All the above + prediction quality + data distribution + feature drift + business KPIs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The fundamental difference:&lt;/strong&gt; In software, code is the complete specification — if the code hasn&apos;t changed, the behavior hasn&apos;t changed. In ML, the &lt;strong&gt;data is part of the specification&lt;/strong&gt; — the model can degrade silently even when no code changes, because the real-world data distribution shifted. This is why MLOps adds &lt;strong&gt;continuous training&lt;/strong&gt; and &lt;strong&gt;continuous monitoring&lt;/strong&gt; to the DevOps loops.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;02 — The MLOps Pipeline (End-to-End)&lt;/h2&gt;
&lt;p&gt;The production MLOps pipeline:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Data ingestion (sources → lake)
  → Data validation (schema + quality)
  → Feature engineering (feature store)
  → Model training (GPU/TPU cluster)
  → Evaluation (metrics + tests)
  → Model registry (versioning)
  → CI/CD gate (approve / reject)
  → Deployment (container + endpoint)
  → Monitoring (drift + quality)
  → ⤴ Retrain
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;What each stage does&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stage&lt;/th&gt;
&lt;th&gt;What happens&lt;/th&gt;
&lt;th&gt;Key tool(s)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Data ingestion&lt;/td&gt;
&lt;td&gt;Collect data from sources (DBs, APIs, streams, files) into storage&lt;/td&gt;
&lt;td&gt;Pub/Sub, Kinesis, Airflow, dbt&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data validation&lt;/td&gt;
&lt;td&gt;Schema checks, null detection, distribution validation — reject bad data before it reaches training&lt;/td&gt;
&lt;td&gt;Great Expectations, TFX Data Validation, Evidently&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Feature engineering&lt;/td&gt;
&lt;td&gt;Transform raw data into model features; store in feature store for consistency between training and serving&lt;/td&gt;
&lt;td&gt;Feast, Vertex AI Feature Store, SageMaker Feature Store&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model training&lt;/td&gt;
&lt;td&gt;Run training job on GPU/TPU cluster; track experiments, hyperparameters, metrics&lt;/td&gt;
&lt;td&gt;PyTorch/TF, MLflow, W&amp;amp;B, cloud training services&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Evaluation&lt;/td&gt;
&lt;td&gt;Compare new model against baseline on held-out test set + fairness/bias checks&lt;/td&gt;
&lt;td&gt;MLflow, Evidently, custom eval harnesses&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model registry&lt;/td&gt;
&lt;td&gt;Version and store the trained model with metadata, lineage, and lifecycle stage (staging → production)&lt;/td&gt;
&lt;td&gt;MLflow Model Registry, cloud registries&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CI/CD gate&lt;/td&gt;
&lt;td&gt;Automated tests pass → human approval (optional) → promote to production&lt;/td&gt;
&lt;td&gt;GitHub Actions, GitLab CI, Jenkins, cloud pipelines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment&lt;/td&gt;
&lt;td&gt;Package model into container, deploy to serving endpoint (real-time/batch/serverless)&lt;/td&gt;
&lt;td&gt;Docker, KServe, Seldon, cloud endpoints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Monitoring&lt;/td&gt;
&lt;td&gt;Track prediction quality, data drift, latency, cost, business KPIs — trigger retraining when needed&lt;/td&gt;
&lt;td&gt;Evidently, Arize, Langfuse, Prometheus+Grafana&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The 20/80 rule:&lt;/strong&gt; Training a model is ~20% of the effort. The other 80% is testing, packaging, versioning, deploying, monitoring, and maintaining it. Teams that treat ML like one-off experiments instead of production software always fail at scale.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;03 — CI/CD for ML: The Three Loops&lt;/h2&gt;
&lt;p&gt;Traditional DevOps has one CI/CD loop (code change → test → deploy). ML has &lt;strong&gt;three&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Loop 1 — Continuous Integration (code):&lt;/strong&gt; code change → lint + unit tests → integration tests → data validation tests → model training tests (small subset)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Loop 2 — Continuous Training (model):&lt;/strong&gt; new data arrives or drift detected → feature pipeline runs → training job executes → evaluation against baseline → register new model version&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Loop 3 — Continuous Deployment + Monitoring:&lt;/strong&gt; promote model to staging → canary/shadow deploy → monitor quality + drift → auto-rollback if degraded → trigger retraining if drift exceeds threshold&lt;/p&gt;
&lt;h3&gt;Google&apos;s MLOps maturity levels&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Level&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Automation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Level 0&lt;/td&gt;
&lt;td&gt;Manual — data scientists train in notebooks, hand-off model as a file, manual deployment&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Level 1&lt;/td&gt;
&lt;td&gt;ML pipeline automation — automated training pipeline, but deployment is still manual or semi-auto&lt;/td&gt;
&lt;td&gt;Training automated&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Level 2&lt;/td&gt;
&lt;td&gt;CI/CD for ML — automated testing, automated deployment, continuous training triggered by data/drift, monitoring closes the loop&lt;/td&gt;
&lt;td&gt;Full automation&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Target:&lt;/strong&gt; Most teams start at Level 0. The goal is &lt;strong&gt;Level 2&lt;/strong&gt; — where new data automatically triggers retraining, evaluation gates ensure quality, and deployment is hands-free with auto-rollback. Level 1 (automated training, manual deploy) is a practical intermediate milestone.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;04 — DevOps / MLOps Tool Catalog&lt;/h2&gt;
&lt;p&gt;Organized by function. Pick one tool per row — don&apos;t try to use all of them.&lt;/p&gt;
&lt;h3&gt;Core DevOps tools (you still need these)&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;Tools&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Version control&lt;/td&gt;
&lt;td&gt;Git (GitHub, GitLab, Bitbucket)&lt;/td&gt;
&lt;td&gt;Foundation for everything — code, configs, IaC&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CI/CD runner&lt;/td&gt;
&lt;td&gt;GitHub Actions, GitLab CI, Jenkins, CircleCI&lt;/td&gt;
&lt;td&gt;GitHub Actions is the default for most teams in 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Containers&lt;/td&gt;
&lt;td&gt;Docker, Podman&lt;/td&gt;
&lt;td&gt;Containerize everything: training, serving, pipelines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Container orchestration&lt;/td&gt;
&lt;td&gt;Kubernetes (GKE, EKS, AKS), Docker Compose&lt;/td&gt;
&lt;td&gt;K8s for production scale; Compose for local dev&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Container registry&lt;/td&gt;
&lt;td&gt;Artifact Registry (GCP), ECR (AWS), ACR (Azure), Docker Hub&lt;/td&gt;
&lt;td&gt;Store training + serving container images&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Infrastructure as Code&lt;/td&gt;
&lt;td&gt;Terraform, Pulumi, CloudFormation, Bicep&lt;/td&gt;
&lt;td&gt;Terraform is cross-cloud default; use cloud-native for single-cloud&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Secrets management&lt;/td&gt;
&lt;td&gt;Vault, Secret Manager (GCP/AWS), Azure Key Vault&lt;/td&gt;
&lt;td&gt;Never hardcode API keys, model weights paths, DB creds&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;ML-specific tools&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;Tools&lt;/th&gt;
&lt;th&gt;Choose when&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Experiment tracking&lt;/td&gt;
&lt;td&gt;MLflow, Weights &amp;amp; Biases, Comet, Neptune&lt;/td&gt;
&lt;td&gt;MLflow (open-source, self-host) is the default; W&amp;amp;B for teams wanting managed + collaboration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data versioning&lt;/td&gt;
&lt;td&gt;DVC, LakeFS, Delta Lake&lt;/td&gt;
&lt;td&gt;DVC for small teams; LakeFS/Delta for lake-scale versioning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Feature store&lt;/td&gt;
&lt;td&gt;Feast, Tecton, Vertex AI/SageMaker built-in&lt;/td&gt;
&lt;td&gt;Feast (open-source) or cloud-native for managed simplicity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pipeline orchestration&lt;/td&gt;
&lt;td&gt;Kubeflow Pipelines, Airflow, Prefect, Dagster, cloud pipelines&lt;/td&gt;
&lt;td&gt;Airflow for general orchestration; Kubeflow for K8s-native ML pipelines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model registry&lt;/td&gt;
&lt;td&gt;MLflow Model Registry, cloud registries&lt;/td&gt;
&lt;td&gt;MLflow for portability; cloud-native for tight integration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model serving&lt;/td&gt;
&lt;td&gt;vLLM, TGI, KServe, Seldon Core, BentoML, cloud endpoints&lt;/td&gt;
&lt;td&gt;vLLM/TGI for LLM serving; KServe for K8s; cloud endpoints for managed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data quality / validation&lt;/td&gt;
&lt;td&gt;Great Expectations, Evidently, Pandera&lt;/td&gt;
&lt;td&gt;Great Expectations for schema; Evidently for drift + quality reports&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model format&lt;/td&gt;
&lt;td&gt;ONNX, SafeTensors, GGUF, TorchScript&lt;/td&gt;
&lt;td&gt;ONNX for portability; SafeTensors for safe LLM weights; GGUF for local inference&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;LLM-specific tools&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;Tools&lt;/th&gt;
&lt;th&gt;Choose when&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;LLM observability&lt;/td&gt;
&lt;td&gt;Langfuse, LangSmith, Arize Phoenix, Helicone&lt;/td&gt;
&lt;td&gt;Langfuse (open-source, self-host); LangSmith (LangChain teams); Arize (RAG debugging)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LLM gateway / proxy&lt;/td&gt;
&lt;td&gt;LiteLLM, Portkey, TrueFoundry Gateway, custom&lt;/td&gt;
&lt;td&gt;Multi-provider routing, failover, cost tracking, rate limiting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prompt management&lt;/td&gt;
&lt;td&gt;Langfuse, PromptLayer, Humanloop, Agenta&lt;/td&gt;
&lt;td&gt;Version prompts like code; A/B test prompt variants&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LLM evaluation&lt;/td&gt;
&lt;td&gt;DeepEval / Confident AI (its managed platform), RAGAS, custom judges&lt;/td&gt;
&lt;td&gt;DeepEval / RAGAS for RAG eval; LLM-as-judge for generation quality&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vector database&lt;/td&gt;
&lt;td&gt;Qdrant, Pinecone, Weaviate, Chroma, pgvector&lt;/td&gt;
&lt;td&gt;Qdrant (greenfield); pgvector (existing Postgres); Pinecone (managed)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Starter stack (if you&apos;re choosing today):&lt;/strong&gt; &lt;strong&gt;Git + GitHub Actions + Docker + Terraform + MLflow + Evidently + vLLM + Langfuse + Qdrant&lt;/strong&gt; covers 90% of production needs for both traditional ML and LLM systems. Add Kubernetes and Feast as you scale. Avoid tool sprawl — one tool per function.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;05 — Cloud Infrastructure Selection&lt;/h2&gt;
&lt;h3&gt;Training infrastructure&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;th&gt;Trade-off&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cloud managed (SageMaker/Vertex/Azure ML)&lt;/td&gt;
&lt;td&gt;Most teams — spin up training, tear down after&lt;/td&gt;
&lt;td&gt;20–40% premium over raw VMs but zero cluster management&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Raw GPU VMs + custom stack&lt;/td&gt;
&lt;td&gt;Teams with MLOps expertise, steady high utilization&lt;/td&gt;
&lt;td&gt;Cheapest per hour but you manage scaling, fault tolerance, storage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TPU pods (GCP only)&lt;/td&gt;
&lt;td&gt;Large-scale training (&amp;gt;10B params), research&lt;/td&gt;
&lt;td&gt;Best $/FLOP for large models; requires JAX/XLA expertise&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spot/preemptible instances&lt;/td&gt;
&lt;td&gt;Fault-tolerant training (checkpoint frequently)&lt;/td&gt;
&lt;td&gt;60–91% cheaper but can be interrupted; use with checkpointing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Inference infrastructure&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pattern&lt;/th&gt;
&lt;th&gt;Latency&lt;/th&gt;
&lt;th&gt;Cost&lt;/th&gt;
&lt;th&gt;Use when&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Real-time endpoint (always-on)&lt;/td&gt;
&lt;td&gt;Low (ms)&lt;/td&gt;
&lt;td&gt;Steady — pay even at zero traffic&lt;/td&gt;
&lt;td&gt;User-facing, low-latency requirements&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Serverless inference (scale-to-zero)&lt;/td&gt;
&lt;td&gt;Higher (cold start)&lt;/td&gt;
&lt;td&gt;Pay per request&lt;/td&gt;
&lt;td&gt;Dev/staging, low-traffic, variable demand&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Batch inference&lt;/td&gt;
&lt;td&gt;Hours&lt;/td&gt;
&lt;td&gt;Cheapest per prediction&lt;/td&gt;
&lt;td&gt;Overnight scoring, recommendations, ETL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-model endpoint&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;td&gt;Shared infra (up to 80% savings)&lt;/td&gt;
&lt;td&gt;Many models with moderate traffic each&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edge inference&lt;/td&gt;
&lt;td&gt;Lowest&lt;/td&gt;
&lt;td&gt;Device cost&lt;/td&gt;
&lt;td&gt;Offline, privacy-sensitive, real-time on-device&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Infrastructure decision tree&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;Answer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;User-facing, &amp;lt;100ms latency required?&lt;/td&gt;
&lt;td&gt;Real-time endpoint (GPU)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Variable traffic, can tolerate cold starts?&lt;/td&gt;
&lt;td&gt;Serverless inference&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bulk scoring, overnight, not time-sensitive?&lt;/td&gt;
&lt;td&gt;Batch inference (cheapest)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Many models, moderate traffic each?&lt;/td&gt;
&lt;td&gt;Multi-model endpoint&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Privacy / offline / on-device?&lt;/td&gt;
&lt;td&gt;Edge (quantized model)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — managed vs self-hosted serving:&lt;/strong&gt; &lt;strong&gt;Managed endpoint&lt;/strong&gt; (SageMaker/Vertex/Azure ML) = autoscaling, monitoring, blue-green deployment built in — but higher per-hour cost and less control. &lt;strong&gt;Self-hosted&lt;/strong&gt; (vLLM on K8s) = cheapest at scale, full control over batching/quantization — but you build your own scaling, health checks, and rollback. Start managed; migrate to self-hosted when monthly inference spend exceeds ~$10K and you have dedicated ops capacity.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;06 — Model Deployment Patterns&lt;/h2&gt;
&lt;p&gt;The model packaging and deployment pipeline:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Trained model (from registry)
  → Containerize (Docker + serving runtime)
  → Push to registry (ECR / Artifact Registry)
  → Deploy to endpoint (real-time / batch / serverless)
  → Health check (smoke test + canary)
  → Live traffic
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Serving runtimes for LLMs&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Runtime&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;th&gt;Key feature&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;vLLM&lt;/td&gt;
&lt;td&gt;Production LLM inference — the 2026 default&lt;/td&gt;
&lt;td&gt;PagedAttention, continuous batching, OpenAI-compatible API, ~2–4x throughput vs naive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TGI (Text Generation Inference)&lt;/td&gt;
&lt;td&gt;Hugging Face models, production serving&lt;/td&gt;
&lt;td&gt;Tensor parallelism, watermarking, streaming&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ollama&lt;/td&gt;
&lt;td&gt;Local development and testing&lt;/td&gt;
&lt;td&gt;One-command local LLM serving; not for production&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TensorRT-LLM&lt;/td&gt;
&lt;td&gt;Maximum NVIDIA GPU throughput&lt;/td&gt;
&lt;td&gt;NVIDIA-optimized; best throughput but NVIDIA-only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud endpoints&lt;/td&gt;
&lt;td&gt;Managed, zero-ops serving&lt;/td&gt;
&lt;td&gt;SageMaker/Vertex/Azure ML handle everything&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;07 — Release Strategies for Models&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Strategy&lt;/th&gt;
&lt;th&gt;How it works&lt;/th&gt;
&lt;th&gt;Use when&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Shadow deploy&lt;/td&gt;
&lt;td&gt;New model receives real traffic but its predictions aren&apos;t served to users — only logged for comparison&lt;/td&gt;
&lt;td&gt;First deployment of a new model; validate on real data without risk&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Canary release&lt;/td&gt;
&lt;td&gt;Route 5–10% of traffic to new model; watch metrics; gradually increase&lt;/td&gt;
&lt;td&gt;Model updates; limit blast radius&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Blue/green&lt;/td&gt;
&lt;td&gt;Two full environments; instant switch + instant rollback&lt;/td&gt;
&lt;td&gt;Critical models where fast rollback is essential&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A/B testing&lt;/td&gt;
&lt;td&gt;Route traffic by user segment; measure business outcomes over weeks&lt;/td&gt;
&lt;td&gt;Competing model architectures; product experiments&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-armed bandit&lt;/td&gt;
&lt;td&gt;Dynamically shift traffic toward the better-performing model variant&lt;/td&gt;
&lt;td&gt;Recommendation / ranking models where real-time optimization matters&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;ML-specific release difference:&lt;/strong&gt; In software, a canary catches code bugs. In ML, a canary catches &lt;strong&gt;accuracy degradation under real traffic&lt;/strong&gt; — which is much harder to detect because the model returns HTTP 200 even when its predictions are wrong. You need &lt;strong&gt;quality metrics&lt;/strong&gt; (accuracy, latency percentiles, business KPIs) in your canary monitoring, not just error rates.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;08 — Monitoring &amp;amp; Observability&lt;/h2&gt;
&lt;p&gt;ML monitoring has &lt;strong&gt;four layers&lt;/strong&gt; — each catches different failure modes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Layer 1 — Infrastructure monitoring (DevOps standard):&lt;/strong&gt; CPU/GPU utilization, memory, latency (p50/p95/p99), error rate, throughput (QPS), disk/network&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Layer 2 — Model performance monitoring (ML-specific):&lt;/strong&gt; prediction accuracy, precision / recall / F1, confidence distribution, prediction vs actual (when labels arrive)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Layer 3 — Data / feature monitoring (drift detection):&lt;/strong&gt; input feature distributions, data schema validation, missing value rates, statistical drift tests (PSI, KL, JS)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Layer 4 — Business KPI monitoring (the only one that really matters):&lt;/strong&gt; conversion rate, revenue impact, customer satisfaction, false positive cost, escalation rate&lt;/p&gt;
&lt;h3&gt;Monitoring tool stack&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Open-source&lt;/th&gt;
&lt;th&gt;Managed&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Infrastructure&lt;/td&gt;
&lt;td&gt;Prometheus + Grafana&lt;/td&gt;
&lt;td&gt;Datadog, New Relic, CloudWatch, Cloud Monitoring&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model performance&lt;/td&gt;
&lt;td&gt;Evidently, MLflow&lt;/td&gt;
&lt;td&gt;Arize, WhyLabs, SageMaker Model Monitor, Vertex AI Model Monitoring&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data/drift&lt;/td&gt;
&lt;td&gt;Evidently, Great Expectations&lt;/td&gt;
&lt;td&gt;Arize, WhyLabs, cloud monitoring&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Business KPIs&lt;/td&gt;
&lt;td&gt;Grafana dashboards, custom metrics&lt;/td&gt;
&lt;td&gt;Looker, Power BI, Datadog Business Monitoring&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LLM-specific&lt;/td&gt;
&lt;td&gt;Langfuse, Arize Phoenix&lt;/td&gt;
&lt;td&gt;LangSmith, Helicone, Confident AI&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Common mistake:&lt;/strong&gt; Teams monitor Layer 1 (infrastructure) and think they&apos;re covered. The model returns HTTP 200 even when predictions are garbage. &lt;strong&gt;Infrastructure can be perfectly healthy while the model is silently failing.&lt;/strong&gt; You need all four layers.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;09 — Model Drift &amp;amp; Retraining&lt;/h2&gt;
&lt;h3&gt;Three types of drift&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;What shifts&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;th&gt;Detection&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Data drift (covariate)&lt;/td&gt;
&lt;td&gt;Input feature distributions change&lt;/td&gt;
&lt;td&gt;Customer demographics shift; new product categories&lt;/td&gt;
&lt;td&gt;Statistical tests (PSI, KL divergence, JS distance) on input features&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Concept drift&lt;/td&gt;
&lt;td&gt;Relationship between inputs and outputs changes&lt;/td&gt;
&lt;td&gt;What &quot;spam&quot; looks like evolves; customer preferences shift&lt;/td&gt;
&lt;td&gt;Monitor prediction accuracy vs actual labels (delayed)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prediction drift&lt;/td&gt;
&lt;td&gt;Output distribution changes&lt;/td&gt;
&lt;td&gt;Model suddenly predicts mostly one class&lt;/td&gt;
&lt;td&gt;Monitor output distribution (class balance, score histogram)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Retraining strategies&lt;/h3&gt;
&lt;p&gt;Whichever trigger you pick, what actually runs is a training job — the techniques, data curation, and eval gates behind it are in &lt;a href=&quot;https://riddam.github.io/guides/model-training-finetuning-eval/&quot;&gt;model training, fine-tuning and evaluation&lt;/a&gt;.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Strategy&lt;/th&gt;
&lt;th&gt;When to use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Scheduled (time-based)&lt;/td&gt;
&lt;td&gt;Stable environments; retrain weekly/monthly regardless. Simple, predictable.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Drift-triggered&lt;/td&gt;
&lt;td&gt;When drift metrics cross a threshold → automatically kick off retraining pipeline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Performance-triggered&lt;/td&gt;
&lt;td&gt;When accuracy/business KPI drops below a threshold (requires ground truth labels)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Continuous training&lt;/td&gt;
&lt;td&gt;Models retrain on every new data batch (streaming or micro-batch). Most mature but complex.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Trade-off — retrain frequency:&lt;/strong&gt; More frequent = more current model, less drift — but more compute cost, more operational complexity, and more risk of training on noisy/insufficient data. Less frequent = cheaper, simpler — but model degrades between retrains. Match frequency to data volatility: fraud models retrain weekly, product recs daily, medical models with regulatory review quarterly.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;10 — LLMOps: What&apos;s Different for LLMs&lt;/h2&gt;
&lt;p&gt;LLMs add new concerns that traditional MLOps doesn&apos;t cover well. Think of LLMOps as an extension layer.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Concern&lt;/th&gt;
&lt;th&gt;Traditional MLOps&lt;/th&gt;
&lt;th&gt;LLMOps (what&apos;s new)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;What you version&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Code + data + model weights&lt;/td&gt;
&lt;td&gt;+ &lt;strong&gt;prompts&lt;/strong&gt; (system prompt, few-shot examples, templates)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Testing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Accuracy metrics on test set&lt;/td&gt;
&lt;td&gt;+ &lt;strong&gt;eval harnesses&lt;/strong&gt; (faithfulness, hallucination, safety, tool-use accuracy)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Deployment artifact&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Containerized model&lt;/td&gt;
&lt;td&gt;Often just &lt;strong&gt;API calls&lt;/strong&gt; to a provider + prompt config — no weights to deploy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Compute hours for training + inference&lt;/td&gt;
&lt;td&gt;+ &lt;strong&gt;per-token costs&lt;/strong&gt; that scale with prompt length and output length&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Failure mode&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Accuracy drops silently&lt;/td&gt;
&lt;td&gt;+ &lt;strong&gt;hallucination&lt;/strong&gt; (confidently wrong), &lt;strong&gt;prompt injection&lt;/strong&gt;, &lt;strong&gt;tool misuse&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Monitoring&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Feature drift, accuracy&lt;/td&gt;
&lt;td&gt;+ &lt;strong&gt;semantic drift&lt;/strong&gt; (embedding space shifts), &lt;strong&gt;prompt regression&lt;/strong&gt;, &lt;strong&gt;retrieval quality&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;LLMOps pipeline additions&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;Prompt versioning (track + A/B test)
  → LLM evaluation (judge + metrics)
  → Prompt caching (90% cheaper reads)
  → Model gateway (route + failover)
  → Guardrails (input/output filters)
  → LLM observability (traces + quality scores)
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;LLM observability: what to monitor&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Quality metrics:&lt;/strong&gt; faithfulness (is the output grounded in context?), relevance (does it answer the question?), safety (no toxicity/PII/bias).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;RAG metrics:&lt;/strong&gt; retrieval precision, context relevance, groundedness — is the retrieval pipeline returning useful chunks?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Operational metrics:&lt;/strong&gt; tokens per request, time to first token (TTFT), cache hit rate, cost per session, agent step count.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Drift metrics:&lt;/strong&gt; embedding drift (semantic shift in queries/outputs), prompt regression (quality drops after prompt edit), model version regression.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Agent metrics:&lt;/strong&gt; tool selection accuracy, planning quality, loop count, escalation rate.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The key insight:&lt;/strong&gt; LLMs fail silently — a hallucinated answer returns HTTP 200. Infrastructure monitoring &lt;em&gt;cannot&lt;/em&gt; catch this. You need &lt;strong&gt;quality scoring on every trace&lt;/strong&gt; (or a sample). The best practice is to run an LLM-as-judge on 5–10% of production traces and alert on statistically significant quality drops.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;11 — Cost Optimization&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Lever&lt;/th&gt;
&lt;th&gt;Savings&lt;/th&gt;
&lt;th&gt;How&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Model right-sizing&lt;/td&gt;
&lt;td&gt;60–80%&lt;/td&gt;
&lt;td&gt;Use Haiku for routing, Sonnet for main work, Opus only for hardest tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prompt caching&lt;/td&gt;
&lt;td&gt;90% on cached reads&lt;/td&gt;
&lt;td&gt;Cache static system prompts, tool definitions, reference docs. Default TTL is 5 minutes; a longer option exists at a higher write premium, which pays off only for traffic bursty enough to otherwise let the cache expire&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Batch API&lt;/td&gt;
&lt;td&gt;50%&lt;/td&gt;
&lt;td&gt;Async processing for non-real-time workloads (24-hr window)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spot/preemptible GPUs&lt;/td&gt;
&lt;td&gt;60–91%&lt;/td&gt;
&lt;td&gt;For training jobs with checkpointing; not for serving&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Quantization&lt;/td&gt;
&lt;td&gt;2–4x throughput&lt;/td&gt;
&lt;td&gt;INT8/INT4 quantization reduces model size; slight accuracy trade-off&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Token budgets&lt;/td&gt;
&lt;td&gt;Variable&lt;/td&gt;
&lt;td&gt;Set per-user/per-team/per-project token limits; alert on anomalies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Progressive summarization&lt;/td&gt;
&lt;td&gt;Variable&lt;/td&gt;
&lt;td&gt;Compress older conversation turns; reduces per-request token count&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Committed/reserved capacity&lt;/td&gt;
&lt;td&gt;30–70%&lt;/td&gt;
&lt;td&gt;SageMaker Savings Plans, GCP CUDs, Azure EA for steady-state workloads&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Auto-scaling + scale-to-zero&lt;/td&gt;
&lt;td&gt;Variable&lt;/td&gt;
&lt;td&gt;Serverless inference for dev/staging; autoscale production endpoints&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Measure cost per outcome, not cost per token:&lt;/strong&gt; A cheaper model that gets the answer wrong 30% of the time costs &lt;em&gt;more&lt;/em&gt; than an expensive model that&apos;s right 95% of the time — because you pay for retries, escalations, and lost customers. Track &lt;strong&gt;cost per successful resolution&lt;/strong&gt;, not just token spend.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;12 — Security &amp;amp; Governance&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Version everything:&lt;/strong&gt; code (Git), data (DVC/LakeFS), models (MLflow registry), prompts (Langfuse/version control), infrastructure (Terraform). If you can&apos;t reproduce it, you can&apos;t audit it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Access control:&lt;/strong&gt; RBAC on model registry (who can promote to production?), IAM on training resources, API auth on serving endpoints.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data lineage:&lt;/strong&gt; track which data trained which model, which model is serving which endpoint. Metadata stores (MLflow, cloud registries) maintain this.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Audit trail:&lt;/strong&gt; log every training run, evaluation result, deployment, and rollback. Required for EU AI Act, HIPAA, SOC2.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model cards:&lt;/strong&gt; document each model&apos;s purpose, training data, known limitations, fairness evaluations, and intended use. This is both good practice and increasingly required by regulation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Supply chain security:&lt;/strong&gt; scan model weights for trojans (backdoors injected during training). Don&apos;t download untrusted models from the internet without verification. Use SafeTensors format, not pickle.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prompt injection defense:&lt;/strong&gt; input validation + output verification + separation of trusted/untrusted content + guardrail hooks.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The EU AI Act:&lt;/strong&gt; High-risk AI systems (Annex III) must demonstrate: transparency, explainability, human oversight, data governance, accuracy/robustness testing, and a conformity assessment. Note the timeline has shifted — the May 2026 &quot;Digital Omnibus&quot; postponed the high-risk (Annex III) obligations from August 2, 2026 to December 2, 2027, so the near-term compliance deadline is no longer 2026. That&apos;s more runway, not a reprieve: building MLOps pipelines that version, test, monitor, and audit is how you demonstrate compliance, and it&apos;s far easier to bake in now than to retrofit later. &lt;strong&gt;If your pipeline can&apos;t reproduce a training run and explain a prediction, you won&apos;t be EU AI Act compliant when the obligations land.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;13 — Trade-off Master Reference&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Decision&lt;/th&gt;
&lt;th&gt;Option A&lt;/th&gt;
&lt;th&gt;Option B&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Managed platform vs self-hosted&lt;/td&gt;
&lt;td&gt;SageMaker / Vertex / Azure ML&lt;/td&gt;
&lt;td&gt;Raw VMs + custom stack&lt;/td&gt;
&lt;td&gt;Managed unless &amp;gt;$10K/mo + dedicated MLOps team&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Training on spot vs on-demand&lt;/td&gt;
&lt;td&gt;Spot (60–91% off)&lt;/td&gt;
&lt;td&gt;On-demand (guaranteed)&lt;/td&gt;
&lt;td&gt;Spot with checkpointing for training; on-demand for serving&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Real-time vs batch inference&lt;/td&gt;
&lt;td&gt;Real-time endpoint&lt;/td&gt;
&lt;td&gt;Batch transform&lt;/td&gt;
&lt;td&gt;Real-time for user-facing; batch for scoring/ETL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model serving: vLLM vs managed&lt;/td&gt;
&lt;td&gt;Self-hosted vLLM on K8s&lt;/td&gt;
&lt;td&gt;Cloud managed endpoint&lt;/td&gt;
&lt;td&gt;Managed to start; self-hosted when scale justifies ops cost&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Experiment tracking&lt;/td&gt;
&lt;td&gt;MLflow (open-source)&lt;/td&gt;
&lt;td&gt;W&amp;amp;B (managed)&lt;/td&gt;
&lt;td&gt;MLflow for portability and cost; W&amp;amp;B for team collaboration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pipeline orchestration&lt;/td&gt;
&lt;td&gt;Airflow / Prefect&lt;/td&gt;
&lt;td&gt;Cloud-native (Vertex/SageMaker Pipelines)&lt;/td&gt;
&lt;td&gt;Cloud-native for single-cloud; Airflow for multi-cloud&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Monitoring: open-source vs managed&lt;/td&gt;
&lt;td&gt;Prometheus + Grafana + Evidently&lt;/td&gt;
&lt;td&gt;Datadog + Arize&lt;/td&gt;
&lt;td&gt;Open-source for cost; managed for faster setup&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LLM observability&lt;/td&gt;
&lt;td&gt;Langfuse (self-hosted)&lt;/td&gt;
&lt;td&gt;LangSmith / Arize (managed)&lt;/td&gt;
&lt;td&gt;Langfuse for data sovereignty; managed for speed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Retraining trigger&lt;/td&gt;
&lt;td&gt;Scheduled (time-based)&lt;/td&gt;
&lt;td&gt;Drift-triggered (automated)&lt;/td&gt;
&lt;td&gt;Scheduled to start; drift-triggered at maturity (Level 2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model release strategy&lt;/td&gt;
&lt;td&gt;Blue/green (instant rollback)&lt;/td&gt;
&lt;td&gt;Canary (gradual rollout)&lt;/td&gt;
&lt;td&gt;Shadow first → canary for ongoing updates → blue/green for critical&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IaC tool&lt;/td&gt;
&lt;td&gt;Terraform (multi-cloud)&lt;/td&gt;
&lt;td&gt;CloudFormation / Bicep (cloud-native)&lt;/td&gt;
&lt;td&gt;Terraform unless deeply single-cloud&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Container orchestration&lt;/td&gt;
&lt;td&gt;Kubernetes&lt;/td&gt;
&lt;td&gt;Serverless (Cloud Run / Lambda)&lt;/td&gt;
&lt;td&gt;K8s for complex serving; serverless for simple functions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CI/CD platform&lt;/td&gt;
&lt;td&gt;GitHub Actions&lt;/td&gt;
&lt;td&gt;GitLab CI / Jenkins&lt;/td&gt;
&lt;td&gt;GitHub Actions is the 2026 default; Jenkins for legacy/complex&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data versioning&lt;/td&gt;
&lt;td&gt;DVC (lightweight)&lt;/td&gt;
&lt;td&gt;LakeFS / Delta (lake-scale)&lt;/td&gt;
&lt;td&gt;DVC for small teams; LakeFS when data exceeds TB scale&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;Built from current industry practice and production patterns. Independent reference — not affiliated with any vendor. Tools and pricing change rapidly; verify before procurement decisions.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>mlops</category><category>ci-cd</category><category>llmops</category><category>cloud-infrastructure</category></item></channel></rss>