01 Top-Down Exam Strategy & Logic Gates
- Order of Operations: Read the final sentence first to identify the core constraint, such as least operational overhead, most cost-effective, or minimize latency.
- The Well-Architected Baseline: Security is often the default priority in enterprise design, but the exam should always follow the stated requirement. If cost, speed, experimentation, or simplicity is the actual constraint, choose the option that best satisfies it while still applying reasonable security controls.
- The Ephemeral Compute Law: AWS Lambda is usually a poor fit for long-lived session state or large custom model weights; do not rely on Lambda memory or
/tmpwhen the requirement calls for durable state, strict latency, or specialized execution. - 50/50 Purge Filter: Default to native Bedrock or serverless options when the requirement is least operational overhead or lowest cost. Do not eliminate ECS/EKS/GPU cluster patterns outright when the requirement explicitly calls for strict latency, guaranteed throughput, pre-warmed inference, or specialized runtime control.
02 Official Domain Breakdown
| Domain | Weight and focus |
|---|---|
| Domain 1: Foundation Model Integration, Data Management, and Compliance (31%) | Focuses on RAG pipelines, vector stores like Aurora pgvector and OpenSearch Serverless, chunking strategies, and custom model deployment. |
| Domain 2: Implementation and Integration (26%) | Focuses on application integration, orchestration, Bedrock Agents, and real-time streaming via API Gateway WebSockets. |
| Domain 3: AI Safety, Security, and Governance (20%) | Focuses on PII redaction, prompt injection defense, topic boundaries via Bedrock Guardrails, and AWS PrivateLink. |
| Domain 4: Operational Efficiency and Optimization (12%) | Focuses on cost optimization, latency reduction, Prompt Caching, Batch Inference, and Provisioned Throughput. |
| Domain 5: Testing, Validation, and Troubleshooting (11%) | Focuses on full-stack observability via CloudWatch, X-Ray, Model Invocation Logging, and RAG metrics like factual grounding. |
03 End-to-End RAG Pipeline
- Step 1: Ingestion & Query Transformation: The client application sends the raw natural language query to the backend; optional rewriting occurs for multi-turn queries.
- Step 2: Vector Embedding Generation: The transformed text query is sent to an embedding model like Amazon Titan to convert the string into a high-dimensional dense vector.
- Step 3: Vector Database Retrieval & Hybrid Search: The query vector is sent to the vector index, such as Amazon OpenSearch Serverless or Aurora pgvector. An Approximate Nearest Neighbor (ANN via HNSW) search identifies the top-k similar chunks. k-NN Tradeoff: Increasing k increases candidate recall but degrades search performance (higher latency/compute); decreasing k speeds up search at the cost of recall.
- Step 4: Reranking & Context Filtering: Top candidate chunks pass through a Cross-Encoder or Reranker Model like Cohere to score true relevance.
- Step 5: Prompt Augmentation: The system constructs a structured prompt payload using Bedrock Prompt Management to combine context chunks, system instructions, and the user query.
- Step 6: Foundation Model Inference & Guardrails: The augmented prompt is passed to the Foundation Model. Amazon Bedrock Guardrails checks for prompt injections on ingress and verifies factual consistency on egress.
- Step 7: Response Delivery: The generated text along with chunk source citations is streamed back to the client UI in real time via WebSockets or Server-Sent Events.
04 Pipeline Validation & Defense-in-Depth
- Input: Validate identity, size, schema, and allowed operations.
- Application: Apply deterministic business rules and sanitize payloads.
- Generation: Evaluate output against the configured safety and quality policy.
- Operations: Monitor behavior over time for quality shifts and failures.
05 Vector Store Mechanics & Performance Tuning
Vector databases store dense embeddings for semantic search. Understanding how they index and scale is critical for troubleshooting retrieval latency:
- HNSW vs. Flat (Brute Force): HNSW (Hierarchical Navigable Small World) builds multi-layer graphs for Approximate Nearest Neighbor (ANN) search with logarithmic time complexity:
O(log N). Flat index performs exhaustive distance comparison across every vector inO(N)time. Always use HNSW at scale; Flat guarantees 100% recall for tiny datasets (<10k), but search latency explodes linearly as the index grows. - The k-NN Tradeoff (Recall vs. Latency): k specifies the number of nearest neighbors retrieved. Increasing k retrieves more candidate vectors (improving recall for downstream rerankers), but requires deeper graph traversal and larger candidate sorting, which increases query latency and degrades search performance. It never resolves slow search.
- Segment Architecture & Refresh Interval (OpenSearch / Lucene): OpenSearch flushes vectors into immutable Lucene segments on every index refresh (default: 1s). Crucially, an HNSW graph is built per segment, and k-NN queries must search every active segment's graph before merging results. Continuous ingestion with frequent refreshes creates dozens of tiny segments, severely degrading search latency as the index grows. Fix: Raise
index.refresh_interval(e.g., 30sβ120s) so vectors accumulate into fewer, larger segments with unified HNSW graphs. - OpenSearch Serverless (AOSS) Boundaries: AOSS automatically provisions and scales OpenSearch Compute Units (OCUs) for ingestion and search. Shards and replicas are completely managed and abstracted by AWS; developers cannot configure shard counts or search replicas for Serverless collections.
- Metadata Pre-filtering: Applying metadata filters before vector distance calculation prunes the candidate search space early, reducing search latency significantly more than adjusting k.