Mid-level Track Roadmap

AI RAG architecture

This course treats Retrieval-Augmented Generation as an architecture, built in Rails on top of Postgres. It begins with why retrieval suits facts better than fine-tuning, and why a RAG system is two pipelines: indexing and querying. Lessons cover chunking with contextual prefixes and metadata, embedding models and their dimensions, quantization and lock-in, and vector storage with pgvector and ANN indexes. Later lessons add hybrid retrieval with Reciprocal Rank Fusion, cross-encoder reranking, prompt assembly with citations and caching, and a full pipeline with its failure modes and evaluation.

What you'll learn

  • ✓Why retrieval supplies facts while fine-tuning teaches behavior
  • ✓Chunking by document structure, with contextual prefixes and metadata
  • ✓Embedding dimensions, quantization, input types and model lock-in
  • ✓Storing and searching vectors in Postgres with pgvector and HNSW
  • ✓Hybrid retrieval with Reciprocal Rank Fusion and cross-encoder reranking
  • ✓Prompt assembly with citations, caching and evaluation of the pipeline
Free preview · Lesson 1 5 min read

Why retrieval beats fine-tuning

A support engineer asks your app: "does the Pro plan include audit logs?" The model answers, confidently, that it does. It doesn't. Nobody wrote that sentence anywhere. The model produced a plausible continuation of the question, and plausible is all it was ever optimizing for.

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...