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:
- Explain the RAG architecture and pick between RAG, fine-tuning, long-context prompting, and tool use for a given problem, with a justification.
- Build an ingestion pipeline that parses Markdown, HTML, PDF and plain text into clean, metadata-rich documents.
- Design and measure chunking strategies (fixed, recursive, structure-aware, semantic, parent-child) and choose one from evidence.
- Select, run and evaluate embedding models, including instruction prefixes, normalization and Matryoshka truncation.
- Implement exact and approximate vector search, and measure recall against latency.
- Implement BM25 and hybrid retrieval with Reciprocal Rank Fusion, and add reranking.
- Apply query transformations (multi-query, HyDE, decomposition, routing) and advanced indexes (contextual retrieval, hierarchical summaries, graph-based retrieval).
- Engineer grounded generation: context assembly, citation enforcement, and refusal when the evidence doesn't support an answer.
- Evaluate RAG systems with retrieval metrics (Recall@k, MRR, nDCG) and generation metrics (faithfulness, relevance), and run regression tests in CI.
- 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
| Setup | Works? | 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.
| Format | Schedule | Contact hours |
|---|---|---|
| A. Part-time cohort (recommended) | 10 weeks; one 4-hour session per week (or 2 × 2 h) + capstone demo in week 11 | 42 |
| B. Intensive bootcamp | 5 consecutive days, 2 modules per day (8 h/day), capstone due 2 weeks later + remote demo | 42 |
| C. Self-paced + office hours | 12 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
| Component | Detail |
|---|---|
| 10 instructor-led modules | ~40 h of live teaching, each with lecture notes, a slide deck, a lab and a quiz |
| Production-grade lab codebase | labs/rag/, a small, readable RAG library (25 unit tests) that students build on and keep |
| Offline-capable labs | Deterministic hashing embedder and extractive answerer, so every lab runs without a GPU |
| Golden evaluation dataset | Hand-written Q&A pairs with source attributions for regression testing |
| Capstone project | Real-world brief, milestone reviews and a 100-point rubric |
| Assessment suite | 10 quizzes (100 questions), a final exam (40 MCQ + 5 short answer + 2 design scenarios), answer keys, marking guides and rubrics |
| Verifiable certificate | PDF certificate with grade tier and registry-backed verification ID |
| Curated bibliography | 60+ primary sources (papers, specifications, official docs) |
| Instructor kit | Run sheets, timing, facilitation notes, troubleshooting and grading workflow |
Curriculum
- 01Why RAG: architecture & first principles4 h · Lab: A 100-line RAG system, compared against a no-retrieval baseline
- 02Ingestion & document parsing4 h · Lab: A multi-format loader producing a clean JSONL corpus
- 03Chunking strategies4 h · Lab: Five chunkers plus a comparison report
- 04Embeddings4 h · Lab: An embedding lab covering prefixes, normalization and truncation
- 05Vector search & indexes4 h · Lab: Brute-force vs IVF index, with a recall/latency curve
- 06Lexical, hybrid retrieval & reranking4 h · Lab: BM25 from scratch, RRF fusion and a reranker
- 07Query transformation & advanced indexing4 h · Lab: Multi-query, HyDE, decomposition and contextual chunk headers
- 08Grounded generation & citations4 h · Lab: A citation-enforcing answerer with refusal behavior
- 09Evaluation & regression testing4 h · Lab: An evaluation harness with a golden set and an LLM judge
- 10Agentic RAG, security & production4 h · Lab: A secured RAG HTTP service with ACLs and an agentic loop
- ★Capstone clinic & demo day2 h · Lab: Capstone project
Assessment and completion
| Component | Weight |
|---|---|
| Labs (10 × 4%) | 40% |
| Module quizzes (10 × 1.5%) | 15% |
| Final exam | 15% |
| Capstone project | 30% |
| Outcome | Requirement |
|---|---|
| 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 competent | Below 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.