Embeddings: Representation Layer of AI
Embeddings are the layer under search, ads ranking, recommendation and RAG. How they are built, how you compare them, and how you search a billion of them fast.
Embeddings are the layer under search, ads ranking, recommendation and RAG. How they are built, how you compare them, and how you search a billion of them fast.
Each generation of NLP tech solved the previous one’s problem and created a new one. This is that chain, from counting words to modern transformer variants, with what each choice costs you.
Which model for which problem, what each one is really doing under the hood, and where each breaks. Written for engineers shipping models and sitting interviews, not for a syllabus.
A practical map of ML metrics across four layers (offline, online, infra, business) and every model type from logistic regression to LLM agents, with the failure modes that make a good-looking number meaningless.
How models actually get trained: the optimizer family tree, why Adam won and where it loses, the schedule and warmup decisions that matter more than the optimizer choice, and the practical machinery (clipping, accumulation, checkpointing, sharded states) that shows up in real training runs.
Which activation to use where, why ReLU replaced sigmoid, why transformers moved to GELU and SwiGLU, and the failure modes (dead units, saturation, non-zero-centered outputs) interviewers ask you to diagnose.
A scannable reference for ML interviews: which loss to use for which task, why it works, when it breaks, the PyTorch gotchas that cause real bugs, and how to answer the question every interviewer asks.
Part 2 of the series: how Factorization Machines generalized MF to arbitrary features, how XGBoost handled non-linear ranking, and the limitations that pushed the field toward deep neural networks.