Amazon AWS Certified Generative AI Developer - Professional AIP-C01 Practice Test 21
Question 200
An international help assistant searches policies for employees of several legal entities. UK and Singapore rules use overlapping terminology but different rights. How should retrieval select sources?
- Index country and legal-entity metadata and enforce authorization and jurisdiction filters before similarity ranking.
- Choose whichever policy has the most similar phrase, regardless of the employee’s entity.
- Combine every jurisdiction into one synthetic policy without retaining original versions.
- Ask the user to accept all possible answers without verifying which country applies.
Explanation
Correct Answer
A:Capture controlling jurisdiction, effective dates, employing entity and document version during ingestion. Resolve the authenticated user’s permitted entity and declared case context, filter eligible policy passages before ranking, and cite the governing source. Test ambiguous cross-border employees and escalate when legal applicability cannot be established. Include a cross-border user scenario where multiple policy scopes could apply. The same wording can mean different legal obligations in two employing jurisdictions.
Incorrect Answers
B:Semantic relevance cannot determine which legal jurisdiction is authoritative. A nearly identical phrase can correspond to materially different entitlements. Use explicit validated jurisdiction fields to avoid confident but wrong advice.
C:Merging conflicting source texts destroys provenance and can invent a rule that no legal entity actually adopted. Keep each policy version separately attributable, then retrieve within the correct scope. The same wording can mean different legal obligations in two employing jurisdictions.
D:A generic disclaimer does not determine which legal rule should govern a specific answer. When entity or jurisdiction is unknown, gather authorized context or decline to provide a definitive policy conclusion.
Question 201
A revenue assistant retrieves product-price memos, including draft offers that only pricing managers may see. What should the retrieval pipeline enforce before passages are ranked?
- Allow all users to search every price memo but shorten the returned summaries.
- Return the most similar pricing memo and ask the model not to quote confidential paragraphs.
- Store publication state and group permissions as chunk metadata, and filter candidates using verified requester entitlements.
- Convert draft prices into embeddings because vectors cannot reveal confidential information.
Explanation
Correct Answer
C:Ingestion must preserve who may see each document and whether its price has been published. Query-time filters should derive from authenticated identity, not caller-supplied text. Apply those filters before semantic ranking, test an unauthorized salesperson against unpublished offers, and log the source version used by an approved answer. Test a normal salesperson query against a draft price memo and require a denial before inference.
Incorrect Answers
A:Shorter summaries can still contain unpublished prices. Broad search access also exposes titles, snippets and usage patterns before generation. Restrict the index response based on actual authorization. A visibility label belongs to the source record and must be checked before search results reach generation.
B:A model instruction is not a reliable authorization boundary once a draft memo reaches the prompt. Even partial quotations can reveal a pending discount. Deny retrieval upstream rather than trust answer wording to hide it.
D:Embeddings retain information about source text and may support inference or reconstruction of sensitive content. Vectorization does not transform a confidential document into public data. Keep source-level access controls and explicit visibility metadata.
Question 202
A payroll-reconciliation agent uses an API connector that authenticates successfully with its service role. An ordinary employee asks it to retrieve another employee’s salary. What is the decisive missing control?
- Raise model temperature so it is less likely to repeat a salary.
- Enforce the requesting employee’s business entitlements at the payroll API even when the connector has its own service identity.
- Trust the agent’s system prompt as the only enforcement of salary access.
- Grant the connector administrator rights so requests never fail.
Explanation
Correct Answer
B:Authentication of the connector proves which workload is calling, not which records the initiating employee may access. Propagate verified user context or apply a server-side authorization decision before each payroll read. Audit requester, purpose and target, and ensure no service token allows unauthorized cross-employee enumeration. Try a cross-employee payroll lookup using a valid connector credential and confirm the API refuses it.
Incorrect Answers
A:Sampling randomness changes generated text but cannot undo a successful unauthorized payroll lookup. The exposure occurs at the backend data-access boundary. Limit the API response rather than hoping the model omits sensitive fields.
C:Instructions can guide an agent but are not a substitute for API access checks. A model can misunderstand or be manipulated by input. The payroll service must independently enforce each resource-level decision.
D:More privilege expands the potential impact of prompt injection or a compromised agent. It does not create employee-level permissions and would make inappropriate salary requests easier to satisfy. Prefer narrowly scoped access and delegated authorization.
Question 203
A passport-renewal support assistant only needs to classify the inquiry and suggest public instructions. Customers nevertheless upload passport images. What should data preprocessing do?
- Archive full passport scans forever because they could be useful in later training.
- Send the full image to every model invocation so the assistant can decide what it might need.
- Mask passport numbers only in the final response after logging the complete raw request.
- Extract only the minimal issue category and approved non-identifying context; discard raw images unless explicitly required and authorized.
Explanation
Correct Answer
D:Define the legitimate input purpose and use trusted preprocessing to derive the issue type without transmitting document numbers or faces. Do not retain the original image merely because it was uploaded. Apply documented deletion and access policies, and test diagnostic logs for residual data. Route exceptions needing identity verification through a separate approved workflow. Audit model prompts and diagnostic traces to ensure passport numbers never reach an unnecessary service.
Incorrect Answers
A:Indefinite collection greatly expands confidentiality risk and lacks a task-specific retention basis. A support classification task can usually be performed without keeping passports. Follow a bounded business retention schedule. Passport images include high-impact identity fields that the described public guidance task never needs.
B:The ability to upload a file does not imply that the application needs all of its contents. Model-side filtering happens after exposure to the inference endpoint. Minimize fields before constructing the request.
C:Output masking does not remove personal details from prompt logs, traces or model inputs. Protect privacy before collection, retrieval and export, rather than only changing what the user sees. Passport images include high-impact identity fields that the described public guidance task never needs.
Question 204
A subscription analytics report is published each Friday and causes a predictable surge of GenAI requests. The on-demand model quota is exceeded during that interval. What should capacity planning use?
- Disable admission controls so every client can retry without limits.
- Forecast peak input/output token throughput and request concurrency, then choose supported capacity or quota arrangements for the measured burst.
- Increase output length on every request to make individual calls more important.
- Provision for the average hourly request count and assume the peak will not matter.
Explanation
Correct Answer
B:Use observed Friday token rates, burst duration, model limits and latency SLOs to size provisioned or on-demand capacity. Check quotas, concurrency and request distribution, then load-test with peak-like traffic. Combine capacity with fair queueing and bounded backoff so one client cannot starve others. Revisit the allocation when report readership changes. Load-test the Friday peak with token limits and concurrency matching the actual report traffic.
Incorrect Answers
A:Unlimited retries can amplify throttling into a retry storm and harm availability. Use request limits, jittered backoff, workload prioritization and measured capacity instead of allowing uncontrolled contention. Peak concurrent input and output token demand determines whether configured model quotas are sufficient.
C:Longer output consumes more tokens and may worsen throughput bottlenecks. It does not raise the service quota or reduce simultaneous invocation pressure. Constrain output to business needs. Peak concurrent input and output token demand determines whether configured model quotas are sufficient.
D:An hourly mean can hide a short high-concurrency spike that breaches request or token quotas. The affected users experience the peak, not the average. Model sizing should reflect percentile load and recovery requirements.
Question 205
An agent can purchase travel tickets, but during testing it books one without obtaining the user confirmation required by company policy. What evaluation should be added?
- Score the agent only on how quickly it writes the itinerary.
- Add negative-path tests that withhold, deny or delay approval and verify the booking tool never executes without explicit authorization.
- Hide the booking transaction receipt from test reviewers.
- Reward the agent for completing every booking regardless of user approval.
Explanation
Correct Answer
B:Define approval as an externally enforced prerequisite and test distinct states: missing, rejected, expired, replayed and approved. Inspect backend tool receipts rather than the agent’s statements. A passing result requires no purchase before valid approval, including retries and resumed conversations. Document the user who authorized the exact transaction. Replay an expired approval and confirm the purchase API rejects it even if the agent insists it is valid.
Incorrect Answers
A:Itinerary fluency and speed do not establish that the final purchase was permitted. A test can succeed linguistically while causing an unauthorized financial action. Include state transitions and tool-level evidence.
C:Without receipts, a claimed booking cannot be verified and improper purchases may go unnoticed. Preserve immutable test tool logs with order identity and approval correlation. The booking API needs an independently verified approval token, not a model-generated statement of consent.
D:Such a reward would optimize for a policy breach. The agent must sometimes stop, ask a question or refuse a purchase. Success criteria should include authorization, not only task completion.
Question 206
A scientific literature assistant must use only peer-reviewed, approved papers. Its similarity search frequently retrieves unpublished preprints because they share terminology. How should the corpus be designed?
- Track review/approval status and source provenance in index metadata, enforce that status before relevance ranking, and validate the citations.
- Lower sampling temperature and assume that makes the source peer reviewed.
- Delete journal and publication metadata so only embeddings determine relevance.
- Boost any paper with more keywords, whether published or not.
Explanation
Correct Answer
A:Record each source’s publication state, approval evidence, version and rights at ingestion. The retrieval layer should filter to authorized reviewed documents before semantic ranking and reject results whose metadata is missing or stale. Test cases where an unreviewed preprint is a closer semantic match than the approved paper and verify citation metadata in the answer. Test an unapproved preprint that is more similar to the question than the accepted journal version.
Incorrect Answers
B:Sampling temperature affects how a language model selects tokens, not whether an indexed paper completed peer review. A preprint can remain the closest semantic match even when the assistant generates deterministically. Require verified publication and approval metadata before that source is eligible for retrieval and citation.
C:Removing journal, revision and approval metadata discards the very evidence needed to distinguish an approved peer-reviewed paper from an unpublished preprint. Embedding vectors describe semantic similarity but do not confer publication status. Preserve reliable source identifiers and filter the eligible corpus before ranking matches.
D:Keyword density may improve lexical relevance but says nothing about whether a paper has passed the specified review process. An unpublished preprint can mention the search terms more often than an approved article. Check source approval first, then rank only eligible documents and validate final citations.
Question 207
An external vendor application must read only `s3://company-docs/approved/` for a GenAI integration. Which identity approach avoids distributing a long-lived high-privilege AWS key?
- Give the vendor broad AdministratorAccess but block most actions in a prompt.
- Issue a cross-account role with temporary credentials but allow reads from the whole documentation bucket, including private prefixes.
- Share a root user access key and ask the vendor to promise not to browse other buckets.
- Use supported federation or a dedicated assumed role limited to required S3 actions, resources and trust conditions.
Explanation
Correct Answer
D:Configure a tightly scoped IAM role with a verified external trust relationship, appropriate external ID or federation conditions, and resource permissions limited to the approved prefix and required operations. Use temporary credentials, monitor access and test denied reads outside the scope. Rotate or revoke trust when the integration ends. Exercise reads outside the approved S3 prefix and reject them using the vendor role’s effective policy.
Incorrect Answers
A:Model prompts do not enforce AWS IAM authorization and cannot restrict arbitrary API calls from a privileged principal. Admin rights would enable unrelated storage and infrastructure operations. Apply least-privilege policies.
B:Temporary credentials reduce credential lifetime but do not correct excessive resource scope. The vendor needs only the approved prefix, and cross-account trust conditions must identify the intended partner. Constrain IAM resource ARNs and actions, then test denied reads outside `approved/`.
C:Root credentials have account-wide consequences and are unsuitable for external application integration. A confidentiality agreement cannot constrain API operations. Use a dedicated scoped role and temporary authentication. Temporary role credentials can be individually scoped and revoked when the vendor’s integration ends.
Question 208
A project proposes reusing old customer chat conversations as GenAI evaluation data. The transcripts contain contact information and sensitive support narratives. What should the preparation workflow do?
- Copy the entire raw history to a public dataset so reviewers can search it.
- Obtain authorized use, minimize or anonymize sensitive fields, and test for residual identifiers before any model reuse.
- Rename the conversation files to random values and assume their contents are anonymous.
- Remove the final customer-facing response but retain all unredacted conversation turns.
Explanation
Correct Answer
B:Confirm the documented purpose, use rights and retention constraints, then remove or transform unnecessary identifying content. Evaluate both direct identifiers and contextual reidentification risk, restrict access to the prepared corpus and preserve appropriate provenance. Sample the exported data and test whether names, phone numbers and account references remain recoverable. Review a representative exported sample for remaining phone numbers and uniquely identifying narratives.
Incorrect Answers
A:Public publication of support narratives would create uncontrolled disclosure and likely exceed the original support purpose. Even a security evaluation dataset needs a lawful authorized scope. Prepare a private minimized sample.
C:Changing filenames does not remove names, addresses or unique personal stories from message bodies. Anonymity must be evaluated on content and combinations of attributes, not the storage path. Contact details inside the transcript can survive superficial filename changes and incomplete redaction.
D:Earlier turns can contain more sensitive data than the final response and may still expose the customer. The entire conversation used for evaluation must be reviewed, minimized and protected. Contact details inside the transcript can survive superficial filename changes and incomplete redaction.
Question 209
An approximate vector search meets retrieval quality targets but p95 latency has risen sharply after the index tripled in size. What should the engineer investigate first?
- Profile vector-search stages and filter selectivity, then tune shards, replicas or ANN search settings against measured recall.
- Double the embedding vector dimensionality without rebuilding the index or measuring recall.
- Remove authorization filters to reduce compute even if this returns private documents.
- Scale the number of model-inference workers without profiling vector-search latency or index filter selectivity.
Explanation
Correct Answer
A:Collect query traces that separate filter evaluation, candidate search, scoring and network latency under representative corpus and tenant sizes. Test candidate-budget, shard and replica changes while checking recall against a frozen judged set. The goal is a measured latency/quality tradeoff that preserves tenant isolation, not a blind resource increase. Compare p95 search time and recall at k after each index configuration change.
Incorrect Answers
B:Larger vectors can increase memory and search cost, and incompatible dimensions can invalidate the existing index. Dimensionality is not a generic fix for query-stage bottlenecks. Profile and benchmark before model changes.
C:Bypassing permission filters could cause unauthorized source exposure and is not a valid performance optimization. Use index structures supporting filtered ANN queries and measure the cost of enforcement. A bottleneck in approximate vector search will not be solved by changing the generator’s sampling temperature.
D:The identified bottleneck is approximate nearest-neighbor retrieval after the index grew, not model generation. More inference capacity does not repair slow search stages. Profile p95 query time, filter behavior and index layout; then tune shards, replicas or ANN parameters against judged recall.
Question 210
Any engineer with the shared notebook role can invoke every paid foundation model in an AWS account. Security wants only an approved model available for the production service. Which control addresses this?
- Add a message instructing employees to avoid expensive models while leaving IAM unchanged.
- Grant the service broader IAM rights but lower its maximum output-token value.
- Remove all CloudTrail records so extra invocations are less visible.
- Scope the workload IAM permissions to required Bedrock invocation actions and allowed model or inference-profile resources.
Explanation
Correct Answer
D:Use an application-specific role, allow only the necessary Bedrock runtime actions for approved resources and deny unauthorized alternatives through policy design as applicable. Check model access, inference profiles and cross-region behavior, then test allowed and denied invocations with the actual workload identity. Logging and quotas complement IAM, not replace it. Attempt the same model call using an unapproved ARN and verify a real IAM denial.
Incorrect Answers
A:An instruction or staff guideline is not an enforced resource policy. A caller holding broad credentials can invoke unapproved models regardless of the prompt. Limit permissions in IAM. An IAM deny for the unapproved model must hold even when the caller edits or omits its prompt.
B:Output-token limits can reduce some usage costs but do not stop calls to unapproved models. Broad IAM rights still expose more resources and services than required. An IAM deny for the unapproved model must hold even when the caller edits or omits its prompt.
C:Loss of audit evidence would make unauthorized use harder to detect and investigate. Keep appropriate logging and restrict the capabilities of the principal making the request. An IAM deny for the unapproved model must hold even when the caller edits or omits its prompt.