The mental model

Retrieval-augmented generation supplies relevant source material to a model at request time. A knowledge base can help retrieve documents, but retrieval does not guarantee a correct or authorized answer. The retrieval path must preserve the user’s access boundary, and the application should show usable sources and handle missing or conflicting evidence.

For a trained model, the lifecycle includes data preparation, training, evaluation, deployment, monitoring, and eventual replacement. Track dataset and model versions so changes can be compared. For both predictive and generative systems, monitor real failure patterns and data shifts. A successful initial demonstration is not proof of sustained quality after the underlying data changes.

Decisions to make

  1. Apply authorization to retrieval before private source material reaches the model.
  2. Version evaluation data and compare quality before changing models, prompts, or retrieval settings.

Design exercise · no AWS resources needed

Work through a scenario

An internal assistant searches documents with different team permissions.

  1. Draw the identity boundary from the user through retrieval.
  2. Specify how forbidden documents are excluded before generation.
  3. Add a test case for missing evidence and a test for cross-team data exposure.

Check your understanding

Where should document access restrictions be enforced in a RAG system?

Continue with AWS documentation

Before following a deployment guide, review current pricing, permissions, and cleanup steps. Budget alerts are not a hard spending cap.

Saved in this browser. Press again to undo.

Prepaid · USD

Top up balance

Available balance: $0.00

Your balance works across Heap tools. A failed lookup or generation releases its reserved amount.