Foundation Model Integration, Data Management, and Compliance
Implementation and Integration
AI Safety, Security, and Governance
Operational Efficiency and Optimization for GenAI Applications
Testing, Validation, and Troubleshooting
Sample questions with answers
8 of the 15 questions in this set, with the correct answer marked and every option explained.
1. A developer is building a customer-support assistant that must answer questions using the latest version of a company's internal knowledge base articles, without retraining or fine-tuning a foundation model. Which AWS service should the developer use to implement this retrieval-augmented pattern with the least custom infrastructure?
✓Amazon Bedrock Knowledge Bases
Knowledge Bases is a managed RAG solution: it ingests source documents, chunks and embeds them, stores the vectors, and handles retrieval-and-augmentation at query time -- exactly the 'answer from current docs, no fine-tuning' pattern with minimal custom infrastructure.
✗Fine-tune a foundation model on the knowledge base articles in SageMaker AI
Fine-tuning bakes a snapshot of the content into model weights and has to be re-run every time the articles change -- the opposite of 'latest version, no retraining.' It's also far more infrastructure than RAG for this use case.
✗Store the articles as plain text in Amazon S3 and pass the entire corpus in every prompt
Every foundation model has a finite context window; a growing knowledge base will eventually exceed it, and stuffing the whole corpus into every request wastes tokens and money even before that limit is hit.
✗Use Amazon Comprehend to classify each support ticket by topic
Comprehend does text classification and entity extraction, not semantic retrieval or grounding a foundation model's answers in a document set.
2. A GenAI application must keep working with degraded-but-acceptable latency if the primary foundation model's AWS Region becomes unavailable. Which design best satisfies this requirement?
✓Configure Amazon Bedrock Cross-Region Inference so requests can route to the model in another Region during a disruption
Cross-Region Inference is built specifically for this: it lets Bedrock route inference requests across a set of Regions, giving the application continuity when one Region has capacity issues or an outage, without the developer building custom failover logic.
✗Increase the Lambda function's memory allocation for the inference handler
More memory speeds up compute inside a single Lambda invocation; it does nothing to route around a Region-level model outage.
✗Cache every possible user prompt and response pair ahead of time
Not feasible for open-ended user input, and a cache doesn't help once a query isn't already cached -- it doesn't provide continuity for novel requests.
✗Reduce the model's max token output to shorten response time
Shortening output length is a latency/cost tuning knob under normal operation; it does not address a Region-level service disruption at all.
3. A team wants to adapt a foundation model to a narrow internal vocabulary without the cost and time of retraining the full model. Which technique fits this requirement?
✓Low-rank adaptation (LoRA)
LoRA is a parameter-efficient fine-tuning technique: it trains a small set of additional low-rank matrices instead of updating all of the base model's weights, so it adapts a model to a narrow domain far more cheaply and quickly than full retraining.
✗Increasing the model's context window size
Context window size controls how much text fits in a single request. It doesn't change what the model has learned, so it doesn't adapt vocabulary or behavior.
✗Lowering the temperature parameter at inference time
Temperature controls output randomness per request; it has no effect on the model's underlying knowledge or vocabulary and doesn't persist across requests.
✗Switching to a larger foundation model with more parameters
A bigger general-purpose model isn't the same as one adapted to a specific internal vocabulary, and it increases cost without targeting the actual gap.
4. A RAG application retrieves relevant document chunks but responses are frequently missing context because chunks are cut off mid-thought, splitting related sentences across separate vectors. Which change would most directly address this?
✓Switch from fixed-size chunking to chunking that respects the document's structure (e.g., paragraph or section boundaries)
Fixed-size chunking splits purely on a character or token count, which can cut a sentence or idea in half regardless of where it falls. Structure-aware chunking (by paragraph, heading, or section) keeps related content together, which is exactly the 'split mid-thought' symptom described.
✗Increase the foundation model's temperature setting
Temperature affects how varied or deterministic the model's wording is; it has no effect on what content the retriever hands the model in the first place.
✗Reduce the number of retrieved chunks passed to the model from five to one
Fewer chunks means less context overall, which would make a fragmentation problem worse, not better -- the model would have even less surrounding text to work with.
✗Store the vector embeddings in Amazon DynamoDB instead of a vector-search service
DynamoDB can hold metadata, but swapping the storage layer doesn't change how the source documents were segmented into chunks in the first place -- the fragmentation already happened upstream of storage.
5. A search application needs to combine exact keyword matching (for product SKUs and part numbers) with semantic similarity search (for natural-language questions) in a single query, and rank the combined results by relevance. Which approach best fits this requirement?
✓A hybrid search that combines keyword and vector search, optionally re-ranked with a reranker model
Hybrid search runs keyword (lexical) and vector (semantic) search together, which is exactly the two retrieval styles the requirement calls for, and a reranker model can then reorder the combined result set by relevance -- covering both the retrieval and ranking parts of the requirement in one architecture.
✗Vector search only, using a single embedding model
Pure vector search finds semantically similar text but is weak at exact-match lookups like SKUs and part numbers, which often need to match precisely rather than 'approximately similar.'
✗Keyword search only, using traditional full-text indexing
Keyword search handles exact terms like SKUs well but misses natural-language queries that don't share exact words with the source documents -- the semantic half of the requirement is left unaddressed.
✗Increase the foundation model's max output tokens
Output token limit controls response length, not how documents are retrieved or ranked -- it has no bearing on combining keyword and semantic search.
6. A developer is building a multi-step research agent that must reason about a problem, decide which tool to call next, observe the tool's result, and repeat until it has enough information to answer. Which pattern describes this agent design?
✓ReAct (reason-then-act) pattern implemented with iterative reasoning and tool calls
ReAct interleaves reasoning steps with actions (tool calls) and observations of the results, looping until the model decides it has enough information -- which is exactly the reason/act/observe/repeat cycle described.
✗A single synchronous API call to a foundation model with a long prompt
A single call returns one response with no ability to call a tool, observe its output, and decide on a next step -- there's no loop or intermediate reasoning.
✗Batch inference on a static dataset
Batch inference processes a fixed set of inputs offline; it isn't an interactive, multi-step reasoning loop that calls tools based on intermediate results.
✗Prompt caching to reduce token costs
Prompt caching is a cost-optimization technique for repeated prompt prefixes -- it doesn't describe how an agent reasons, chooses tools, or iterates.
7. An application must stream a foundation model's response to the user's browser token-by-token as it's generated, rather than waiting for the full response before showing anything. Which capability enables this?
✓Amazon Bedrock streaming APIs, delivered to the client over a mechanism like server-sent events or WebSockets
Bedrock's streaming APIs return the response incrementally as it's generated, and pairing that with server-sent events or WebSockets lets the browser render tokens as they arrive instead of waiting for the complete response.
✗Increasing the foundation model's provisioned throughput
Provisioned throughput guarantees inference capacity, which can improve overall speed, but it doesn't by itself deliver a token-by-token streaming experience to the client -- that requires the streaming API and a streaming transport.
✗Batching multiple users' requests into a single inference call
Batching combines multiple requests for throughput efficiency; it doesn't produce an incremental, real-time stream of a single response to one user.
✗Reducing the prompt length
A shorter prompt can reduce time-to-first-token somewhat, but it doesn't create the incremental delivery mechanism itself -- the response would still arrive all at once without a streaming API and transport.
8. A production GenAI application occasionally receives throttling errors from a foundation model API during traffic spikes. Which approach is the standard way to handle this gracefully without simply failing the user's request?
✓Retry the request using an SDK's built-in exponential backoff
Exponential backoff retries a throttled request after progressively longer delays, which spreads retry traffic out and gives the service time to recover capacity -- the standard resilience pattern for handling throttling without immediately failing the user's request.
✗Immediately return an error to the user on the first throttling response
This is the ungraceful outcome the question asks how to avoid -- a transient throttling error doesn't mean the request can never succeed, so failing immediately wastes a retry opportunity.
✗Permanently cache every response regardless of the request
Blanket caching of all responses doesn't address throttling on new, uncached requests, and caching every response regardless of content risks serving stale or incorrect answers.
✗Disable retries entirely to simplify the client code
Removing retries removes the exact mechanism that lets a transient throttling error resolve itself -- it makes the application less resilient, not more.
7 more questions in the app
Practise the full 15-question set with a timer, scoring and progress tracking.