RAG data boundary lab
Goal: learn retrieval-augmented generation by focusing on the security question first: what is the model allowed to retrieve?
Outcome
You should finish with a simple RAG design that separates public learning docs from private or restricted data, then documents how access is controlled.
Example AWS shape
- Data source: S3 bucket with public-safe sample docs only.
- Indexing path: Amazon Bedrock Knowledge Bases or a small vector-search lab.
- Encryption: KMS-managed encryption for storage where applicable.
- Access: IAM role scoped to only the approved bucket or collection.
- Logging: CloudTrail for API activity and CloudWatch for app behavior.
Runbook steps
- Create a public-safe sample document set. Do not use confidential data.
- Label each document as public, internal-test, or restricted. Only public-safe docs go into the lab.
- Write the retrieval boundary before building the index.
- Build or diagram the retrieval flow.
- Test questions the system should answer and questions it should refuse or not know.
- Record where logs and access records would be reviewed.
Questions to answer
- Can the model access only the intended documents?
- What happens if a user asks for data outside the allowed set?
- Where could sensitive information leak into logs?
- Who can update the source documents?
- How would stale or poisoned documents be removed?
Portfolio artifact
Create a RAG boundary diagram plus a short test plan. Show what data is allowed, what data is blocked, who can update it, and how retrieval behavior is checked.