Introduction to private RAG
Design retrieval as a governed knowledge system rather than a prompt attachment.
Before you start
Module prerequisites: SAI-100. Check the exercise-specific tools and environment before running commands.
Module outcomes: Design a private ingestion and retrieval flow; Implement permission-aware retrieval; Evaluate grounding, citations, and no-answer behavior. This lesson contributes to that sequence.
RAG is a knowledge system
Retrieval-augmented generation connects governed source content to model behavior. The system includes acquisition, extraction, transformation, chunking, metadata, permissions, indexing, query processing, retrieval, reranking, context assembly, generation, citation, evaluation, and deletion.
Private hosting does not automatically preserve source permissions, prevent prompt injection, produce grounded answers, or keep sensitive content out of logs. These properties require architecture and tests.
Design principles
- Preserve source identity, classification, ownership, permissions, version, and lineage.
- Enforce authorization deterministically before content reaches the model.
- Treat retrieved content as untrusted data, not instructions.
- Make citations verifiable and define supported no-answer behavior.
- Evaluate retrieval and generation separately and together.
- Detect stale, deleted, poisoned, or permission-changed content.
- Minimize sensitive content in telemetry and evaluation artifacts.
Module outcome
You will produce a knowledge-source register, ingestion and permission design, retrieval and answer contract, evaluation set, release gate, and operational evidence package using synthetic or explicitly approved content.
Module worked example
Two users ask the same finance question, but only one may read the source document.
- Apply the control
- Filter active documents by the caller's permissions before retrieval context is assembled.
- Expected result
- The permitted actor gets a supported citation; the denied actor receives no finance context.
- Troubleshooting
- Inspect retrieved document IDs and cache identity. Removing a citation after generation cannot undo disclosure.
Practice and completion check
Choose one control from this lesson. Identify its actor, target, enforcement point and expected result. Describe an allowed case and a denied or failed case. For a runnable exercise, retain observed output and separate it from expected output. Record unresolved limitations before marking the lesson complete.
Your lesson progress
Completion is self-reported learning progress; it does not certify practical competence.
Status: Not marked
Loading your learning record…