Courses / Data, AI & infrastructure / Retrieval-Augmented Generation

₹499Self-paced

Retrieval-Augmented Generation

Build a question-answering application that retrieves from a document set, cites its sources, abstains when evidence is weak and passes an evaluation and security gate.

  • Who it's for. Python learners who know embeddings and AI application basics and want answers grounded in their own documents.
  • Before you start. Prerequisite courses: the earlier course and the earlier course (see the production plan for their titles).
  • 28 to 48 hours of study with practice
  • 8 modules, 50 lessons
  • 3 guided projects and a final project

What you'll learn

  • Prepare a corpus: manifest with stable ids, faithful extraction, idempotent normalisation, deduplication and an ingest quality gate.
  • Build dense, lexical (BM25) and hybrid retrieval with filters, a reranking step and an explicit no-result path, and measure how they differ.
  • Produce answers whose claims map to citations, verify citations mechanically, and abstain or flag conflicts when evidence is missing or inconsistent.
  • Evaluate retrieval (hit rate, recall, precision, MRR, nDCG) and grounded-answer behaviour with a held-out question set, without a paid judge model, and report uncertainty honestly.
  • Deliver a persistent, restartable question-answering application with a retrieval evaluation report, setup instructions and a trainer-reviewed demonstration.

Skills you'll gain

  • Corpus preparation
  • Chunking
  • metadata
  • Retrieval design
  • Prompt context assembly
  • Grounding
  • citations
  • Evaluation
  • Injection
  • access boundaries
  • RAG application

Tools you'll use

  • Python
  • pytest
  • BM25
  • Dense and hybrid retrieval
  • Virtual environment

Details to know

  • Certificate on completionIssued after your final project is reviewed
  • 8 module checkpointsA quiz and a practical task close each module
  • Self-pacedStudy any time; your progress is saved

How every lesson works

Each lesson follows the same four steps, so you always know what comes next.

  1. 01

    Watch & Learn

    A short animated video explains one idea at a time.

  2. 02

    Guided Practice

    Work through an example step by step and check the result.

  3. 03

    Quiz & Challenge

    Short questions check the idea has landed before you move on.

  4. 04

    Mini Project

    Build something useful from a project brief.

Learn at your own pace

This is a self-paced course. There are no live classes and no fixed timetable.

  • Start any timeStudy when it suits you. Lessons are short, so they fit around work or college.
  • Pick up where you left offYour progress is saved to your account.
  • Ask when you're stuckUse Ask Mentor inside the learning platform.

Your path in 3 phases

Each phase ends with something you have built and checked.

  1. 01

    Modules 1 to 3

    Corpus, chunks and retrieval

    Prepare a versioned, deduplicated corpus, chunk it with metadata and stable ids, and build dense, lexical and hybrid retrieval.

    You build: Guided project: Ferry help desk index and retrieval baseline.

  2. 02

    Modules 4 to 6

    Context, citations and evaluation

    Assemble bounded prompt context, make every claim cite a source and abstain when evidence is missing, and evaluate with a held-out set.

    You build: Guided project: Cited answer generator with abstention.

  3. 03

    Modules 7 to 8

    Security and the RAG application

    Defend against indirect prompt injection and enforce document access, then assemble a persistent, restartable application with a release gate.

    You build: Guided project: Evaluated and hardened pipeline.

Full curriculum

8 modules and 50 lessons, 28 to 48 hours of study

01Corpus preparation6 lessons, 2 to 4 hours

Lessons

  • Parametric memory, retrieved memory and the two-phase RAG pipeline
  • Source inventory: deciding what enters the corpus
  • Extracting faithful text from HTML and Markdown
  • Normalising text without destroying evidence
  • Exact and near-duplicate detection
  • Corpus quality audit and ingest gate

After this module you can

  • Draw the index-time and query-time stages of a RAG system and attribute five symptom reports to the stage that most likely caused them.
  • Write a manifest with stable document ids, owner, version, date and licence for a folder of mixed files, and mark which files are excluded and why.
  • Produce an audit report of counts, empties, length outliers and encoding problems and fail the ingest gate when defined limits are exceeded.
02Chunking and metadata6 lessons, 3 to 4 hours

Lessons

  • Fixed-size chunking with overlap and its boundary failures
  • Structure-aware chunking on headings and paragraphs
  • Measuring chunk size trade-offs with retrieval hits
  • A metadata schema: what to store with every chunk
  • Contextual chunk headers and parent-child retrieval
  • Content hashes and incremental re-indexing

After this module you can

  • Implement character or word window chunking with overlap and predict which sentences are cut in half for a given size and stride.
  • Chunk heading-tagged blocks so that a chunk never crosses a section boundary, falling back to a size split only for oversize paragraphs.
  • Compute a content hash per chunk and update an index by adding new chunks, replacing changed chunks and deleting chunks whose source disappeared.
03Retrieval design7 lessons, 3 to 5 hours

Lessons

  • Embeddings, cosine similarity and brute-force top-k
  • Choosing and pinning an embedding model
  • A persistent vector store with metadata filters
  • Lexical retrieval with BM25
  • Hybrid retrieval and reciprocal rank fusion
  • Metadata filtering at query time and the empty-result contract
  • Reranking and score thresholds

After this module you can

  • Embed texts as vectors, compute cosine similarity with numpy and return the top-k chunk ids, predicting the ranking of small hand-made vectors.
  • Record the model name, vector dimension, maximum input length and any query or document prefix in an index manifest and refuse a query made with a different model.
  • Rerank a candidate list with a second scoring function and choose a score threshold from a labelled set, reporting the precision-recall trade-off.
04Prompt context assembly6 lessons, 3 to 4 hours

Lessons

  • Context budgets and token counting
  • Ordering, merging and deduplicating retrieved chunks
  • A prompt template with delimited, id-tagged sources
  • Rewriting follow-up questions into standalone queries
  • Decomposing compound questions and merging results
  • Weak evidence: stopping before the model is called

After this module you can

  • Fit ranked chunks into a stated token budget, reserving space for instructions and the answer, and report which chunks were dropped.
  • Merge adjacent chunks from the same section, remove near-identical chunks and choose an order, then test whether order changes the outcome on a small set.
  • Implement a pre-generation gate that returns a refusal-to-answer object when retrieval is empty or below threshold, and prove the model stub is not called.
05Grounding and citations6 lessons, 3 to 4 hours

Lessons

  • What a grounded answer is: claims, support and failure types
  • Citation markers and source maps
  • Mechanical citation verification without a judge model
  • Extractive answers versus paraphrased answers
  • Abstention policy for unanswerable and out-of-scope questions
  • Conflicting and outdated sources

After this module you can

  • Classify sentences of sample answers as supported, partially supported, unsupported or contradicted against the cited chunk, and name the failure type.
  • Require inline markers such as [S2], resolve them through the source map to document, section and URL, and render a human-readable reference list.
  • Detect that retrieved chunks disagree or that one is superseded, apply a precedence rule from the manifest and surface the conflict instead of choosing silently.
06Evaluation7 lessons, 3 to 5 hours

Lessons

  • Building a golden question set with labels and splits
  • Retrieval metrics: hit rate, recall and precision at k
  • Rank-aware metrics: MRR and nDCG
  • Grounded-answer checks that need no paid judge
  • LLM-as-judge and framework metrics: what they measure and what they cost
  • Ablations and error analysis by pipeline stage
  • Uncertainty, regression gates and the evaluation report

After this module you can

  • Author a labelled question set with expected chunk ids, answerability labels and a dev/held-out split, and audit it for leakage and label noise.
  • Compute hit rate@k, recall@k and precision@k from ranked ids and relevant sets and say which one answers which product question.
  • Compute bootstrap confidence intervals for a retrieval metric, define a regression gate that accounts for noise and write a report that states limitations.
07Injection and access boundaries6 lessons, 3 to 4 hours

Lessons

  • Indirect prompt injection through retrieved documents
  • Defensive context handling and output validation
  • Quarantining suspicious chunks at ingest and canary documents
  • Document-level access control enforced at retrieval time
  • Leakage through citations, caches and logs
  • A reproducible adversarial test suite

After this module you can

  • Build a threat-model table for a RAG system listing attacker-controllable content, the injected effect and the pipeline stage where it enters.
  • Wrap sources as inert data, strip or escape delimiter text, restrict the model to no tools and validate the answer deterministically before display.
  • Assemble an adversarial corpus and query set, run it as automated tests with a pass-fail table, and state what the suite does not prove.
08RAG application6 lessons, 3 to 4 hours

Lessons

  • Application architecture and the response contract
  • An idempotent end-to-end ingest command
  • The query path: retrieve, assemble, answer, verify, respond
  • Persistence, restart evidence and index versioning
  • Observability and latency and cost budgets
  • Release gate, evaluation report and demonstration package

After this module you can

  • Specify the module boundaries and a JSON response schema (status, answer, citations, retrieval trace) and write a validator that rejects malformed responses.
  • Run a single ingest command that chains manifest, extraction, normalisation, dedupe, audit gate, chunking and indexing, and prove two runs leave identical state.
  • Run the full gate (ingest, tests, retrieval metrics, grounding checks, security suite, restart) and assemble the evidence package for a trainer-reviewed demonstration.

What you'll build

3 guided projects along the way, then a final project.

  • Ferry help desk index and retrieval baseline

    after module 3
  • Cited answer generator with abstention

    after module 5
  • Evaluated and hardened pipeline

    after module 7

Final project

Grounded question-answering application with citations and retrieval evaluation.

What you submit

Source and artifact submission: ingest, index, query/answer code, requirements file, golden set and evaluation script in one repository.

How it's reviewed

Trainer-reviewed live demonstration including a deliberately failing query explained by pipeline stage. Marked against the course project review rubric.

Where you'll use it

  • Answer staff questions from a handbook with citations that can be checked.
  • Stop a document from reaching the model when the user is not allowed to see it.

Roles that use these skills

  • AI application developer
  • Machine learning engineer
  • Backend developer

Earn the certificate by building, not watching

  1. Complete the lessons and pass each module checkpoint.
  2. Build your final project and demonstrate it.
  3. OUTLEARN reviews your project and issues your certificate. It is not issued automatically.

Frequently asked questions

Do I need machine-learning experience?

No prior RAG, embedding or machine-learning experience is assumed. You need to write and test Python scripts and use a virtual environment.

Can I run it without paid services?

Setup instructions must work offline on a clean machine, with the free local lab option as the default.

How is Retrieval-Augmented Generation structured, and is it open now?

It has 8 modules and 50 lessons. It is not yet released to learners.

Be first in when Retrieval-Augmented Generation opens

Email us and we will tell you as soon as enrolment opens.

Notify me when it opens
₹499Opens soon
Notify me