AIP-C01 Study Hub
Implementation Week 2 · Thursday

Day 11: Hands-On Build - RAG App with Guardrails (Part 1)

Learning Objectives

  • - Create a Bedrock Knowledge Base with OpenSearch Serverless
  • - Configure chunking strategies and compare results
  • - Create a Bedrock Guardrail with content filters, PII, denied topics
  • - Test retrieval quality via the console

Tasks

Tasks

0/3 completed
  • Read30m

    Bedrock Knowledge Base Tutorial

    Step-by-step guide to creating a Knowledge Base in the console.

  • Blog25m

    Guardrails Content Filters, PII, and Streaming

    Follow this as a practical guide for setting up guardrails.

  • Hands-on120m

    Build: RAG App with Guardrails (Steps 1-5)

    1) Create S3 bucket + upload PDF, 2) Create KB with OpenSearch + Titan Embeddings, 3) Configure chunking, 4) Test retrieval, 5) Create Guardrail with content filters, PII, contextual grounding.

Exam Skills

Write your understanding, then reveal the reference answer.

0/3 reviewed

Hands-On Lab

Build real muscle memory with these activities.

intermediate 60 min

Create a Knowledge Base with Different Chunking Strategies

Build the first half of the RAG app by creating the KB and testing chunking options.

  1. 1 Create an S3 bucket called 'rag-build-data' and upload 3-5 PDF documents
  2. 2 Create a Bedrock Knowledge Base with OpenSearch Serverless and Titan Embeddings v2
  3. 3 Set chunking to 'Fixed size' with 300 tokens and 20% overlap
  4. 4 Sync the data source and test retrieval with 3 queries in the console
  5. 5 Note the chunk relevance scores for comparison later
Open Lab
intermediate 45 min

Create a Guardrail with Content Filters and PII Detection

Configure a comprehensive Bedrock Guardrail with multiple filter types.

  1. 1 Open Bedrock → Guardrails → Create guardrail
  2. 2 Add content filters: set HATE, INSULTS, SEXUAL, VIOLENCE, MISCONDUCT to HIGH strength
  3. 3 Add PII detection: enable SSN, credit card, email with ANONYMIZE action
  4. 4 Add a denied topic: 'competitor product comparisons'
  5. 5 Enable contextual grounding with threshold 0.7 for grounding and 0.5 for relevance
Open Lab

Practice Questions

18 questions across 3 difficulty levels.

Further Reading

Go deeper into today's topics.