RAG & Embeddings

Retrieval-augmented generation end to end: embeddings, chunking strategies, vector databases vs pgvector, hybrid search, reranking, and the architecture of a production RAG service.

6 lessons~48 min
  1. 01·Retrieval Is a Search Problem You Already OwnRetrieval is an indexing pipeline plus a query path. When RAG beats long context or fine-tuning, and the four-way decision behind the choice.8m
  2. 02·Embeddings Are an Index, Not MagicWhat an embedding actually is, why the distance metric matters, and how HNSW and IVFFlat trade recall for latency like any index you already tune.8m
  3. 03·Chunking Is Schema DesignThe chunk is your retrievable unit, so chunking is a schema decision: size, overlap, structure, metadata columns, and parent-document retrieval.8m
  4. 04·The Ingestion Pipeline Is an ETL JobExtract, chunk, embed, upsert. How to make RAG ingestion idempotent, batched against rate limits, and safe to resume after a failure mid-corpus.8m
  5. 05·Fixing Retrieval, Not the ModelFour ways retrieval fails, and the fixes in order: hybrid search, reranking, metadata filters as a security boundary, and a real context budget.8m
  6. 06·Capstone: A RAG Service Behind One FunctionOne typed function over the module 3 seam: retrieve, ground the answer, fail closed when nothing is found, emit the trace fields that debug it.8m