Ready
The retrieval contract, corpus provenance, authorization filters, ranking stages, claim-level support, evaluation evidence, monitoring, and rollback plan remain coherent under injected failures.
RAG lesson 08 · Defend the RAG system
Versioned evidence corpus · deterministic retrieval fixtures
Lighthouse Policy Evidence Assistant. A fictional support assistant answers questions from a versioned product-policy corpus. It must retrieve current, authorized evidence, cite exact source spans, and abstain when evidence is missing or conflicting.
01 · Smallest useful mechanism
The capstone asks for an architecture and release dossier that link every answer claim to corpus governance, retrieval evidence, context selection, generation validation, evaluation, monitoring, and recovery.
A vector search demo becomes a product only when evidence, authority, failure, and operation form one contract.
02 · Experiment
Deterministic retrieval fixture
This workbench uses inspectable ranking and evidence fixtures and injected failures. It does not make live calls or execute external effects.
Retrieval workbench · lighthouse-capstone-v8
Injected failure
The candidate index improves average recall while one replica serves deleted content, a poisoned duplicate ranks first, and reranking times out.
The trace has not run.
Commit to an implementation, then inject the failure and inspect the actual state transitions.
03 · Implementation brief
Your learning artifact
Stored only in this browser. No account required; course reset does not delete it.
Capstone decision rubric
The retrieval contract, corpus provenance, authorization filters, ranking stages, claim-level support, evaluation evidence, monitoring, and rollback plan remain coherent under injected failures.
The happy path works, but freshness, permissions, retrieval quality, abstention, citation support, or an operational recovery rule remains implicit or untested.
Forbidden, stale, or poisoned content can reach generation; unsupported claims can appear authoritative; or aggregate metrics hide failures that matter to users.
04 · Check your understanding
Primary sources · verified 2026-08-02
Teams often optimize components independently: better embeddings, a stronger reranker, a longer prompt. Compound failures reveal whether those improvements preserve the product’s authority and truthfulness.
Common mistake: Passing an end-to-end demo is enough to pilot. A pilot needs representative evaluation, critical safety gates, rollback, observability, governed data, and explicit residual risk.
Transfer exercise: Review Lighthouse under stale policy, missing evidence, cross-tenant near-match, reranker timeout, indirect injection, deletion lag, and a fluent unsupported answer.
Next: Return to the evaluation course to calibrate the judges, uncertainty, and production monitoring used in the RAG release dossier.