THE CHEAT SHEET
The final judgment of every experiment, in one place — the decision each post lands on, stripped of the derivation. Skim before an interview; tap a post to relive how it was earned.
17 verdicts · 5 quests
Q-01
Building RAG from Scratch
Test the retriever before you trust the generator. Nt 10 BILLION % Rg 10 BILLION % Rg 10 BILLION % Rg 10 BILLION % Ev FAR FROM IT
EXP #001 · Vector Spaces & Cosine Similarity: The Math Behind Dense Retrieval
Cosine when magnitude is noise (normalize); dot product when magnitude is signal.
EXP #002 · HyDE: Embed the Answer You Wish You Had
Short / ambiguous query + vocab mismatch → embed a hypothetical answer, then retrieve.
EXP #003 · Step-Back Prompting: Retrieve the Principle Before the Detail
Question too narrow → abstract it first, retrieve the general principle.
EXP #004 · CRAG: Grade Your Retrieval Before You Trust It
Grade retrieval confidence → correct / web-augment / discard; never trust it blindly.
EXP #012 · How Do You Grade a RAG System?
Recall@k = did we get it; MRR = first-hit rank; nDCG = graded ordering.
Q-02
ML Foundations from First Principles
Name the mechanism. Don't describe around it. Th 10 BILLION % Op 10 BILLION % Op FAR FROM IT Ev FAR FROM IT Ev FAR FROM IT
EXP #005 · Bias-Variance: The U-Curve Everyone Cites and Few Can Diagnose
High train error = bias → add capacity; big train–val gap = variance → more data / regularize.
EXP #006 · Optimisers: From SGD to Adam, One Fix at a Time
Adam as the safe default; SGD+momentum generalizes best when you can afford to tune.
EXP #009 · Regularisation: Four Knobs That Aren't the Same Knob
L1 = sparsity, L2 = shrink, dropout = break co-adaptation, BatchNorm = tame covariate shift.
EXP #010 · Cross-Validation: Why a Great CV Score Lies
Fit preprocessing inside the CV fold; temporal data → forward-chaining, never a random split.
EXP #011 · Pick the Wrong Metric and You Go Blind
Imbalanced → PR-AUC & F-β, not accuracy/ROC; pick the threshold by FP/FN cost.
Q-03
Production ML — Monitoring, Serving, Scale
A green dashboard is not the same as a healthy model. Ml 10 BILLION % Ml 10 BILLION %
EXP #007 · Detecting Drift: PSI, KS, and the Stat That Lies When You Bin It Wrong
PSI/KS to detect; feature drift → monitor & alert, concept drift → retrain.
EXP #008 · Monitoring in Production: When the Dashboard Is Green and the Model Is Dying
A green dashboard ≠ a healthy model; watch label lag and per-slice metrics.
Q-04
Transformers from Scratch
A word has no meaning until it reads the room. At FAR FROM IT At FAR FROM IT At FAR FROM IT At FAR FROM IT
EXP #013 · Attention: How a Word Reads the Room
Relevance = scaled dot product; ÷√d_k or gradients die; Q/K/V are three distinct projections.
EXP #014 · One Head Isn't Enough
Encoder = self, decoder = masked-self + cross; the mask is an additive −∞, not ×0; multi-head for capacity.
EXP #015 · How Does It Even Know Word Order?
Order isn't learned — inject it; long context / relative offsets → RoPE or ALiBi, not learned tables.
EXP #016 · The Math We Waved Our Hands At
√d_k = a backprop necessity; n² = the context wall; residual + LayerNorm = trainable depth; QKᵀ is low-rank → LoRA.
Q-05