Lecture notes Β· System architectures Β· Mathematical foundations Β· Paper deep-dives Β· Production blueprints
π Start the Curriculum Β· πΊοΈ Learning Path Β· π Quick Start Β· π Master Index
| Section | What's inside | |
|---|---|---|
| π― | Repository Overview | What this repository is and who it is for |
| π | Repository at a Glance | Hard numbers: lectures, chapters, lines of notes, lines of code |
| πΊοΈ | Learning Path | The five-phase route through the curriculum |
| π | Curriculum Navigation | Every lecture, note set, codebase and implementation guide |
| π | Lecture Highlights | Deep-dive summaries of all 12 lectures |
| π§° | Technology Stack | Languages, frameworks, services and SDKs used |
| π | Quick Start | How to read the notes and run the code |
| ποΈ | Repository Structure | Directory map |
| π | Conventions | How every note set, codebase and guide is organised |
| π£οΈ | Roadmap | Where the curriculum is heading |
| π€ | Contributing | How to add or improve a lecture |
| π | License & Attribution | Usage terms |
The thesis of this repository: a Forward Deployed Engineer is not the person who ships the requested chatbot β it is the person who discovers the real business problem and then proves the fix with a measurable system.
This repository contains structured lecture notes, system architectures, mathematical foundations, paper deep-dives, and production blueprints for Forward Deployed Engineers (FDEs) and Generative AI Systems Architects.
| Theme | What it covers |
|---|---|
| π§ Role & Mindset | Moving from client-requested "chatbots" (proposed solutions) to true enterprise business problem discovery and resolution. |
| π Mathematical & Theoretical Depth | Step-by-step proofs β e.g. the Attention variance scaling factor |
| π Paper Deep-Dives | Comprehensive breakdowns of seminal research, including "Attention Is All You Need" (Vaswani et al., 2017). |
| π Production Architecture | Design criteria for Grounded, Observable, Secure and Actionable enterprise AI systems. |
| π» Hands-on Implementation | Production microservices built with Node.js, Express, TypeScript and modern AI SDKs. |
| Metric | Value |
|---|---|
| π Lectures | 12 |
| π Chapter note files | 88 |
| π Consolidated note documents | 12 |
| ποΈ Tracked markdown files | 260 |
| βοΈ Lines of notes & guides | 112,000+ |
| π» TypeScript / JavaScript files | 198 |
| π§Ύ Lines of code | 22,600+ |
| π Lectures shipping runnable code | 8 (03 Β· 04 Β· 05 Β· 06 Β· 08 Β· 10 Β· 11 Β· 12) |
| π§© Runnable codebases | 9 |
| ποΈ Source slide decks & Excalidraw diagrams | 12 PDF Β· 11 SVG |
π‘ Every number above is derived from the repository contents β notes are Markdown, code is strict TypeScript or plain JavaScript, and each codebase ships with a chapter-by-chapter implementation guide.
Follow the phases in order β each one assumes only the phase before it.
| Phase | Lectures | Colour | You leave able to⦠|
|---|---|---|---|
| 1 Β· Foundations | 01 Β· 02 | π¦ | Explain how an LLM actually produces a token, and why rules β ML β Transformers happened |
| 2 Β· Application Layer | 03 Β· 04 | π© | Call a model from a real service, budget tokens, and fix statelessness, memory and streaming |
| 3 Β· Agency & Streaming | 05 Β· 06 | π¨ | Give a model tools, sandbox it, add human-in-the-loop, and stream tokens to a browser correctly |
| 4 Β· Embeddings & Retrieval | 07 Β· 08 Β· 09 Β· 10 | π§ | Represent meaning as vectors, then store and search billions of them with ANN indexes |
| 5 Β· RAG & Advanced RAG | 11 Β· 12 | π₯ | Build a grounded answering system end to end β then prove which control fixes a wrong answer |
Legend β π Notes index (chapter-by-chapter) Β· π Complete document (single consolidated file) Β· π» Codebase Β· π οΈ Implementation guide (full source, block-by-block)
| # | Lecture | π Notes | π Complete | π» Codebase | π οΈ Guide |
|---|---|---|---|---|---|
| 01 | π¦ Introduction to FDE & Generative AI Foundations | π | π | β | β |
| 02 | π¦ How LLMs Work (From Tokens to Transformers) | π | π | β | β |
| 03 | π© Talking to an LLM from Your Application | π | π | π» | π οΈ |
| 04 | π© Building a Chatbot: Context, Memory, Streaming & Hallucinations | π | π | π» | π οΈ |
| 05 | π¨ Autonomous AI Agents, Tool Calling & Human-in-the-Loop | π | π | π» | π οΈ |
| 06 | π¨ AI Streaming β From LLM Tokens to a Live Chat Experience | π | π | π» | π οΈ |
| 07 | π§ Vector Embeddings β From First Principles | π | π | β | β |
| 08 | π§ Vector Embeddings Project β Movie Recommendation System | π | π | π» | π οΈ |
| 09 | π§ Vector Embedding Search & Storage | π | π | β | β |
| 10 | π§ Deep Dive into Vector Databases & ANN Algorithms | π | π | π» | π οΈ |
| 11 | π₯ Retrieval-Augmented Generation (RAG) | π | π | π» Productions RAG π§ͺ Eassy RAG |
π οΈ Productions RAG (00 β 14) π οΈ Eassy RAG (01 β 08) |
| 12 | π₯ Advanced RAG β Chunking, Hybrid Retrieval, Reranking & Context Engineering | π | π | π» Advanced RAG | π οΈ (00 β 10) |
π§ Want the full chapter-level roadmap with per-chapter topic tables? Open the Main Repository Index & Curriculum Roadmap.
Each lecture below is summarised twice: a one-line thesis and a topic chip list for scanning, plus a collapsible full breakdown with the complete subject coverage. Colour squares match the Learning Path phases.
Thesis β The job is not to build the chatbot the client asked for; it is to find the business problem underneath it, and the history of AI explains why the current tools look the way they do.
E-commerce case study (50k daily queries) Β· Problem vs Solution discovery Β· Symbolic AI Β· Expert Systems Β· ML paradigm shift Β· Statistical N-grams Β· RNN hidden-state decay Β· Transformer attention Β· Production AI stack
π Full breakdown
E-commerce case study (50k daily queries), Problem vs Solution discovery, Symbolic AI & Expert Systems, Machine Learning paradigm shifts, Statistical N-grams, RNN hidden state decay, Transformer Attention mechanism, and Enterprise Production AI Stack topology.
π Notes index Β· π Complete document
Thesis β An LLM is a next-token probability machine: text β tokens β vectors β attention β logits β softmax β one token, appended and repeated.
Autoregressive next-token prediction Β· Subword tokenization (BPE/WordPiece) Β· Dense embeddings β^d_model Β· Positional encodings Β· Scaled dot-product attention (Q, K, V) Β· Multi-block state propagation Β· Logits head Β· Softmax Β· Temperature Β· Streaming
π Full breakdown
Autoregressive next-token prediction, Subword tokenization (BPE/WordPiece), Dense Vector Embeddings
π Notes index Β· π Complete document
Thesis β A raw model is an engine, not a car: your application supplies the keys, the dashboard, the fuel budget and the guardrails.
ChatGPT vs raw LLM Β· Deterministic tools Β· Knowledge cutoff Β· 4 invariant request components Β· Prefill vs decode economics Β· Node.js + Express + TypeScript Β· Zod validation Β· Client singletons Β· Telemetry audit Β· Prompt-injection defense
π Full breakdown
ChatGPT vs Raw LLM (Car vs Engine analogy), Deterministic tools (Calculator, DB, Weather), Knowledge cutoff limits, The 4 Invariant Request Components (Where, Who, Which Model, What), Token economics (Prefill vs Decode, cost & latency), Node.js + Express + TypeScript microservice setup, Zod validation, OpenAI client singletons, response telemetry audit, and prompt injection defense via multi-role architecture.
π Notes index Β· π Complete document Β· π» Codebase Β· π οΈ Implementation guide
Thesis β There is no conversation in the model β only the array your server sends. Memory, streaming and hallucination are therefore application design problems, not model properties.
HTTP statelessness Β· Coreference binding Β· system / user / assistant roles Β· 4 pillars of system prompts Β· Context-window budget Β· O(NΒ²) token bloat Β· Lost-in-the-middle Β· Sliding window & rolling summaries Β· Parametric vs in-context knowledge Β· SSE streaming Β· Fluency β truth Β· Sycophancy Β· 7-layer defense in depth
π Full breakdown
Statelessness of HTTP LLM endpoints, the illusion of conversational continuity, coreference and pronoun binding failure, message roles (system, user, assistant), prompt contamination anti-patterns, the 4 Pillars of system prompts, context window budget constraints, quadratic token accumulation problem (
π Notes index Β· π Complete document Β· π» Codebase Β· π οΈ Implementation guide
Thesis β Agency is a spectrum, and every step up it costs context budget, latency and blast radius β so sandbox the workspace and keep a human on the irreversible actions.
Tool delegation Β· 5-step tool-calling wire protocol Β· JSON Schema + Zod validation Β· ReAct loop (Thought β Action β Observation) Β· O(NΒ²) context economics Β· Agency spectrum Β· safePath sandboxing Β· BrewLab case study Β· 3-tier HITL Β· Durable pause/resume webhooks
π Full breakdown
From token prediction to deterministic tool delegation (Safe Calculator, Weather, Currency Exchange), the 5-step tool calling wire protocol, JSON Schema parameter validation via Zod, multi-step ReAct closed loop (Thought β Action β Observation), safePath jail, symlink containment), autonomous website builder case study (BrewLab coffee landing page), and 3-tier Human-in-the-Loop (HITL) authorization with durable pause/resume webhooks.
π Notes index Β· π Complete document Β· π» Codebase Β· π οΈ Implementation guide
Thesis β Generation and delivery are two independent processes. Streaming is what you build in the gap between them, and TTFT β not total latency β is the number users feel.
Prefill vs decode Β· TTFT vs total latency Β· 4-layer granularity model Β· UTF-8 multi-byte splits Β· Chunked transfer encoding Β· SSE wire grammar Β· 7 pipeline invariants Β· .call() β .stream() Β· Dual-write pattern Β· status: "interrupted" Β· ReadableStream + TextDecoder Β· AbortController Β· Three watchdogs Β· Backpressure Β· p95(clientTTFT β serverTTFT) alert
π Full breakdown
Autoregressive token generation and the prefill-vs-decode latency duality, generation vs. delivery as two independent processes, TTFT vs. total latency and human reading speed as the throughput threshold, the four-layer granularity model (LLM token β provider chunk β network chunk β decoded piece) with UTF-8 multi-byte split discipline, chunked transfer encoding and the exact SSE wire grammar (data/event/id/retry, \n\n framing, heartbeats), the 7 pipeline invariants, the .call() β .stream() return-type change (String β Flux<String>/AsyncIterable), the dual-write pattern (stream out, buffer in) with one reconstructed assistant message per turn and status: "interrupted" for partial answers, the browser half (fetch resolves on headers, ReadableStream.getReader(), one TextDecoder({stream:true}), one growing bubble, sticky auto-scroll, AbortController), and production hardening: three watchdogs, backpressure that stalls instead of overflowing, cancellation propagation to the provider, in-band error protocols after 200 OK, and the p95(clientTTFT β serverTTFT) alert that detects buffering regressions. Companion codebase ships a three-transport streaming microservice (raw text/plain, NDJSON, SSE) plus a browser client with a telemetry HUD, chaos injection and an executable await response.text() anti-pattern demo.
π Notes index Β· π Complete document Β· π» Codebase Β· π οΈ Implementation guide
Thesis β Computers cannot do mathematics on symbols, so meaning has to become geometry β and learned embeddings beat hand-crafted features because context, not a human, chose the axes.
Symbol vs meaning Β· Feature vectors Β· Euclidean vs dot vs cosine Β· Feature-engineering failure Β· Learned representations Β· Embedding lookup table Β· Gradient descent Β· king β man + woman β queen Β· Feature vector β embedding Β· CLIP multi-modal spaces Β· Embedding application taxonomy
π Full breakdown
The symbol-vs-meaning gap, why computers need numbers to perform mathematics, one-number representations and their failure, multi-dimensional feature vectors and vector spaces, Euclidean distance vs. dot product vs. cosine similarity, the failure of hand-crafted feature engineering (dimensionality explosion, task specificity, language ambiguity), learned representations through context prediction, the embedding lookup table and gradient-descent training loop, vector arithmetic (king β man + woman β queen), the critical distinction between a feature vector and a learned embedding, multi-modal shared spaces (CLIP), and the application taxonomy unlocked by embeddings: semantic search, nearest-neighbour retrieval, clustering, classification, ranking, recommendation, and RAG.
π Notes index Β· π Complete document
Thesis β
REPRESENT β STORE β COMPARE β RANK: embed stable content once, embed the changing query per request, and rank with cosine similarity.
REPRESENT β STORE β COMPARE β RANK Β· Why not prompt the whole catalog Β· Precomputation insight Β· Offline/online architecture Β· Semantic search vs similar-item Β· Content-based vs collaborative Β· Cosine from first principles Β· Zero-vector guards Β· O(N Γ D) scoring Β· Optional LLM explanation layer
π Full breakdown
A complete, working movie recommendation engine built on REPRESENT β STORE β COMPARE β RANK. Covers why not to prompt an LLM with the entire catalog (context limits, repeated work, unnecessary generation, cost/latency), the precomputation insight (stable movie descriptions embedded once; changing user queries embedded per request), the two-phase offline/online architecture, semantic search vs. similar-movie recommendation sharing one ranking engine, content-based vs. collaborative filtering, cosine similarity from first principles ((A Β· B) / (βAβ Γ βBβ)), zero-vector and dimension guards, O(N Γ D) scoring, and the full system design with an optional LLM explanation layer that leads into RAG. Companion codebase ships an Express + TypeScript API with Zod validation, batch startup embeddings, OpenAI live mode plus deterministic mock mode, an 18-movie catalog, and a chapter-wise implementation guide (00 β 08) with block-by-block explanations.
π Notes index Β· π Complete document Β· π» Codebase Β· π οΈ Implementation guide
Thesis β At scale, "store the vectors" and "search the vectors" are two different engineering problems β and brute-force KNN is the baseline you must beat on purpose, not by accident.
Store vs search Β· Vector DB anatomy Β· Pre- vs post-filtering Β· Hybrid search + RRF Β· Brute-force KNN baseline Β· 15.36B dimension ops @ 10MΓ1536 Β· 6 KB/vector Β· 600 GB/100M Β· k-d tree branch-and-bound Β· Curse of dimensionality Β· IVF Β· HNSW Β· PQ Β· LSH Β· DiskANN Β· Two-stage rescoring Β· Capacity planning & CDC Β· Zero-downtime re-embedding Β· recall@K / MRR / nDCG Β· ACL security
π Full breakdown
Why the 30-movie recommender from Lecture 08 cannot survive scale, and what replaces it. Covers the two separate engineering problems β storing hundreds of millions of vectors and searching them efficiently β the myth that relational databases cannot store vectors (they can; they simply cannot index similarity with a B-tree), the anatomy of a vector database (ID + vector + payload, fixed dimensions and metrics, write/read pipelines, pre- vs post-filtering, hybrid search with RRF), and brute-force KNN as the correct baseline: O(N Γ D) per query, 10M Γ 1536 = 15.36 billion dimension operations, 1536 float32 β 6 KB per vector, 6 GB per million, 600 GB per 100 million. Then the indexing story: why sorted scalar indexes work, why a k-d tree partitions space one axis at a time, the exact branch-and-bound pruning rule (planeDist < bestDist), and why pruning collapses as dimensions grow β boundary proliferation, volume concentration, and distance concentration. Finally, ANN indexes in practice: IVF (nlist/nprobe), HNSW (M/efConstruction/efSearch), product quantization (32Γ compression, ADC), scalar/binary quantization, LSH bands and rows, DiskANN, two-stage retrieval with exact rescoring, and production design: capacity planning, CDC ingestion, deletes and orphan chunks, zero-downtime model re-embedding with alias swaps, sharding and tail latency, multi-tenancy, recall@K / MRR / nDCG evaluation, caching, ACL security, vendor selection, runbooks, and a production checklist.
π Notes index Β· π Complete document
Thesis β The lecture that turns the retrieval half of RAG into working code: implement IVF, HNSW and PQ yourself, then put Qdrant or pgvector behind the same interface.
Irreversible model/dimension choices Β· Cosine vs dot vs L2/L1 Β· Exact KNN as ground truth Β· Speedβrecall contract Β· IVF (nlist/nprobe) Β· HNSW (M/efConstruction/efSearch) Β· Product quantization + ADC Β· 5-layer vector DB anatomy Β· Qdrant vs pgvector Β· Chunking Β· hybrid + RRF Β· reranking Β· Latency budgets Β· Failure runbook
π Full breakdown
The lecture that turns the retrieval half of RAG into working code. Notes cover embeddings and irreversible model/dimension choices, cosine vs dot vs L2/L1 and metric consistency, exact KNN as the ground truth (O(N Γ D), 15.36 billion dimension operations at 10M Γ 1536), the speedβrecall contract, IVF (nlist/nprobe, k-means, boundary vectors), HNSW (level sampling, greedy descent, efConstruction/efSearch, neighbour diversity, tombstones, filter weakness), product quantization (codebooks, ADC, rescoring, 64Γ compression), the five-layer anatomy of a vector database, the Qdrant vs pgvector decision, and production retrieval: chunking, hybrid search + RRF, reranking, evaluation, latency budgets, security and a failure runbook. The companion codebase implements every algorithm from scratch in strict TypeScript β IVF, HNSW and PQ included β plus a CRUD vector store with payload filters, BM25/RRF hybrid search, official Qdrant and pgvector adapters tested against Docker, and a chapter-wise implementation guide (00 β 10) with the full source and block-by-block explanations. No RAG generation: the LLM answer layer belongs to Lecture 11.
π Notes index Β· π Complete document Β· π» Codebase Β· π οΈ Implementation guide
Thesis β Hallucination is a mechanism, not a bug: the model is a stateless next-token predictor, so grounding means putting verified evidence in the prompt and refusing when it is missing.
Parametric vs non-parametric memory Β· Two pipelines / seven serving steps Β· Extraction & chunking hazards Β· Orphan chunks Β· Embedding-space contract Β· Namespaces & score calibration Β· Hybrid search + RRF Β· MMR Β· reranking Β· Four-clause prompt contract Β· Exact refusal sentence Β· Verified [n] citations Β· Prompt injection as authority Β· Query condensation Β· Sessions & IDOR Β· recall@K Β· MRR Β· nDCG Β· SLOs Β· degradation Β· blue/green re-index
π Full breakdown
The generation half of RAG, built end to end. Notes start from the stateless model β parametric vs non-parametric memory, why hallucination is a mechanism rather than a bug, and why a larger context window is capacity rather than attention β then build the open-book architecture: two pipelines, seven serving steps, and the failure modes that survive a correct design. Ingestion covers extraction hazards, cleaning, chunking strategies and overlap arithmetic, metadata and deterministic ids, and the orphan-chunk problem. Retrieval covers the embedding-space contract, dimensions and prefixes, namespaces, score calibration, top-K, metadata filters, hybrid search with RRF, MMR and reranking. Grounding covers the four-clause prompt contract, the exact refusal sentence the script uses, citation markers, fabrication guards, and prompt injection as an authority and capability problem. Conversation state covers query condensation ("And for shoes?"), memory strategies and their quadratic cost, session ownership and IDOR, and history poisoning. Evaluation separates retrieval from generation with recall@K, MRR and nDCG, citation validity, refusal correctness, a debug tree and a per-request trace; production design adds SLOs, degradation paths, caching keyed by corpusVersion, blue/green re-indexing, a failure runbook and build-vs-buy. The companion codebase is a working, framework-free system in strict TypeScript β structure-aware token chunking, OpenAI plus deterministic offline embeddings, an in-memory store and a Pinecone adapter behind one interface, hybrid retrieval with a calibrated score floor, a grounded prompt with verified [n] citations, TTL-bounded sessions with query rewriting, a 12-case golden set (recall@4 1.00, citations 12/12, refusals 12/12, expected facts 12/12 offline), and an Express API that returns the full trace with every answer β plus a chapter-wise implementation guide (00 β 14) with the full source and block-by-block explanations.
π§© Two codebases ship with this lecture β they answer different questions:
| Codebase | Language & size | The question it answers | What's inside |
|---|---|---|---|
| π Productions RAG | TypeScript Β· 30 files Β· guide 00 β 14 | How do you build the real thing? | Every stage behind an interface, hybrid retrieval, citation verification, sessions, evaluation and an HTTP API. |
| π§ͺ Eassy RAG | Plain JavaScript Β· 6 modules Β· 477 lines Β· guide 01 β 08 | What is the smallest honest pipeline? | pdf-parse β 1,000-character chunks with a 150-character overlap β text-embedding-3-small truncated to 1,024 dimensions β one Qdrant point per chunk with a deterministic UUID id β top-5 cosine retrieval β a six-clause grounded prompt returning [Source n] citations and the exact chunks used, or a refusal when retrieval returns nothing. |
β οΈ Real failure modes documented in the Eassy RAG guide, not hidden: thepdf-parse@1.1.1ESM crash (and thecreateRequirefix), the chunker's850-character whitespace-free limit (Chunking failed to advance), and the collection dimension guard that stops silent space mismatches.
π Notes index Β· π Complete document Β· π οΈ Productions RAG guide (00 β 14) Β· π οΈ Eassy RAG guide (01 β 08)
Thesis β Basic RAG makes one heroic assumption: the retrieved chunks contain everything needed. This lecture makes that true, then proves the model used the result honestly.
Coverage vs selection failures Β· Retrieval-or-generation decision tree Β· stride = size β overlap Β· Structural chunking + breadcrumbs Β· Semantic breakpoints Β· Parent-child (small-to-big) Β· Contextual retrieval + late chunking Β· K_retrieve vs K_context Β· Calibrated score floors + MMR Β· Fail-closed ACL + temporal filters Β· BM25 from first principles Β· RRF Β· Two-stage reranking + two-sided gate Β· Precedence + bookending + token budget Β· Ablation matrix Β· Blue/green re-indexing
π Full breakdown
The engineering discipline of making basic RAG's one heroic assumption true β the retrieved chunks contain everything needed to answer correctly β and then proving that the model used the result honestly. Notes start by separating the two failure classes (coverage and selection) and give a four-step tree for deciding whether a wrong answer is a retrieval problem or a generation problem. Chunking covers fixed-size arithmetic (stride = size β overlap, storage β S/(SβO), the overlap β₯ size bug, orphan chunks), then structural chunking with breadcrumbs and the two-pass rule for tables, semantic breakpoints and why they are not the default, parent-child (small-to-big) retrieval, contextual retrieval and late chunking. Retrieval covers K_retrieve as a recall ceiling versus K_context as a token bill, calibrated score floors, MMR, metadata filtering with fail-closed tenant/ACL rules and temporal validity, BM25 from first principles, reciprocal rank fusion and why scores cannot be added across two rankings, and two-stage reranking with a two-sided gate that decides when nothing was relevant. Context engineering covers precedence when documents disagree, lost-in-the-middle bookending, evidence labels, token budgets and prompt injection as an authority problem. Evaluation and production cover recall@K, MRR, nDCG, faithfulness, citation validity, refusal correctness, the ablation matrix, the seven pinned versions, blue/green re-indexing and a failure runbook. The companion codebase is a framework-free system in strict TypeScript β fixed/structural/semantic chunkers, an offline hash embedder plus OpenAI behind one interface, an in-memory store with pre- and post-filtering, a filter DSL with ACL and asOf rules, BM25 + RRF, a joint reranker with a calibrated gate, context assembly with parents, dedupe, precedence, budget and bookending, a 14-case golden set and a six-row ablation matrix (recall 0.571 β 0.821, refusal 0.000 β 1.000, context tokens 725 β 566) β plus a chapter-wise implementation guide (00 β 10) with the full source and block-by-block explanations. Runs with no API key: every number in the guide is reproducible offline.
π§© Two codebases ship with this lecture β they answer different questions:
| Codebase | Language & size | The question it answers | What's inside |
|---|---|---|---|
| π Advanced RAG | TypeScript Β· 26 files Β· ~4,200 lines Β· guide 00 β 10 | Which control actually fixes a wrong answer? | Every stage behind an interface, an ablation matrix that changes one control at a time, calibrated score floors, pre-filtering with fail-closed access rules, and a trace returned with every answer. |
| π The Lecture 11 codebases (Productions RAG Β· Eassy RAG) | TypeScript & JavaScript | How do you build a grounded answering system at all? | Lecture 12 assumes that system exists and asks what to change when it is wrong. |
βοΈ Honest limits β documented rather than hidden: the offline embedder is lexical (hashes, stems and character 4-grams) so it handles morphology but not paraphrase; the reranker is a joint lexical scorer rather than a neural cross-encoder; and the extractive generator quotes sentences without reasoning, which is why
factssits at 0.583 whilerefusalis 1.000 β a retrieval-vs-generation distinction the guide's failure tree names explicitly.
π Notes index Β· π Complete document Β· π» Codebase Β· π οΈ Implementation guide (00 β 10)
| Layer | What the curriculum uses |
|---|---|
| Languages | |
| Runtime & server | |
| Validation & typing | |
| Model providers | |
| Vector stores | |
| Infrastructure |
1. Open index.md β full chapter-level roadmap
2. Open Lecture NN/notes/README.md β chapter index for that lecture
3. Open Lecture NN/notes/NN_*.md β one chapter at a time
...or Lecture NN/notes/Lecture_NN_Complete_Notes.md for the single-document version
Every note set also ships the original Notes.pdf slides and an Excalidraw-Notes.svg diagram file in the same folder.
Each codebase is self-contained with its own package.json. Pick a lecture folder and install:
# Lecture 12 β Advanced RAG (runs with NO API key)
cd "Lecture 12/code/advanced-rag"
npm install
npm run baseline # naive pipeline: 8 of 14 golden cases fail, each with a named stage
npm run ablation # one control at a time: recall 0.571 β 0.821
npm run ask -- "Is the AX-204 still covered after 18 months?"
npm run dev # HTTP API on :3100# Lecture 11 β Productions RAG (set OPENAI_API_KEY for live embeddings)
cd "Lecture 11/code/Productions RAG"
npm install
npm run ingest && npm run ask && npm run eval# Lecture 11 β Eassy RAG (smallest honest pipeline, needs Qdrant + OpenAI key)
cd "Lecture 11/code/Eassy RAG"
npm install
npm run index # PDF β chunks β embeddings β Qdrant
npm run query # question β retrieval β grounded answer with [Source n]π Keys are optional where it matters. The Lecture 12 codebase and the Eassy RAG guide are built so their numbers reproduce offline; set
OPENAI_API_KEY(and optionallyCOHERE_API_KEY) to swap in real embeddings and a real cross-encoder without changing a line of logic.
Each codebase ships an implementations guide/ folder that walks the same source chapter by chapter: file details β complete source β block-by-block explanation β commands and verification output.
Forward-Deployed-Engineer/
βββ README.MD # β you are here
βββ index.md # Master roadmap: every lecture + per-chapter topic tables
βββ prompt.md # Note-generation brief used across lectures
β
βββ Lecture 01/ β¦ Lecture 12/ # 12 lectures
β βββ notes/
β β βββ README.md # Chapter index for the lecture
β β βββ Notes.pdf # Original source slides
β β βββ Excalidraw-Notes.svg # Hand-drawn diagram source
β β βββ 01_*.md β¦ NN_*.md # Chapter-by-chapter notes
β β βββ Lecture_NN_Complete_Notes.md # Single consolidated document
β βββ code/ # Present for lectures 03 Β· 04 Β· 05 Β· 06 Β· 08 Β· 10 Β· 11 Β· 12
β βββ README.md # What the codebase does + how to run it
β βββ src/ Β· package.json Β· tsconfig.json
β βββ implementations guide/ # Chapter-wise build guide (full source, block by block)
β
βββ (Lecture 11 additionally ships two codebases: Productions RAG and Eassy RAG)
Every artefact in this repository follows the same four-part contract, so you can jump between lectures without relearning the layout:
| # | Convention | What it means |
|---|---|---|
| 1 | Notes are chapter-wise | 6β10 chapter files per lecture, each answering one question, numbered in reading order. |
| 2 | A consolidated document always exists | Lecture_NN_Complete_Notes.md condenses the chapters and links back to them β it is not a blind concatenation. |
| 3 | Guides are block-by-block | Each implementation guide states the file's details, prints the complete source (never an excerpt), then explains every block and the command that proves it. |
| 4 | Claims are measured | Retrieval, refusal, citation and latency numbers in the notes come from a runnable golden set, and honest limits are written down rather than hidden. |
| Status | Item |
|---|---|
| β | Lectures 01 β 12 published with chapter-wise notes and consolidated documents |
| β | Codebases + implementation guides for lectures 03 Β· 04 Β· 05 Β· 06 Β· 08 Β· 10 Β· 11 Β· 12 |
| β | Master roadmap maintained in index.md |
| π | Additional chapters where the source slides are thinner than the engineering reality |
| π | More evaluation golden sets so every quantitative claim stays reproducible |
π’ The repository is under active development β new lecture material lands as the curriculum progresses.
- Read the conventions in
prompt.mdand the Conventions table above. - Keep the four-part contract: chapter-wise notes β consolidated document β runnable code β block-by-block implementation guide.
- Update the indexes: if you add a lecture or a codebase, update
index.mdand this README's Curriculum Navigation table. - Prove your numbers: any metric you quote (recall, refusal, latency, token counts) should be reproducible from a command in the codebase.
- Encode links correctly: paths contain spaces, so use
%20(e.g../Lecture%2012/code/implementations%20guide/README.md).
Pull requests that improve depth, fix a wrong claim, or add a missing failure mode are especially welcome. π
This repository is an educational curriculum. Lecture content, notes and diagrams are derived from the referenced source materials and papers β notably "Attention Is All You Need" (Vaswani et al., 2017) β which remain the property of their respective authors. Code samples are provided for learning and reference; verify against your own security, licensing and compliance requirements before production use.
π Master Index Β· π Curriculum Navigation Β· π Quick Start
Built for Forward Deployed Engineers who measure what they ship.