First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Foundation Model Integration and Application Development
A developer needs an Amazon Bedrock model to return structured JSON that validates against a supplied schema. Which feature should be enabled on the model invocation to constrain output to that schema?
- Response streaming with chunked event parsing
- Guardrails with a denied-topics policy
- Structured output via a JSON schema constraint Correct answer.
- Provisioned throughput with a commitment term
Explanation
Bedrock supports constraining a model's response to a supplied JSON schema so the output conforms to expected fields and types, which is exactly what schema-validated structured data requires. Streaming affects delivery, Guardrails filters content, and provisioned throughput affects capacity, so none of them enforce output shape.
Question 2Foundation Model Integration and Application Development
An application must send a single Bedrock Converse API request containing text plus a PDF document for analysis. Which message content block type carries the document?
- A system prompt block placed before the user turn
- A toolResult block returned from a tool call
- An image block with the media type set to application/pdf
- A document content block with the raw bytes or a referenced source Correct answer.
Explanation
The Converse API accepts multimodal message content, and non-text files such as PDFs are passed as document content blocks with a source and format. Image blocks are for image media types, toolResult blocks carry tool outputs, and system blocks hold instructions rather than payloads.
Question 3Foundation Model Integration and Application Development
A team wants the model to decide when to call an internal weather API during a conversation, with Bedrock returning the requested tool name and arguments to the application. Which capability provides this?
- Tool use (function calling) configured in the request Correct answer.
- A batch inference job with JSONL records
- A Bedrock knowledge base retrieval filter
- A Guardrail contextual grounding check
Explanation
Tool use lets the model emit a structured request naming a tool and its arguments; the application executes the tool and returns results for the model to continue. Guardrails, retrieval filters, and batch jobs do not give the model a mechanism to request function execution.
Question 4Foundation Model Integration and Application Development
Which parameter primarily controls the randomness of token selection in a Bedrock text generation request?
- Top-p
- Stop sequences
- Max tokens
- Temperature Correct answer.
Explanation
Temperature scales the sampling distribution: lower values make output more deterministic and higher values increase variety. Max tokens caps length, stop sequences end generation at a marker, and top-p truncates the candidate set rather than scaling randomness directly.
Question 5Foundation Model Integration and Application Development
An application needs to call a Bedrock model repeatedly with the same long reference document while varying only the final question. Which approach reduces redundant processing most directly?
- Enabling response streaming for each call
- Using prompt caching for the shared prefix Correct answer.
- Lowering max tokens below the document length
- Increasing the temperature on each request
Explanation
Prompt caching stores the processed representation of a repeated prefix so later requests reuse it instead of reprocessing those tokens. Temperature, streaming, and token limits change generation behavior but do not avoid reprocessing the shared document.
Question 6Foundation Model Integration and Application Development
Which Bedrock API is designed to run a single unified request format across multiple foundation model providers?
- StartAsyncInvoke
- Converse Correct answer.
- InvokeModel
- CreateModelCustomizationJob
Explanation
The Converse API provides a consistent message-based interface that works across supported models from different providers, so the same request structure can target multiple models. InvokeModel uses model-specific request bodies, while the other two operations handle training and asynchronous jobs.
Question 7Foundation Model Integration and Application Development
A developer wants to ground model answers in an owned document repository without building a custom vector store and retrieval pipeline. Which Bedrock feature should be used?
- A Bedrock knowledge base connected to the data source Correct answer.
- Bedrock Agents with an action group
- Model evaluation jobs with human workers
- Bedrock Guardrails with word filters
Explanation
A knowledge base manages ingestion, chunking, embedding, and vector storage, then retrieves relevant passages to ground responses. Agents with action groups call APIs, Guardrails filters content, and evaluation jobs measure quality rather than perform retrieval.
Question 8Foundation Model Integration and Application Development
Which statement describes how a Bedrock guardrail is applied during model invocation?
- It is evaluated on the input and the output of the request. Correct answer.
- It is enforced only for provisioned throughput models.
- It is evaluated only when the model returns a stop sequence.
- It is applied after the response is stored in CloudWatch.
Explanation
Guardrails inspect both the user input and the model response, blocking or masking content that violates configured policies such as denied topics, filters, or PII detection. They are not tied to stop sequences, throughput type, or logging destinations.
Question 9Foundation Model Integration and Application Development
A developer needs to invoke a Bedrock model from a Lambda function and wants temporary credentials that rotate automatically. Which mechanism should the function use?
- An API key embedded in an environment variable
- A public Bedrock endpoint that requires no signing
- A long-lived access key stored in the function code
- An IAM role attached to the function with bedrock:InvokeModel permission Correct answer.
Explanation
Lambda assumes an execution role and receives temporary credentials that rotate automatically, and the role policy must allow the required Bedrock actions. Hard-coded keys and embedded secrets create long-lived exposure, and Bedrock requests must be signed with valid credentials.
Question 10Foundation Model Integration and Application Development
An application streams a Bedrock Converse response to a web client. Which event type in the response stream carries incremental text that should be forwarded to the user?
- metadata
- messageStop
- messageStart
- contentBlockDelta Correct answer.
Explanation
Streaming responses emit events in sequence, and contentBlockDelta events carry the incremental text fragments as they are generated. messageStart announces the message, metadata carries usage information, and messageStop signals completion.
Question 11Foundation Model Integration and Application Development
A model occasionally produces answers that are not supported by retrieved passages. Which guardrail check most directly detects this condition?
- A contextual grounding check Correct answer.
- A prompt-attack filter
- A sensitive-information regex filter
- A denied-topics policy
Explanation
Contextual grounding evaluates whether a response is grounded in the supplied reference source and whether it is relevant to the query, returning grounding and relevance scores. Regex filters, prompt-attack filters, and denied topics address different risks.
Question 12Foundation Model Integration and Application Development
A developer must return a typed object from a Python application that calls a Bedrock model with tool use. Which setting ensures the model's tool request is parsed into the declared input schema?
- The toolSpec inputSchema describing parameters and types Correct answer.
- The system prompt listing the tool names
- The guardrailVersion attached to the request
- The inferenceConfiguration maxTokens value
Explanation
Each tool specification includes an input schema that declares parameter names and types, and the model's returned arguments are validated against that schema. Tool names alone do not define structure, and token limits or guardrail versions do not shape tool arguments.
Question 13Foundation Model Integration and Application Development
An application invokes a model that supports a 200K-token context window but receives an error when sending a 150K-token prompt. Which cause is most likely?
- The temperature is set too low for long prompts.
- The request exceeds the model's maximum output tokens.
- The input exceeds the model's per-request input token quota. Correct answer.
- The model requires streaming for prompts above 100K tokens.
Explanation
Context window size is shared between input and output, and service quotas or model-specific input limits can cap the input portion below the full window. Temperature, streaming requirements, and output limits do not explain an oversized-input rejection.
Question 14Foundation Model Integration and Application Development
A team wants deterministic, repeatable classification output from a Bedrock model for the same prompt and input. Which configuration best supports this goal?
- Random stop sequences on each request
- A different model per request chosen at random
- Temperature near zero with a fixed prompt and input Correct answer.
- High top-p with a high temperature
Explanation
Setting temperature close to zero makes sampling highly peaked so identical prompts tend to yield identical outputs, and keeping the prompt fixed removes another source of variation. High temperature, random stops, and random model choice all increase variability.
Question 15Foundation Model Integration and Application Development
A developer wants an agent to answer questions from internal documents and also look up order status through an API. Which Bedrock Agents configuration supports both?
- A knowledge base associated with the agent plus an action group Correct answer.
- A single action group with a Lambda function only
- A provisioned throughput model with no groups
- A guardrail with a denied topic for orders
Explanation
An agent can be associated with a knowledge base for retrieval-grounded answers and with action groups that invoke APIs through Lambda for transactional lookups. Action groups alone lack document retrieval, and guardrails or throughput settings do not add capabilities.
Question 16Foundation Model Integration and Application Development
A developer must choose between InvokeModel and Converse when the application will switch between models from two providers. Which consideration favors Converse?
- It bypasses IAM authentication for speed.
- It provides a common message structure across providers. Correct answer.
- It removes the need to handle response errors.
- It supports only one provider's request format.
Explanation
Converse normalizes requests and responses into a shared message format, so switching providers requires far fewer code changes than model-specific InvokeModel bodies. It still requires signed requests and proper error handling and does not lock to one provider.
Question 17Foundation Model Integration and Application Development
An application needs to summarize 50,000 documents overnight with no latency requirement. Which Bedrock approach is most cost-effective?
- Real-time streaming for each document
- A batch inference job over input records Correct answer.
- Provisioned throughput sized for peak concurrency
- Synchronous Converse calls from a web front end
Explanation
Batch inference processes large record sets asynchronously at a lower cost per item and suits workloads without interactive latency needs. Synchronous, streaming, and provisioned real-time capacity are priced and designed for interactive traffic.
Question 18Foundation Model Integration and Application Development
A developer wants to route requests to a cheaper model for simple prompts and a stronger model for complex ones without changing application code each time. Which Bedrock capability fits?
- A provisioned throughput commitment
- A model evaluation job
- A guardrail with a word filter
- An intelligent prompt router Correct answer.
Explanation
An intelligent prompt router selects among configured models based on prompt complexity and routing criteria, letting the application call one endpoint while cost and quality are balanced. Guardrails filter content, evaluations measure quality, and throughput commitments reserve capacity.
Question 19Foundation Model Integration and Application Development
A developer must give the model access to a proprietary SDK's documentation at inference time without retraining. Which approach is appropriate?
- Supply the relevant documentation in the prompt context. Correct answer.
- Disable guardrails so the documentation is not filtered.
- Increase max tokens until the documentation fits.
- Fine-tune the model on the documentation for each release.
Explanation
Retrieval-augmented prompting places relevant documentation in the request context so the model can use current information without weight updates. Fine-tuning is slower to refresh, token limits cannot exceed the window, and disabling guardrails does not add knowledge.
Question 20Foundation Model Integration and Application Development
An application must ensure that a model's response is valid JSON before downstream parsing, and the model supports structured output. Which combination is most robust?
- Rely on the prompt alone and parse with a permissive parser
- Use a JSON schema constraint and validate the parsed result Correct answer.
- Set temperature to one and retry until parsing succeeds
- Strip all punctuation before parsing the response
Explanation
Supplying a JSON schema constrains generation, and validating the parsed result catches any residual mismatch before downstream use. Prompt-only instructions are unreliable, high temperature increases malformed output, and stripping punctuation corrupts JSON.
Question 21Foundation Model Integration and Application Development
A RAG application returns answers that cite passages unrelated to the question. Which two changes most directly improve retrieval relevance?
- Increase temperature and reduce the number of retrieved chunks
- Remove metadata filters and disable reranking
- Switch to a larger output token limit and add stop sequences
- Tune chunk size and overlap, and use a hybrid search configuration Correct answer.
Explanation
Chunking determines the granularity of retrievable text, and hybrid search combines semantic and keyword signals to surface more relevant passages. Generation settings such as temperature, token limits, and stop sequences do not change which passages are retrieved.
Question 22Foundation Model Integration and Application Development
An agent must complete a multi-step task where each step depends on the previous tool result. Which design correctly supports this?
- Return all tool results in a single request before any tool runs
- Precompute every tool output and embed it in the system prompt
- Disable the agent's memory so steps stay independent
- Let the agent reason, invoke a tool, and continue with the returned result Correct answer.
Explanation
Agent orchestration lets the model plan, request a tool, observe the result, and decide the next action iteratively until the task completes. Precomputing outputs or batching results before execution breaks the dependency chain, and disabling memory removes needed context.
Question 23Foundation Model Integration and Application Development
A team needs to reduce prompt-injection risk for an application that passes untrusted user text to a model. Which combination of controls is most appropriate?
- Store the API key in the prompt to authenticate requests
- Add a prompt-attack guardrail filter and separate trusted instructions from user content Correct answer.
- Raise temperature and increase max tokens
- Remove system prompts and rely on the model's defaults
Explanation
A prompt-attack filter detects manipulation attempts, and clearly delimiting trusted instructions from untrusted content limits instruction override. Generation parameters do not address injection, removing system prompts weakens control, and secrets must never be placed in prompts.
Question 24Foundation Model Integration and Application Development
A developer observes that a Converse request intermittently fails with a throttling exception during traffic spikes. Which approach improves resilience without over-provisioning?
- Retry with exponential backoff and jitter, and add a queue for burst traffic Correct answer.
- Immediately retry in a tight loop until the call succeeds
- Reduce the model's context window to lower token use
- Switch to an unsigned request to bypass throttling
Explanation
Exponential backoff with jitter spreads retries so clients recover without synchronized retry storms, and a queue smooths bursts. Tight retry loops worsen throttling, context window settings are not client-configurable, and unsigned requests are rejected.
Question 25Foundation Model Integration and Application Development
A developer must select a model for a task that requires both image understanding and text generation, while keeping latency low. Which evaluation approach best supports the decision?
- Compare only published benchmark scores across all models
- Choose the largest model regardless of modality support
- Use a model evaluation job on representative samples measuring quality and latency Correct answer.
- Select the model with the highest max token limit
Explanation
An evaluation job runs candidate models on representative data and reports quality and performance metrics, which supports a decision grounded in the actual task. Size, generic benchmarks, and token limits do not confirm modality support or latency for the specific workload.
Question 26Foundation Model Integration and Application Development
A developer wants to send the same prompt to two different foundation models on Amazon Bedrock and compare their answers. Which API provides a common request structure that works with both models, reducing the need for provider-specific payloads?
- The InvokeModelWithResponseStream API
- The CreateModelCustomizationJob API
- The GetFoundationModelAvailability API
- The Converse API Correct answer.
Explanation
The Converse API defines a unified message-based request format that abstracts over provider-specific payloads, so the same request body can be sent to different models that support it. InvokeModel-style APIs require a model-specific JSON body. Model customization and availability APIs do not perform inference.
Question 27Foundation Model Integration and Application Development
A developer is building a Python service that calls a Bedrock model and wants the model to return arguments for a function in a structured, parseable form so the application can execute the function. Which capability should be configured?
- Streaming responses with chunk events
- A higher temperature value
- Tool use with a defined tool specification Correct answer.
- A longer maxTokens value
Explanation
Tool use lets the model emit structured tool name and input arguments that the application can parse and act on. Temperature affects randomness, maxTokens limits output length, and streaming changes delivery, but none of these produce structured function arguments.
Question 28Foundation Model Integration and Application Development
A developer needs to supply a large reference document to a model at inference time so the model can answer questions about it, without retraining or fine-tuning the model. Which approach accomplishes this?
- Include the document content in the prompt as context Correct answer.
- Increase the model's temperature setting
- Create a model customization job with the document
- Enable response streaming for the invocation
Explanation
In-context learning lets a model use material placed directly in the prompt, so the document can be supplied as context without changing model weights. Fine-tuning changes weights and is unnecessary for simple grounding. Temperature and streaming do not add knowledge to the prompt.
Question 29Foundation Model Integration and Application Development
A team wants to make a Bedrock model's output more predictable and less creative for a data-extraction task. Which inference parameter should they lower?
- TopP only after raising it
- MaxTokens
- StopSequences
- Temperature Correct answer.
Explanation
Temperature controls the randomness of token sampling; lowering it makes output more deterministic and focused. MaxTokens limits length, stop sequences end generation at a marker, and topP is a separate sampling control that is not simply raised to reduce creativity.
Question 30Foundation Model Integration and Application Development
An application invokes a Bedrock model and receives an AccessDeniedException even though the caller's IAM role allows bedrock:InvokeModel. What is the most likely cause?
- The response stream was not consumed
- The model's temperature is set too high
- The caller lacks permission to invoke the specific model resource or lacks a required model access grant Correct answer.
- The request body exceeds the maximum token count
Explanation
Bedrock authorization can depend on both the API action and the specific model resource, and model access may need to be enabled for the account. Temperature, token limits, and stream consumption produce different errors and do not cause access denial.
Question 31Foundation Model Integration and Application Development
A developer wants to use a foundation model in Amazon Bedrock that is not yet enabled for the account. What must typically happen before invocations succeed?
- The model must be exported to Amazon S3
- The developer must create a custom vocabulary
- The model must be attached to an Application Load Balancer
- Model access for that model must be requested or granted in the account and Region Correct answer.
Explanation
Bedrock requires that access to a given foundation model be granted for the account in the Region where it will be used. Exporting to S3, custom vocabularies, and load balancers are unrelated to enabling model access.
Question 32Foundation Model Integration and Application Development
A developer is choosing between provisioned throughput and on-demand invocation for a workload with steady, high, predictable traffic that must avoid throttling. Which choice best fits?
- Batch inference with a long completion window
- On-demand invocation with no capacity planning
- Cross-Region inference profiles alone
- Provisioned throughput sized to the expected load Correct answer.
Explanation
Provisioned throughput reserves model capacity for a period, which suits steady high-volume workloads that must avoid throttling. On-demand shares capacity and can throttle under spikes, batch inference is for asynchronous bulk jobs, and inference profiles route traffic but do not reserve capacity by themselves.
Question 33Foundation Model Integration and Application Development
An application sends a Converse request whose messages array alternates user and assistant turns, but the request is rejected with a validation error. Which issue is the most likely cause?
- The model supports multi-turn conversations
- The request omitted the topP parameter
- The system prompt was supplied as a separate field
- The conversation does not begin with a user message or the roles are not properly alternated Correct answer.
Explanation
Converse expects a well-formed conversation, typically starting with a user turn and alternating roles. Supplying a system prompt in its own field is valid, multi-turn support is expected, and topP is optional, so none of those would cause this validation error.
Question 34Foundation Model Integration and Application Development
A developer wants the model to produce a JSON object that conforms to a supplied schema so downstream code can parse it reliably. Which Bedrock feature should be used when the model supports it?
- Streaming with chunk events
- A higher maxTokens value
- A system prompt that asks for JSON without a schema
- Structured output with a JSON schema in the request Correct answer.
Explanation
Structured output constrains generation to match a provided JSON schema, which improves parse reliability. A prompt-only request for JSON is advisory and can drift, while maxTokens and streaming do not enforce schema conformance.
Question 35Foundation Model Integration and Application Development
A RAG application uses a Bedrock knowledge base and returns answers that ignore the retrieved content. Which change most directly improves grounding?
- Raise the temperature to encourage more varied answers
- Remove citations from the response
- Instruct the model to answer only from the retrieved passages and to state when the answer is absent Correct answer.
- Increase the model's maxTokens limit substantially
Explanation
Grounding improves when the prompt constrains the model to use retrieved passages and to abstain when information is missing. Raising temperature increases divergence from sources, removing citations reduces traceability, and increasing length does not improve faithfulness.
Question 36Foundation Model Integration and Application Development
A developer must invoke a Bedrock model from an application running in a VPC with no internet access. Which configuration enables private connectivity to the Bedrock endpoint?
- An interface VPC endpoint for Bedrock with private DNS enabled Correct answer.
- A public IP address on the instance
- An internet gateway attached to the subnet
- A NAT gateway with a public route
Explanation
Interface VPC endpoints powered by AWS PrivateLink let resources reach Bedrock without traversing the internet. NAT gateways, internet gateways, and public IPs all require or provide public network paths rather than private endpoint connectivity.
Question 37Foundation Model Integration and Application Development
A developer is building a chat application and wants to keep the model aware of earlier turns while limiting token usage. Which approach best balances context and cost?
- Send every prior turn in full on each request
- Send a trimmed history window plus a summary of older turns Correct answer.
- Store the entire transcript in the system prompt
- Send only the latest user message
Explanation
Conversation state is not retained by the model between calls, so the application must resend relevant history. A trimmed window with a summary preserves important context while controlling token growth. Sending all history grows cost, sending only the latest message loses context, and stuffing the transcript into the system prompt is inefficient.
Question 38Foundation Model Integration and Application Development
An application needs to classify support tickets into one of five categories and must return only the category label. Which prompt design most reliably achieves this?
- Ask the model to explain its reasoning before choosing
- Provide no examples or constraints
- Ask the model to answer in free-form prose
- State the task, list the allowed labels, and instruct the model to output only one label Correct answer.
Explanation
Clear task instructions with an explicit allowed-label set and an output-only constraint reduce extraneous text and ambiguity. Free-form prose, unconstrained prompts, and reasoning-first outputs make parsing less reliable for a strict label requirement.
Question 39Foundation Model Integration and Application Development
A developer wants to compare two prompt variants against a fixed evaluation dataset and measure which produces more correct answers. Which Bedrock capability is intended for this?
- Model evaluation jobs Correct answer.
- Provisioned throughput
- Model import jobs
- Guardrail versions
Explanation
Model evaluation jobs run a model or prompt configuration against a dataset and produce quality metrics for comparison. Guardrail versions manage safety policies, provisioned throughput reserves capacity, and model import jobs bring custom weights into Bedrock; none of these evaluate prompt quality.
Question 40Foundation Model Integration and Application Development
A developer needs to reduce latency for a real-time chat feature that streams answers to users. Which combination best supports a responsive experience?
- Disable streaming and wait for the full response
- Increase maxTokens to the maximum allowed
- Use batch inference and poll for results
- Use response streaming and select a lower-latency model appropriate to the task Correct answer.
Explanation
Streaming delivers tokens as they are generated, improving perceived latency, and choosing a model suited to low-latency tasks reduces time to first token. Batch inference is asynchronous, larger output limits increase generation time, and waiting for the complete response delays display.
Question 41Foundation Model Integration and Application Development
A developer must ensure that a Bedrock model invocation returns a response even when a specific model endpoint is temporarily unavailable. Which design most directly improves resilience?
- Retry the same endpoint indefinitely without backoff
- Increase the temperature for each retry
- Configure a fallback to an alternate model in the same request flow Correct answer.
- Remove error handling to reduce overhead
Explanation
Falling back to an alternate model keeps the application responsive when a primary endpoint is unavailable. Unbounded retries without backoff can worsen congestion, temperature changes do not address availability, and removing error handling increases failure impact.
Question 42Foundation Model Integration and Application Development
A developer is designing a multi-tenant application where each tenant's prompts must be isolated and usage tracked separately. Which approach best supports per-tenant cost attribution?
- Disable logging to reduce storage cost
- Rely on the model to report tenant identity
- Tag requests and log usage metrics per tenant, then aggregate by tag Correct answer.
- Use a single shared log with no tenant identifier
Explanation
Per-tenant attribution requires that each invocation be associated with a tenant identifier, such as a tag or log field, so usage can be aggregated. A shared log without identifiers, model-reported identity, or disabled logging cannot reliably attribute cost.
Question 43Foundation Model Integration and Application Development
A developer wants to reduce hallucinations in a summarization workload that uses long source documents. Which technique most directly supports faithful summaries?
- Increase temperature to make summaries more fluent
- Ask the model to add background knowledge
- Shorten the source by truncating arbitrarily
- Require the summary to cite spans from the source and reject unsupported claims Correct answer.
Explanation
Requiring citations to source spans and rejecting unsupported statements ties output to the input and exposes unsupported content. Higher temperature and added background knowledge increase divergence, and arbitrary truncation can remove essential facts.
Question 44Foundation Model Integration and Application Development
A team needs to route requests between a small model and a large model based on prompt complexity while keeping a single application interface. Which design best meets this requirement?
- Duplicating provider-specific request code in every service
- Hard-coding a single model for all requests
- Sending all requests to the largest model regardless of complexity
- A router component that classifies prompts and selects a model through a common Converse-style interface Correct answer.
Explanation
A routing layer can classify prompt complexity and dispatch to the appropriate model behind a unified interface, preserving flexibility and controlling cost. Hard-coding one model, duplicating provider-specific code, or always using the largest model sacrifices either adaptability or cost efficiency.
Question 45Retrieval-Augmented Generation and Knowledge Integration
A team is building a RAG application on Amazon Bedrock and wants the fully managed option that handles document ingestion, chunking, embedding, and retrieval with minimal custom code. Which AWS service should they choose?
- Amazon OpenSearch Service with a custom ingestion pipeline
- Amazon Kendra with a Lambda-based chunker
- Amazon Aurora PostgreSQL with the pgvector extension
- Amazon Bedrock Knowledge Bases Correct answer.
Explanation
Amazon Bedrock Knowledge Bases is the managed RAG capability that performs ingestion, parsing, chunking, embedding generation, and vector storage, and exposes a Retrieve and RetrieveAndGenerate API. The other choices require the team to build and operate the ingestion and embedding pipeline themselves.
Question 46Retrieval-Augmented Generation and Knowledge Integration
Which statement best describes the role of an embedding model in a retrieval-augmented generation system?
- It generates the final natural-language answer from retrieved passages.
- It compresses the prompt so that fewer input tokens are billed.
- It reranks candidate passages by issuing a second LLM call per passage.
- It converts text into dense vectors so that semantically similar content is close in vector space. Correct answer.
Explanation
An embedding model maps text into a fixed-length numeric vector where semantic similarity corresponds to geometric proximity, enabling nearest-neighbor retrieval. Answer generation is the job of the text generation model, not the embedding model.
Question 47Retrieval-Augmented Generation and Knowledge Integration
A developer needs to split long PDFs into chunks before embedding. Which chunking approach most directly preserves semantic coherence compared with fixed-size character splitting?
- Splitting every 200 characters regardless of content
- Splitting on sentence or paragraph boundaries with overlap Correct answer.
- Splitting on every whitespace token
- Splitting each page into a single chunk
Explanation
Chunking along natural linguistic boundaries such as sentences or paragraphs keeps related ideas together, and adding overlap preserves context that would otherwise be cut at the boundary. Arbitrary fixed-size cuts frequently split a single idea across chunks and degrade retrieval quality.
Question 48Retrieval-Augmented Generation and Knowledge Integration
Which metric is most appropriate for evaluating whether the retrieval stage of a RAG pipeline returns the passages that actually contain the answer?
- Latency of the embedding API call
- Recall at k of the relevant passages Correct answer.
- BLEU score of the generated answer
- Number of tokens in the prompt
Explanation
Recall at k measures what fraction of relevant passages appear among the top k retrieved results, which directly assesses retrieval quality. BLEU evaluates generated text similarity and says nothing about whether the right source documents were found.
Question 49Retrieval-Augmented Generation and Knowledge Integration
What is the primary purpose of including source metadata (such as document title and URI) alongside retrieved chunks in a RAG response?
- To increase the temperature of the generation model
- To reduce the number of embedding dimensions stored
- To enable citations and traceability back to the original source Correct answer.
- To automatically fine-tune the foundation model
Explanation
Metadata attached to retrieved chunks lets the application surface citations so users can verify answers against the original documents. It also supports filtering and access control during retrieval.
Question 50Retrieval-Augmented Generation and Knowledge Integration
Which vector store option is natively integrated with Amazon Bedrock Knowledge Bases as a supported vector database for storing embeddings?
- Amazon OpenSearch Serverless Correct answer.
- Amazon DynamoDB Streams
- Amazon SQS
- AWS Step Functions
Explanation
Amazon OpenSearch Serverless provides a vector engine that Bedrock Knowledge Bases can use as a supported vector store. DynamoDB Streams, SQS, and Step Functions are messaging or orchestration services and do not store or index vectors for similarity search.