The learning path
Roadmap
Sixteen weeks, nine subject tracks, five projects. Math and classical ML first and in parallel, then deep learning, then everything that makes an AI engineer.
Why math and ML run together
Studying math alone is dry and studying ML without it is confusing. So each week pairs the two: the math note gives you the tool, and the ML note of the same week uses it immediately. Vectors and dot products appear on Monday, linear regression uses them on Tuesday. Derivatives arrive in week 2 and gradient descent spends them the same week. By week 5 the neural network note reads easily, because every symbol in it has already done a job.
How to study each day
The order matters twice over. Read the notes in the order the week-by-week table below gives, because each note
only uses words that earlier notes explained; and meet each idea three times, in three forms, because that is
what makes it stick. If a word stops you, hover over it (dotted underline) or open the
glossary; if a line of code stops you, click the np. call to open the
NumPy reference.
- Watch or read the source for the topic (the lecture or chapter linked inside the note).
- Read our note on the same topic. Redraw its main diagram on paper from memory.
- Do the practice. Hand problems on paper first, then the coding drill typed by hand. Do not paste.
- Say the interview answer out loud without looking. If you get stuck, that is the part to reread.
- Answer the practice questions at the end of the note before opening them.
| Day | What to do |
|---|---|
| Monday to Friday | One or two notes a day with their practice drills. In weeks 1–4, alternate a math note and an ML note. |
| Saturday | Project work only. Build the milestone listed for that week on the practice page. |
| Sunday | Revision cards and practice questions for the whole week, plus a timed drill from the practice page. Then rest. |
Week by week
Each row is one week, and the notes are listed in the order to read them. In weeks 1–4 that order alternates between the ML and the math track on purpose: the ML note raises a question and the next math note answers it, so no note uses a word that an earlier one has not explained. The full practice for the week is on the practice page.
| Week | Theme | Notes |
|---|---|---|
| W1 | Vectors, matrices and linear regression | |
| W2 | Derivatives, gradients and gradient descent |
|
| W3 | Probability, logistic regression and evaluation |
|
| W4 | Entropy, regularization, similarity models and trees |
|
| W5 | Neurons, backpropagation and softmax |
|
| W6 | Optimizers, PyTorch and regularization |
|
| W7 | Tokens, embeddings and the attention idea |
|
| W8 | Full attention and the transformer block |
|
| W9 | Training, decoding and fine-tuning |
|
| W10 | Modern architecture, LoRA and quantization |
|
| W11 | Embeddings, vector search and retrieval |
|
| W12 | The RAG pipeline and its evaluation |
|
| W13 | Prompting, tools and the agent loop |
|
| W14 | MCP, memory and security |
|
| W15 | Evals, cost and serving |
|
| W16 | Interview drill |
|
The nine tracks
Math for AI interviews
Weeks 1–4, alongside MLGoal. Read any formula in these notes without fear, and do the small calculations interviewers ask for by hand.
Scope. Only the math that AI engineer interviews ask or that a later note needs: vectors, matrices, slopes, the chain rule, probability and entropy. No proofs, no integrals, no theory for its own sake. The last note lists what you may skip.
Study from.
- 3Blue1Brown, “Essence of linear algebra” and “Essence of calculus” (YouTube)
- Khan Academy: linear algebra, differential calculus, statistics and probability (for practice problems)
- Deisenroth, Faisal and Ong, Mathematics for Machine Learning (free PDF), chapters 2–6, selected sections
- Seeing Theory (Brown University), a visual introduction to probability
Notes.
- Functions, exponents and logarithms W1 ready
- Vectors and the dot product W1 ready
- Matrices, matrix multiplication and shapes W1 ready
- Norms, distance and cosine similarity W1 ready
- Derivatives: slope and rate of change W2 to be written
- Partial derivatives and the gradient W2 to be written
- The chain rule W2 to be written
- Mean, median, variance and standard deviation W3 to be written
- Probability, conditional probability and Bayes’ theorem W3 to be written
- Distributions, expectation and the normal distribution W3 to be written
- Maximum likelihood: where loss functions come from W3 to be written
- Entropy, cross-entropy and KL divergence W4 to be written
- Eigenvectors and SVD, only as much as PCA and LoRA need W4 to be written
- Math you can skip, and what to say if it comes up W4 to be written
Classical machine learning
Weeks 1–4, alongside MathGoal. Explain how a model learns from data, train and evaluate one properly, and name the right algorithm for a problem.
Scope. The algorithms and habits interviews actually test: regression, classification, loss, gradient descent, overfitting, regularization, metrics, data splits, plus kNN, k-means, PCA and tree models at the depth they are asked. Each ML note is paired with the math note it needs.
Build. Project 0: an ML library from scratch, plus a tabular case study
Study from.
- Andrew Ng, Machine Learning Specialization (Coursera), courses 1–2, watched at 1.5x
- StatQuest with Josh Starmer (YouTube), one video per algorithm
- Raschka, Machine Learning with PyTorch and Scikit-Learn, chapters 2–6 and 10
- James, Witten, Hastie and Tibshirani, An Introduction to Statistical Learning (free PDF), chapters 2–5
- Google, Machine Learning Crash Course (for quick checks)
Notes.
- What machine learning is: data, model, loss, optimizer W1 ready
- Linear regression W1 ready
- Feature scaling, normalization and encoding W1 ready
- Loss functions: MSE, MAE and log loss W2 to be written
- Gradient descent: batch, stochastic and mini-batch W2 to be written
- Overfitting, underfitting and the bias–variance trade-off W2 to be written
- Logistic regression and the sigmoid W3 to be written
- Evaluation metrics: accuracy, precision, recall, F1, ROC-AUC W3 to be written
- Train, validation, test and cross-validation W3 to be written
- Regularization: L1, L2 and early stopping W3 to be written
- kNN and k-means: learning from similarity W4 to be written
- PCA and dimensionality reduction W4 to be written
- Decision trees, random forests and gradient boosting W4 to be written
- SVM and Naive Bayes at interview depth W4 to be written
- Class imbalance, data leakage and other traps W4 to be written
Deep learning foundations
Weeks 5–6Goal. Understand how any neural network learns, build one in NumPy, then write a PyTorch training loop from memory.
Scope. Neurons to networks, backpropagation, optimizers, softmax, PyTorch, the regularization tricks specific to deep nets, and a short bridge through CNNs and RNNs to attention. Computer vision and speech architectures are covered only as far as interviews ask.
Build. Project 0 continued: a neural network in NumPy, then the same network in PyTorch
Study from.
- 3Blue1Brown, “Neural Networks” series (chapters 1–4)
- Andrej Karpathy, “Zero to Hero”: the micrograd video
- Michael Nielsen, Neural Networks and Deep Learning (free online), chapters 1–3
- Raschka, Build a Large Language Model (From Scratch), Appendix A: Introduction to PyTorch
Notes.
- What is a neural network? W5 ready
- Backpropagation: how networks learn W5 to be written
- Logits, softmax and cross-entropy W5 to be written
- Build a neural network in NumPy, end to end W5 to be written
- Optimizers: SGD with momentum, Adam, AdamW and the learning rate W6 to be written
- PyTorch essentials: tensors, autograd, the training loop W6 to be written
- Dropout, BatchNorm, LayerNorm and weight decay W6 to be written
- CNNs, RNNs and LSTMs: what they are and why attention replaced them W6 to be written
LLM internals: build GPT from scratch
Weeks 7–9Goal. Explain and code every part of a GPT-style model: text in, next token out.
Scope. The full GPT-2 architecture and training process as in the Vizuara course and the Raschka book, plus the encoder-decoder family for comparison.
Build. Project 1: GPT from scratch
Study from.
- Vizuara, “Building LLMs from Scratch” (the full playlist, at 1.5–2x)
- Raschka, Build a Large Language Model (From Scratch), chapters 1–7
- Vaswani et al., “Attention Is All You Need” (2017)
- Jay Alammar, “The Illustrated Transformer” and “The Illustrated GPT-2”
- Karpathy, “Let’s build GPT: from scratch, in code, spelled out”
Notes.
- What is an LLM? Pretraining, fine-tuning and the big picture W7 to be written
- Tokenization and byte-pair encoding (BPE) W7 to be written
- Token embeddings: turning IDs into vectors W7 to be written
- Positional encoding: telling the model about word order W7 to be written
- Preparing data: sliding windows and next-token prediction W7 to be written
- Self-attention, the simple version W7 to be written
- Scaled dot-product attention: queries, keys and values W8 to be written
- Causal masking and attention dropout W8 to be written
- Multi-head attention W8 to be written
- LayerNorm, GELU, feed-forward layers and residual connections W8 to be written
- The transformer block and the full GPT architecture W8 to be written
- Counting parameters and weight tying W8 to be written
- Pretraining: the training loop, cross-entropy and perplexity W9 to be written
- Decoding: greedy, temperature, top-k and top-p W9 to be written
- Loading pretrained GPT-2 weights W9 to be written
- Fine-tuning for classification W9 to be written
- Instruction fine-tuning W9 to be written
- Encoder, decoder, encoder–decoder: BERT vs GPT vs T5 W9 to be written
The modern LLM stack
Week 10Goal. Know what changed between GPT-2 and today’s models, and how models are adapted and shrunk cheaply.
Scope. Architecture changes, RoPE, the KV cache, quantization, LoRA and QLoRA, preference tuning, and how to choose between prompting, RAG and fine-tuning.
Build. Project 2: QLoRA fine-tune, quantize, run locally
Study from.
- Hu et al., “LoRA: Low-Rank Adaptation of Large Language Models” (2021)
- Dettmers et al., “QLoRA” (2023)
- Su et al., “RoFormer: Rotary Position Embedding” (2021)
- Raschka, Build a Large Language Model (From Scratch), Appendix E: LoRA
- Hugging Face PEFT and Transformers documentation
Notes.
- From GPT-2 to modern LLMs: pre-norm, RMSNorm, SwiGLU, grouped-query attention W10 to be written
- Rotary position embeddings (RoPE) W10 to be written
- The KV cache: why generation is fast W10 to be written
- Quantization: 16-bit, 8-bit, 4-bit and GGUF W10 to be written
- LoRA, QLoRA and parameter-efficient fine-tuning W10 to be written
- Teaching preferences: RLHF and DPO W10 to be written
- Context windows and reasoning models W10 to be written
- Prompting vs RAG vs fine-tuning: how to choose W10 to be written
Retrieval-augmented generation (RAG)
Weeks 11–12Goal. Design, build and measure a RAG system, and explain every trade-off in it.
Scope. Embeddings, vector search, chunking, hybrid retrieval, reranking, the full pipeline, advanced variants, evaluation and debugging.
Build. Project 3: production RAG with evals
Study from.
- Chip Huyen, AI Engineering (2025), the RAG and agents chapter
- Jay Alammar and Maarten Grootendorst, Hands-On Large Language Models
- Lewis et al., “Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks” (2020)
- Malkov and Yashunin, “HNSW” (2016)
- Anthropic, “Introducing Contextual Retrieval” (2024)
Notes.
- Text embeddings and semantic similarity W11 to be written
- Vector databases and approximate nearest neighbour search (HNSW, IVF) W11 to be written
- Chunking strategies W11 to be written
- Retrieval: BM25, dense, hybrid search and rank fusion W11 to be written
- Reranking with cross-encoders W11 to be written
- The RAG pipeline end to end W12 to be written
- Advanced RAG: query rewriting, HyDE, multi-hop, GraphRAG, agentic RAG W12 to be written
- Evaluating RAG: recall@k, MRR, nDCG, faithfulness W12 to be written
- RAG failure modes and how to debug them W12 to be written
Prompting, tools and agents
Weeks 13–14Goal. Build reliable LLM features: good context, structured output, tool use and agent loops.
Scope. Prompt and context engineering, structured output, the agent loop, agent patterns, MCP, memory, multi-agent systems and security.
Build. Project 4: agent with your own MCP server
Study from.
- Anthropic, “Building Effective Agents” (2024)
- Yao et al., “ReAct: Synergizing Reasoning and Acting in Language Models” (2022)
- Model Context Protocol specification and documentation
- Anthropic and OpenAI prompt engineering guides
- Chip Huyen, AI Engineering (2025), the prompt engineering chapter
Notes.
- Prompt engineering that survives production W13 to be written
- Context engineering: what goes in the window W13 to be written
- Structured output and function (tool) calling W13 to be written
- The agent loop and ReAct W13 to be written
- Workflows vs agents: routing, orchestrator–workers, evaluator–optimizer W13 to be written
- Model Context Protocol (MCP) W14 to be written
- Agent memory: short-term, long-term, compaction W14 to be written
- Multi-agent systems: when they help and when they hurt W14 to be written
- Prompt injection and agent security W14 to be written
Evals and production
Week 15Goal. Prove an LLM feature works, then run it cheaply, quickly and safely.
Scope. Evaluation, LLM-as-judge, hallucination, guardrails, cost, latency, serving and observability.
Build. Project 4 continued: evals, guardrails, cost and latency report
Study from.
- Chip Huyen, AI Engineering (2025), the evaluation and inference optimization chapters
- Hamel Husain, “Your AI Product Needs Evals”
- vLLM documentation (continuous batching, PagedAttention)
Notes.
- Evals: golden sets, metrics and regression testing W15 to be written
- LLM-as-judge: how to trust a model grading a model W15 to be written
- Hallucination: causes, detection, mitigation W15 to be written
- Guardrails and safety layers W15 to be written
- Cost and latency: caching, batching, streaming, model routing W15 to be written
- Serving LLMs: time to first token, throughput, continuous batching W15 to be written
- Observability and tracing W15 to be written
LLM system design and interview drill
Week 16, then every Sunday while applyingGoal. Turn everything into spoken, structured answers under time pressure.
Scope. A framework for design rounds, three worked designs, the ML coding round, question banks and project storytelling.
Build. Polish all projects: READMEs, demos, resume bullets
Study from.
- Our own notes, tracks 1–8
- Alex Xu, System Design Interview (for the classic distributed-systems parts)
- Chip Huyen, AI Engineering (2025), the architecture chapter
Notes.
- A framework for LLM system design rounds W16 to be written
- Design: a customer support assistant W16 to be written
- Design: enterprise document search at scale W16 to be written
- Design: a coding assistant W16 to be written
- The ML coding round: attention, BPE and sampling from memory W16 to be written
- Question bank: math, ML and DL fundamentals W16 to be written
- Question bank: applied AI engineering W16 to be written
- Talking about your projects W16 to be written
How you know a track is done
- You can redraw every main diagram of the track on a blank page.
- You can give each note’s interview answer in under two minutes, without notes.
- You can do the week’s hand problems without looking anything up.
- You can answer at least four in five practice questions correctly.
- The project milestone for the track runs, and its README explains what you measured.