Amazon AWS Certified Generative AI Developer - Professional AIP-C01 Practice Test 30
Question 290
A knowledge-base search returns 20 loosely related policy passages, while an exact answer often appears in the lower ranks. Which optimization should be tested?
- Apply an appropriate reranker to a bounded candidate pool and measure answer-support relevance against latency.
- Remove document permissions so more passages can compete for ranking.
- Rerank every document in the entire corpus for every request regardless of cost.
- Ask the generator to infer the exact answer from irrelevant sources.
Explanation
Correct Answer
A:A second-stage reranker can improve ordering of first-stage retrieval candidates, but it should process a measured top-k set. Evaluate precision and recall on judged queries plus p95 latency and cost. Keep source access filters applied before reranking and verify the cited top result actually supports the generated statement.
Incorrect Answers
B:Unauthorized passages must never be offered to a ranking stage accessible by the application. Security filtering precedes relevance optimization. An unauthorized document must not enter the reranker just because it would improve recall. Keep identity-filtered candidate retrieval and measure relevance on approved sources.
C:Exhaustive reranking may be prohibitively slow and removes the value of efficient initial retrieval. Restrict the candidate pool based on tested marginal accuracy. Cross-encoder scoring of an entire corpus makes response time depend on corpus size. Rerank a bounded first-stage top-k set under the latency target.
D:Generation without relevant evidence can hallucinate confident claims. Improve passage selection rather than asking the model to fill source gaps. An LLM cannot supply a missing authoritative clause by guessing. Improve the retrieval candidate set and validate that the generated answer is grounded in a selected passage.
Question 291
An order-fulfillment agent receives a timeout after a payment provider accepts the charge. The model retries its payment tool, causing a duplicate charge. Which design prevents recurrence?
- Trust the agent’s text statement that it has not charged the card yet.
- Keep a payment retry counter only in the current Lambda execution environment.
- Generate a new payment ID for every model retry to ensure each attempt is unique.
- Use transaction-scoped idempotency keys and external payment authorization independent of model retry decisions.
Explanation
Correct Answer
D:Bind the payment operation to a durable business request ID and send an idempotency key to the payment provider where supported. On uncertain timeout, query or reconcile authoritative status before retrying. Keep user approval tied to amount and recipient; a model cannot independently authorize repeated side effects.
Incorrect Answers
A:Generated state text is not an authoritative payment receipt. The tool may have succeeded despite a timeout. Verify backend status. Only the payment provider's transaction receipt can establish whether a charge committed. On timeout, reconcile with the same idempotency key instead of trusting the agent's self-report.
B:Lambda may process the next attempt in another execution environment, so an in-memory counter cannot prove whether the provider already accepted a charge. Use a durable transaction-scoped idempotency key and query the provider receipt after an ambiguous timeout. The authorization boundary should remain outside the model.
C:New IDs convert a retry into a separate payment, creating the observed duplicate. Keep one identity for one authorized transaction. A fresh ID asks the processor to create a second logical payment. Reuse the authorized operation key across retries and compare provider status before executing again.
Question 292
A data-science team wants to experiment with an unapproved model using synthetic public data. Production systems process regulated records through an approved catalog. What governance design supports experimentation safely?
- Define a sandbox exception with separate identities and data boundaries, an expiry date, and promotion review before production use.
- Disable audit logging on experiments so tests cannot be reviewed.
- Give the sandbox full access to regulated production prompts for realistic testing.
- Allow any model into production automatically after a successful sample response.
Explanation
Correct Answer
A:Provide controlled innovation through isolated accounts or projects, least-privilege IAM, approved public/synthetic data and clearly bounded budgets. Document the exception, owner, allowed models, expiry and evaluation criteria. Require security and compliance verification before moving an experimental model or its outputs into production. The sandbox must not inherit production data access merely because it uses the same AWS account family. Expire the model exception automatically and require documented security and quality checks before any trial model is routable for regulated customer prompts.
Incorrect Answers
B:Experiments still need basic traceability and access controls, especially if models call external services. Maintain privacy-safe logging rather than hiding actions. Even nonproduction model experiments require an owner, budget and evidence of which endpoints were called. Store privacy-minimized logs under sandbox-only permissions.
C:Synthetic experimentation does not require unrestricted access to sensitive production content. Such data sharing violates the intended isolation and may change the risk category. The stated experiment uses synthetic public inputs; regulated prompts should remain isolated in production. A sandbox must not inherit production retrieval or secret access.
D:One passing answer is not evidence of production fitness, security or legal compliance. Apply a controlled release gate and relevant test suite. A model can pass one demo while failing safety, cost, data residency or schema constraints. Require the formal risk and technical promotion gates before production traffic.
Question 293
Lawyers search for a regulation by its acronym and by an informal industry nickname. The two phrases refer to the same authoritative document, but vector search sometimes misses the acronym. What should retrieval use?
- Use only the longest user-entered nickname and disregard exact matches.
- Remove the acronym from the indexed text because it is not natural language.
- Replace the regulation with a model-generated summary that has no official citation.
- Test hybrid lexical/semantic retrieval with validated alias expansion and preserve literal source evidence.
Explanation
Correct Answer
D:Maintain a vetted alias dictionary tied to official document IDs, then combine keyword and semantic search with authorization filters. Evaluate acronym-only, nickname-only and ambiguous-alias queries against labeled relevance. Preserve the canonical regulation version and exact cited passage instead of letting alias rewriting become untraceable. Keep the regulation’s exact identifier searchable lexically while using validated acronym aliases for user terminology. Evaluate both acronym and nickname queries against an approved source list, and ensure reranking does not replace the authoritative law with a loosely related commentary.
Incorrect Answers
A:Longest-string selection has no principled relationship to legal document identity and can ignore a valid exact acronym. Use tested canonical mapping. A nickname may be more verbose but less precise than the law's acronym. Evaluate both against the same authoritative identifier and citation record.
B:Acronyms are often how users reference precise legal sources. Removing them makes identifier retrieval harder. Index both literal names and validated aliases. Lexical search is often strongest for official acronyms. Keep the literal token while adding validated alias expansion for semantic nickname requests.
C:Generated summaries can omit limitations and may be outdated. The system needs searchable authoritative regulatory material with provenance. A generated summary does not replace the current legal text and may omit exceptions. Ground every claim in the official source edition and passage.
Question 294
A developer sends a malformed message array to Bedrock Converse and receives a validation exception. The request uses valid temporary AWS credentials. Which troubleshooting action is appropriate?
- Increase the model’s output length so missing request fields can be inferred.
- Repeat the malformed call with no retry cap until it succeeds.
- Validate role, content-block and model-specific request fields against the supported Converse schema.
- Rotate the valid credentials as the primary response to a JSON schema error.
Explanation
Correct Answer
C:Inspect the exact validation error and compare the submitted structure with supported message roles, content types, system instructions and optional model parameters. Distinguish schema errors from IAM or model-access failures. Build a contract test using the exact deployed model, including any multimodal payload fields. Inspect the role and typed content blocks sent to Converse, comparing the failing payload with the model’s supported request contract. A missing required field or unsupported image format should produce a controlled validation failure, not trigger credential rotation.
Incorrect Answers
A:Model decoding cannot repair API validation that occurs before inference. Correct the request schema instead of changing output budgets. Request parsing occurs before any model tokens are generated. Compare the malformed Converse message envelope with a documented valid content-block schema.
B:An unchanged invalid payload cannot become valid through retries. Correct the caller and reserve bounded retry logic for transient errors. A deterministic ValidationException persists across identical requests. Stop retries, surface the field-level error and repair payload serialization. Only a corrected content-block schema addresses the returned validation category.
D:Credential validity is not the issue when the service has accepted authentication and rejected request shape. Unnecessary rotation risks outages. The caller already authenticated successfully. Rotating credentials adds disruption without resolving the invalid role or content-block shape in the request.
Question 295
An engineer temporarily enables full prompt and tool-argument logging to diagnose a production defect. The requests can contain confidential contracts. What logging policy is appropriate?
- Encrypt diagnostic logs at rest but permit all project developers to read unredacted customer prompts.
- Disable all audit records, including security events, to avoid handling confidential data.
- Capture only necessary diagnostics, redact sensitive fields before export, restrict access and apply short retention.
- Store all raw prompts indefinitely because the logs are not shown to customers.
Explanation
Correct Answer
C:Use a privacy-aware diagnostic mode that records request identifiers, error codes and safe structured context without copying entire contracts by default. Mask secrets and personal data at the producer, protect authorized log access and set a bounded retention window. Test error paths and vendor exports for unexpected raw payload capture.
Incorrect Answers
A:Storage encryption protects data under the configured key controls, but it does not enforce need-to-know access among authorized readers. Wide access to raw contracts creates a privacy exposure, especially when exported to dashboards. Minimize captured fields, redact sensitive values before publication and scope log-reader permissions and retention.
B:Eliminating auditability hides incidents. Preserve minimal required security metadata while minimizing sensitive user content. Maintain redacted audit and correlation records that identify the failed invocation without storing full confidential contracts. Eliminating them impairs incident investigation and accountability. Retain limited evidence of denied operations and their accountable identities.
D:Internal logs can be exposed by compromised identities or overbroad permissions. Lack of a public UI does not justify indefinite collection of confidential text. Restrict collection scope, redact sensitive fields and impose retention limits. Internal access is not a guarantee that raw contract text can never be leaked or reused.
Question 296
A router sends scanned invoice images to a text-only chat model. The model responds that it cannot inspect the attachment. What must the router check before dispatch?
- Whether the object filename ends with PDF, regardless of its true content and model support.
- Only the marketing name of each model, assuming every foundation model accepts images.
- The number of words in the last generated response as a routing rule.
- The actual input modality and required structured output capability against each model’s documented supported contract.
Explanation
Correct Answer
D:Classify the request as image/document understanding and verify the chosen model and API accept that media type, size and output constraints. Route unsupported cases to an approved vision or extraction pipeline with proper access controls. Test adversarial file types and document formats rather than relying on generic model labels.
Incorrect Answers
A:An extension can be inaccurate or hide unsupported encoding. Validate file type and media contract before dispatching to the chosen model. An image extension does not prove that the file bytes are valid or accepted by the deployed model. Validate modality support and documented API content-block format.
B:Not all foundation models or deployment APIs support the same modalities. Brand identity does not prove the capability needed for an invoice image. Check the actual endpoint's model card and request contract; a text-only model cannot inspect pixels regardless of its marketing capabilities.
C:Answer length does not indicate whether a model can parse pixels or return structured invoice fields. Use declared capabilities and tests. A short textual reply may merely describe the missing image. Route by required input modalities and real source processing, not by completion length.
Question 297
A retriever can provide 2,000 passages, and a costly reranker takes 20 ms per passage. The answer quality target is already nearly met with the top 25. What should the team tune?
- Increase generated response length to hide the reranker delay in a larger total time.
- Remove authorization filters before reranking to speed up selection.
- Rerank a bounded first-stage top-k candidate set and measure marginal relevance improvement against latency and cost.
- Send all 2,000 passages through the reranker on every question regardless of latency SLO.
Explanation
Correct Answer
C:Choose candidate-pool sizes using a judged search set, ensuring the top-k contains evidence for rare queries while avoiding unnecessary cross-encoder work. Compare accuracy lift with compute, p95 latency and capacity impact. Enforce source permissions before reranking, and fall back to a simpler path when budget limits are reached.
Incorrect Answers
A:Longer generation only raises token cost and elapsed time. Reduce expensive candidate comparisons rather than obscure them. Adding output tokens worsens full response time and does not reduce the 40-second reranking of 2,000 passages at 20 ms each. Bound the candidate pool.
B:Authorization is a separate mandatory boundary. A faster ranking of confidential passages is not an acceptable optimization. Preserve query-time access filters. Access filtering must run before reranking, regardless of the cost benefit. Optimize scoring of the already-authorized 25 candidates rather than expose tenant content.
D:Exhaustive reranking could add tens of seconds and defeat first-stage retrieval efficiency. The marginal quality benefit must justify the time. Reranking 2,000 passages at 20 ms each costs about 40 seconds before generation. Calibrate a small top-k pool using relevance and latency measures.
Question 298
A procurement agent has access to purchase-order creation tools, but no document defines which actions it may perform automatically or who owns failures. What should governance establish?
- A named accountable owner and a documented action authorization matrix with approval and exception boundaries.
- A privacy notice that replaces audit and transaction approval processes.
- An instruction that the model may decide its own spending limit.
- An unrestricted service role so tool calls never fail during development.
Explanation
Correct Answer
A:Inventory every permitted action, data class and side effect, then specify thresholds for automatic execution, explicit approval and refusal. Assign an accountable business owner, enforce controls in the backend API and audit actual tool receipts. Validate rejected, replayed and partial-failure cases so the model cannot bypass the approval boundary.
Incorrect Answers
B:Notification cannot substitute for authorization or an accountable decision-maker. Retain traceable approval and incident-response procedures. A notice explains data handling but cannot approve a purchase or identify the accountable spending owner. Record action limits and explicit authorizations in backend policy.
C:Model-generated policy is not a reliable spending authorization and may be manipulated by untrusted requests. Limits must be externally enforced. A generated purchase decision cannot confer the business power to spend. Use verified approver roles and transaction parameters outside the model.
D:Broad privileges multiply the consequences of misuse or prompt injection. Use least-privilege tool identities and action-specific permissions. An unrestricted purchase-order role magnifies prompt-injection and accidental tool-call damage. Scope each approved action and retain execution receipts for reconciliation. Denials on unapproved suppliers must remain testable during development.
Question 299
A company wants inexpensive model routing for internal FAQ queries, but high-impact customer claims require stronger reasoning and source verification. How should routing be governed?
- Use policy-based routing on task risk and measured model capability, with fallback and quality checks for high-impact cases.
- Evaluate only token cost, never factuality or customer consequences.
- Always choose the least expensive model even if it fails the claims evaluation set.
- Allow any caller to override the approved model tier with an arbitrary request parameter.
Explanation
Correct Answer
A:Define supported task categories and risk thresholds, evaluate candidate models on representative FAQ and claims questions, and restrict which workloads can use each tier. Use accurate source grounding and escalation for high-impact claims. Monitor routed quality and cost and version the routing rules to prevent undocumented policy drift.
Incorrect Answers
B:Cost must be evaluated alongside correctness, latency, safety and rework. A cheap hallucination can be more expensive than a verified answer. Measure accepted-answer cost, source accuracy and customer impact for each routing tier. An inexpensive wrong claim can become more costly after corrections and disputes.
C:Lower unit price does not create business value when errors trigger rework or customer harm. Risk-sensitive queries may need additional validated capability. Claims with financial or legal impact need stronger source-grounded evaluation. A cheap FAQ model should not automatically process the high-risk cohort merely to reduce unit price.
D:An untrusted client parameter cannot grant access to an unapproved or higher-privilege model. Enforce routing policy on the server with authenticated context. Validate requested tiers against user identity, data policy and the approved routing catalog. An arbitrary caller parameter must not bypass the escalation and authorization rules.
Question 300
An insurance customer asks one question about coverage limits for claims in two jurisdictions. Retrieval returns only the first country’s policy. What query approach is appropriate?
- Disable jurisdiction metadata because it creates extra filtering work.
- Choose a single policy based on the most frequent keyword and apply it to both countries.
- Split the question into jurisdiction-tagged subqueries, retrieve each authorized policy and reconcile the separate conclusions with citations.
- Concatenate unrelated policy paragraphs and let the model assume both regions have identical law.
Explanation
Correct Answer
C:Identify both locations as distinct legal constraints and retrieve the applicable dated source for each before synthesis. Preserve country, entity and source-version metadata, then compare limits and disclose differences. If any country lacks adequate evidence, qualify that portion instead of generalizing the other jurisdiction’s rule.
Incorrect Answers
A:Jurisdiction metadata is essential to correct legal retrieval, not an optional performance feature. Optimize indexed filters rather than remove the source boundary. The country filter distinguishes legally different coverage limits. Removing it can retrieve the wrong jurisdiction's policy and produce an unsupported shared answer.
B:Keyword frequency cannot establish the legal scope of an insurance contract. One country’s policy may not apply elsewhere. Explicitly decompose by jurisdiction. Popularity of one phrase does not show that both countries use the same rules. Split the request into separate scoped retrieval questions first.
D:Unlabeled concatenation can cause cross-source confusion and fabricate a universal coverage limit. Maintain separate evidence before reconciliation. Merge results only after each country has authoritative passages and effective dates. Missing second-country evidence should trigger qualification or clarification, not invented equivalence.