Home / Courses / RNK-RAG-401

Retrieval-Augmented Generation Engineering

Production RAG Systems from First Principles

What you'll learn

Most RAG tutorials stop at "embed some PDFs, call an LLM." Those systems demo well and fail in production. They retrieve the wrong chunk, hallucinate citations, leak documents to users who shouldn't see them, and nobody can tell whether a change made things better or worse.

This course teaches RAG as an engineering discipline. Students build every component from scratch so they understand it: chunkers, an embedding pipeline, a vector index, BM25, rank fusion, query transformation, grounded generation with citations, an evaluation harness, and a secured HTTP service. Then they learn when to swap in production libraries (FAISS, pgvector, Qdrant, cross-encoders, RAGAS) and how to tell whether the swap helped.

Everything runs locally on Ollama (or any OpenAI-compatible endpoint). No paid API keys are required. Each lab also has an --offline mode, so the course can run in a classroom with no GPU and no model downloads.

Learning outcomes

By the end of the course, you can:

  1. Explain the RAG architecture and pick between RAG, fine-tuning, long-context prompting, and tool use for a given problem, with a justification.
  2. Build an ingestion pipeline that parses Markdown, HTML, PDF and plain text into clean, metadata-rich documents.
  3. Design and measure chunking strategies (fixed, recursive, structure-aware, semantic, parent-child) and choose one from evidence.
  4. Select, run and evaluate embedding models, including instruction prefixes, normalization and Matryoshka truncation.
  5. Implement exact and approximate vector search, and measure recall against latency.
  6. Implement BM25 and hybrid retrieval with Reciprocal Rank Fusion, and add reranking.
  7. Apply query transformations (multi-query, HyDE, decomposition, routing) and advanced indexes (contextual retrieval, hierarchical summaries, graph-based retrieval).
  8. Engineer grounded generation: context assembly, citation enforcement, and refusal when the evidence doesn't support an answer.
  9. Evaluate RAG systems with retrieval metrics (Recall@k, MRR, nDCG) and generation metrics (faithfulness, relevance), and run regression tests in CI.
  10. Ship a secured RAG service with document-level access control, prompt-injection defenses, caching and observability, and explain agentic RAG patterns.

Who it's for

  • Software engineers who are asked to "add AI search / a chatbot over our docs"
  • ML/data engineers moving from notebooks to production retrieval systems
  • Technical leads who need to evaluate RAG vendors and architectures with numbers rather than vibes

Prerequisites

Comfortable Python (functions, classes, virtualenvs), basic command line, HTTP/JSON. No ML background is required; the math of vectors and similarity is taught in Module 4. Completing *RNK-LLM-301 Local LLM Engineering* first is helpful but not required.

Equipment and software

SetupWorks?Notes
Laptop, 8 GB RAM, no GPU✅Use small models (3B chat, nomic-embed-text) or offline mode
16 GB RAM, Apple Silicon / any modern CPU✅✅Comfortable with 3–8B chat models
NVIDIA/AMD GPU with ≥ 8 GB VRAM✅✅✅Fast; 8B models comfortable, rerank labs much quicker

Python 3.10+, NumPy, Ollama (or RAG_OFFLINE=1), Git, and a text editor.

The full setup guide, with verification steps, is in your learning materials when you enroll.

Format and study time

42 guided hours (10 modules × ~4 h + capstone clinic) plus ~15 h capstone build. Instructor-led cohort, 5-day intensive, or self-paced with office hours.

FormatScheduleContact hours
A. Part-time cohort (recommended)10 weeks; one 4-hour session per week (or 2 × 2 h) + capstone demo in week 1142
B. Intensive bootcamp5 consecutive days, 2 modules per day (8 h/day), capstone due 2 weeks later + remote demo42
C. Self-paced + office hours12 weeks recommended; weekly 1-hour office hours; recorded demo~40 + 12

Each scheduled class below states its own format, every meeting date and time, and its time zone.

What a seat includes

ComponentDetail
10 instructor-led modules~40 h of live teaching, each with lecture notes, a slide deck, a lab and a quiz
Production-grade lab codebaselabs/rag/, a small, readable RAG library (25 unit tests) that students build on and keep
Offline-capable labsDeterministic hashing embedder and extractive answerer, so every lab runs without a GPU
Golden evaluation datasetHand-written Q&A pairs with source attributions for regression testing
Capstone projectReal-world brief, milestone reviews and a 100-point rubric
Assessment suite10 quizzes (100 questions), a final exam (40 MCQ + 5 short answer + 2 design scenarios), answer keys, marking guides and rubrics
Verifiable certificatePDF certificate with grade tier and registry-backed verification ID
Curated bibliography60+ primary sources (papers, specifications, official docs)
Instructor kitRun sheets, timing, facilitation notes, troubleshooting and grading workflow

Curriculum

  1. 01
    Why RAG: architecture & first principles
    4 h · Lab: A 100-line RAG system, compared against a no-retrieval baseline
  2. 02
    Ingestion & document parsing
    4 h · Lab: A multi-format loader producing a clean JSONL corpus
  3. 03
    Chunking strategies
    4 h · Lab: Five chunkers plus a comparison report
  4. 04
    Embeddings
    4 h · Lab: An embedding lab covering prefixes, normalization and truncation
  5. 05
    Vector search & indexes
    4 h · Lab: Brute-force vs IVF index, with a recall/latency curve
  6. 06
    Lexical, hybrid retrieval & reranking
    4 h · Lab: BM25 from scratch, RRF fusion and a reranker
  7. 07
    Query transformation & advanced indexing
    4 h · Lab: Multi-query, HyDE, decomposition and contextual chunk headers
  8. 08
    Grounded generation & citations
    4 h · Lab: A citation-enforcing answerer with refusal behavior
  9. 09
    Evaluation & regression testing
    4 h · Lab: An evaluation harness with a golden set and an LLM judge
  10. 10
    Agentic RAG, security & production
    4 h · Lab: A secured RAG HTTP service with ACLs and an agentic loop
  11. ★
    Capstone clinic & demo day
    2 h · Lab: Capstone project

Assessment and completion

ComponentWeight
Labs (10 × 4%)40%
Module quizzes (10 × 1.5%)15%
Final exam15%
Capstone project30%
OutcomeRequirement
Distinction≥ 90% overall and capstone evaluation shows a supported improvement over baseline
Merit≥ 80% overall
Pass≥ 70% overall, capstone ≥ 70/100, ≥ 8 of 10 labs submitted, ≥ 80% attendance (Formats A/B)
Not yet competentBelow pass. May resubmit the capstone once within 30 days; certificate issued on passing

Simply opening a lesson or a video never counts as completing an assessment. Completion is recorded only when the published requirements are met and your instructor has confirmed the result.

Course outcomes and recognition. Each course page explains the training and assessment it includes. Any RNK Academy completion certificate records the course requirements you met. It does not by itself establish an accredited qualification, professional license or third-party credential.

Course policies

  • Late work: −10% per day, up to 3 days; after that, by arrangement only. One free 48-hour extension per student, no questions asked.
  • Collaboration: discuss freely; write your own code and reports. Capstone teams of two must document who did what.
  • AI assistants: allowed for coding, with disclosure in each report. You must be able to explain everything you submit. Fabricating results (metrics, outputs) is academic misconduct.
  • Data: never upload confidential or personal data to external services during labs. The course corpus is fictional and safe to use.
  • Accessibility: materials are searchable PDFs; their Markdown sources (screen-reader friendly, exportable to HTML) are available on request. Contact the instructor for accommodations (extra time, alternative formats).
  • Attendance (A/B): ≥ 80% required for certification; missed sessions can be made up by submitting the lab with a 1-page reflection.

Upcoming classes

No classes for this course are scheduled right now

New classes are added as instructors and dates are confirmed. Browse the courses to see what each one covers, or ask us about upcoming dates.