Amazon AWS Certified Generative AI Developer - Professional AIP-C01 Practice Test 18
Question 170
An application sometimes sends the same model inference three times when one customer clicks Submit once. It uses different request IDs on retries and pays for all responses. What should be changed?
- Deduplicate safe logically identical requests using a bounded operation key and track token usage per user action.
- Increase the number of automatic retries so more duplicate calls succeed.
- Add more context tokens to every repeated request to make duplicate work useful.
- Discard request telemetry because duplicate calls make metrics confusing.
Explanation
Correct Answer
A:Assign a stable operation identity to a single customer action, collapse concurrent equivalent requests when safe, and cache or reuse an accepted result according to freshness and privacy rules. Measure actual model invocations and token spend per logical action. Keep retries bounded and distinguish intentional repeated requests from network replay; never reuse another user’s private result. Simulate delayed callbacks and repeated clicks to ensure the same operation is executed only once.
Incorrect Answers
B:More retries multiply cost and may overload a throttled model service. Correct duplicate submission and idempotency handling before raising retry limits. Idempotency keys must bind one business operation to one execution across retries.
C:Additional tokens increase processing cost without fixing why the same task was submitted repeatedly. The system should prevent redundant calls rather than generate longer duplicates. Idempotency keys must bind one business operation to one execution across retries.
D:Telemetry is needed to identify repeated invocations, wasted tokens and their source. Removing it conceals the problem. Instrument per-action request and response IDs with appropriate privacy protections. Idempotency keys must bind one business operation to one execution across retries.
Question 171
A helpdesk application forwards complete customer messages containing account and reference numbers to a model, although the model only needs issue category and a redacted summary. Which change best supports data minimization?
- Remove or tokenize unnecessary identifiers before model invocation while retaining an authorized mapping outside the model.
- Keep full identifiers in all prompts but hide them only in the browser view after the response.
- Increase log retention so engineers can review every unredacted identifier later.
- Place the complete identifier list in the system prompt so the model learns which values are confidential.
Explanation
Correct Answer
A:Determine which fields are essential for classification, then redact or replace unrelated identifiers in a trusted preprocessing step. Keep any reversible mapping in an authorized service outside the prompt. Validate category accuracy after redaction and apply retention controls to prompts, output and logs. Minimization must occur before disclosure to the model-serving boundary.
Incorrect Answers
B:Output masking occurs after the full identifiers have already been processed and potentially logged. It cannot prevent unnecessary exposure in input context. Minimize before sending data. Mask sensitive account tokens before invoking the model and before telemetry captures them.
C:Longer retention increases exposure and does not make unnecessary identifiers required for inference. Keep only approved diagnostic data for a defined period and restrict access. Mask sensitive account tokens before invoking the model and before telemetry captures them.
D:A system instruction cannot itself remove sensitive values from data or prevent their appearance in telemetry. Use a deterministic preprocessing layer and controlled secrets storage before invoking the model. Mask sensitive account tokens before invoking the model and before telemetry captures them.
Question 172
An enterprise agent must look up current inventory in an on-premises ERP system but should not copy the entire database into prompts or a public index. What integration approach best fits?
- Expose a narrowly scoped authenticated ERP API or tool that retrieves only the authorized records needed for the user’s task.
- Upload the full ERP database as text in every prompt to guarantee complete context.
- Share the ERP administrator password with the model and ask it to connect directly.
- Scrape all ERP screens without identity checks and store the results indefinitely.
Explanation
Correct Answer
A:A controlled API layer can enforce authenticated identity, record-level authorization, limited fields and audit logging while serving current inventory on demand. Keep database credentials inside the backend, not in model context, and validate tool arguments. Network connectivity and failure handling should match the enterprise security boundary. Only necessary facts should reach generation. Use a live authorized read test and a denied request outside the inventory scope.
Incorrect Answers
B:Full database prompts are costly, likely exceed model limits and unnecessarily expose sensitive records. Retrieve task-specific current data through an approved interface instead. The agent needs an authenticated connector with bounded enterprise API permissions, not guessed inventory.
C:Sending privileged passwords to a model creates secret exposure and broadens database authority. The application backend should authenticate and enforce least-privilege access independently. The agent needs an authenticated connector with bounded enterprise API permissions, not guessed inventory.
D:Unrestricted scraping ignores authorization and may capture stale or confidential content. A documented ERP interface with scoped access is safer and more reliable than an uncontrolled screen-copy pipeline. The agent needs an authenticated connector with bounded enterprise API permissions, not guessed inventory.
Question 173
A model proxy is reachable only through private AWS networking, but its IAM role can invoke arbitrary model resources across an account. Which additional measure is needed?
- Restrict the proxy role’s model invocation actions and resource scope independently of private network controls.
- Assume private networking alone makes all API operations least privileged.
- Disable CloudTrail because the proxy is not public.
- Allow every model call if its prompt contains the phrase internal application.
Explanation
Correct Answer
A:A private endpoint limits network exposure but does not specify which model or management API the caller may use. Apply least-privilege IAM, appropriate endpoint policies and allowed-model restrictions where supported; test both authorized invocations and denied resources. Monitor use and preserve tenant boundaries. Network and identity policies are separate controls that must both be correct. Verify the unapproved IAM principal is denied even from within the permitted VPC.
Incorrect Answers
B:Private routing does not prevent a compromised proxy credential from exercising permissions already granted inside the network. Enforce authorization at the API/resource level. Private networking and fine-grained IAM rights are independent defense layers for model endpoints.
C:CloudTrail and other allowed diagnostics help investigate misuse of permitted or compromised identities, including private traffic. Disabling them reduces evidence and does not improve access policy. Private networking and fine-grained IAM rights are independent defense layers for model endpoints.
D:Prompt phrases are user-controllable strings, not authenticated proof of which resource a workload may invoke. The proxy must check trusted principal and fixed IAM policy, not text in the request.
Question 174
A long policy document repeats navigation links, company footers and legal boilerplate on every page. These fragments dominate retrieval matches and push useful content out of the context window. What preprocessing change fits?
- Remove repeated nonsemantic boilerplate while preserving original document IDs, section spans and source traceability.
- Erase section headings and page identifiers because shorter text never needs citations.
- Index only the repeated footer since it appears most frequently in the source.
- Reduce chunk size across all documents without removing repetitive headers and footers from the indexed text.
Explanation
Correct Answer
A:Identify repetitive navigation and footers that do not carry policy meaning, remove or downweight them before chunking, and preserve an offset map to the authoritative source. Test whether required qualifications or disclaimers were mistakenly removed. Rebuild affected chunks and compare retrieval quality on a judged query set, keeping precise citations possible. Compare search relevance on long documents after boilerplate suppression.
Incorrect Answers
B:Headings and page identifiers often help with retrieval structure and source verification. Deleting them indiscriminately may lose critical policy context. Strip only demonstrably nonsemantic repetition and preserve lineage. Preserve meaningful source clauses while excluding repeated footers and irrelevant template text.
C:A repeated footer tends to have low distinguishing value; indexing it exclusively would omit the actual policy rules. Select information-bearing passages and evaluate ranking behavior. Preserve meaningful source clauses while excluding repeated footers and irrelevant template text.
D:Smaller chunks can multiply the same navigation and legal footer fragments, making irrelevant matches even more frequent. The ingestion process should identify and remove repeated nonsemantic boilerplate while retaining original spans, section names and citation traceability. Validate that meaningful clauses remain searchable.
Question 175
A company updates its embedding model to improve general search. Queries containing rare product acronyms now retrieve fewer correct documents than the prior index. Which evaluation should decide whether to keep the update?
- Run a frozen relevance-labeled query set with rare acronyms and compare retrieval recall for old and new embeddings.
- Choose whichever model has larger vector dimensions without searching documents.
- Compare only average answer length after generation.
- Remove rare acronyms from the test queries so results look more consistent.
Explanation
Correct Answer
A:Build a representative judged query set including rare domain acronyms, synonyms and normal language. Compare recall at k, precision and ranking quality under equivalent access filters and corpus versions. Diagnose tokenization or representation loss; consider hybrid exact-match signals for identifiers. Promote only if the new index meets required category-level performance, not merely average scores. Keep the previously failing acronyms in the regression suite after tuning.
Incorrect Answers
B:Embedding dimensionality is not a direct quality guarantee, particularly for uncommon identifiers. A larger vector can still place a critical acronym in the wrong semantic neighborhood. Evaluate retrieved documents. Rare acronyms need a judged relevance set and possibly hybrid lexical matching alongside embeddings.
C:Answer length is a generation characteristic and does not measure whether required source documents were found. Isolate retrieval metrics first. Rare acronyms need a judged relevance set and possibly hybrid lexical matching alongside embeddings.
D:Excluding known difficult queries would conceal a regression in an important user segment. Preserve the frozen tests and add remediation or a targeted fallback for acronyms. Rare acronyms need a judged relevance set and possibly hybrid lexical matching alongside embeddings.
Question 176
An ERP mainframe processes account reconciliation requests asynchronously and returns a completion callback hours later. The GenAI agent should not keep a model invocation open throughout. Which design is most appropriate?
- Submit the authorized job through a durable queue/workflow and correlate later callbacks to the original request.
- Keep one HTTP inference connection open for several hours regardless of timeout limits.
- Ask the model to invent a reconciliation result while the mainframe is still processing.
- Retry the same job every second until a callback arrives, creating multiple independent jobs.
Explanation
Correct Answer
A:Decouple request acceptance from completion using a durable queue or workflow, with authenticated request IDs, state and callback correlation. Verify callback origin and idempotency, persist the actual mainframe result, and notify the authorized user after completion. The agent can report pending status without making a long-lived model call or fabricating financial outcomes. Test callbacks arriving after client disconnect and retries to confirm durable state.
Incorrect Answers
B:Hours-long synchronous inference is prone to timeout, connection loss and resource waste. Use an asynchronous integration architecture designed for delayed business systems. A durable correlation key lets an asynchronous backend completion map to its original authorized request.
C:Generated text cannot replace the authoritative reconciliation result. Inventing a success status could create incorrect financial records. Wait for verified backend completion and report uncertainty until then. A durable correlation key lets an asynchronous backend completion map to its original authorized request.
D:Rapid repeated submissions can duplicate work and transactions, especially when the mainframe accepted the first request. Use stable idempotency and durable correlation rather than polling through new independent jobs. A durable correlation key lets an asynchronous backend completion map to its original authorized request.
Question 177
A shipment support search treats tracking codes ABC123 and abc123 as unrelated even though the carrier documents define them as the same identifier. The team must not corrupt case-sensitive codes from other carriers. What should it implement?
- Apply carrier-specific identifier normalization using validated rules while retaining the exact original code and source.
- Lowercase all identifiers from every carrier without checking their meaning.
- Delete digits from tracking values to simplify vector similarity.
- Raise text generation temperature to make matching tolerant of case differences.
Explanation
Correct Answer
A:Normalize identifiers only under the authoritative carrier-specific semantics, creating a canonical search key while retaining the original input and validated format. Test case-sensitive exceptions, leading zeros and checksum rules before changing the index. Keep exact-match retrieval for structured identifiers; semantic embeddings alone may not distinguish similar tracking values. Include carriers whose identifier alphabet is case-sensitive in the regression set. Validate carrier-specific canonicalization so a search does not merge distinct tracking numbers.
Incorrect Answers
B:Blanket lowercasing can merge identifiers that are distinct in another carrier’s system. Validation must use source-specific rules and preserve raw values for audit and external API calls. Validate carrier-specific canonicalization so a search does not merge distinct tracking numbers.
C:Dropping digits destroys much of an identifier and increases collisions, potentially returning another customer’s shipment. Use structured matching with appropriate normalization and authorization. Validate carrier-specific canonicalization so a search does not merge distinct tracking numbers.
D:Sampling influences generated wording, not the identity equivalence rules used by a search index. Fix normalization and exact lookup instead of relying on model guessing. Validate carrier-specific canonicalization so a search does not merge distinct tracking numbers.
Question 178
A banking assistant forwards full account numbers to a hosted model although the requested task needs only a transaction category. What design change best reduces unnecessary disclosure?
- Classify or tokenize the category locally, redact account identifiers before model invocation and protect the mapping separately.
- Send all account numbers but assume transport encryption alone meets data-minimization requirements.
- Keep identifiers in the prompt and remove them only from the final displayed answer.
- Store full raw prompts forever to support future debugging without access restrictions.
Explanation
Correct Answer
A:Data minimization should occur before the model-serving boundary. Use trusted preprocessing to derive the transaction category and replace or omit unnecessary identifiers, keeping any reversible mapping within an authorized backend store. Validate results after redaction and apply protections to logs and downstream responses. TLS complements rather than replaces minimization.
Incorrect Answers
B:Transport encryption protects data while traveling but does not justify sending fields the service does not need. The host may process and log the identifier once received. The model never needs the full bank account number to categorize this transaction.
C:Output masking happens after disclosure to the inference service and any prompt telemetry. It cannot prevent unnecessary input exposure. Redact before construction of the request. The model never needs the full bank account number to categorize this transaction.
D:Indefinite unrestricted retention increases the chance of credential or identity exposure. Store only necessary diagnostic information for a defined purpose with least privilege and deletion controls. The model never needs the full bank account number to categorize this transaction.
Question 179
A form-field extractor returns slightly different categories for the same invoice on repeated calls. The model supports configurable sampling randomness. Which action should the team test?
- Lower supported sampling variability and evaluate repeated field-level agreement against a fixed reference set.
- Add more in-prompt examples but leave high sampling randomness unchanged and do not measure repeated agreement.
- Average textual labels as numbers without defining a valid category mapping.
- Change only storage bucket names and assume that stabilizes model output.
Explanation
Correct Answer
A:Use a clear output schema, supported low-variability decoding settings and deterministic validation for allowed field types. Re-run identical representative invoices and measure agreement and correctness, especially on borderline cases. Lower temperature is not a guarantee of truth or full determinism; keep reference-label tests and exception handling. Compare extracted invoice categories with known labels across repeated model invocations. Schema validation and repeatability tests must inspect field-level correctness, not merely identical wording.
Incorrect Answers
B:Examples may improve field format, but they cannot prove stable extraction when decoding remains highly variable. Measure repeated field-level consistency on fixed invoices and tune supported sampling controls, then validate outputs against source values. Avoid assuming a few examples eliminate stochastic label changes.
C:Category strings do not have meaningful arithmetic averages unless a specific valid numeric semantics exists. Averaging labels can hide uncertainty instead of resolving inconsistent predictions. Use field-level validation. Schema validation and repeatability tests must inspect field-level correctness, not merely identical wording.
D:Bucket labels have no causal relationship to token sampling or extraction behavior. Diagnose model settings, schema constraints and source-document quality rather than unrelated storage naming. Schema validation and repeatability tests must inspect field-level correctness, not merely identical wording.
Question 180
A company plans to populate a RAG knowledge base with its entire HR database, including private medical and payroll columns, though the assistant only answers public leave-policy questions. What is the correct data integration approach?
- Select only approved leave-policy sources and enforce source access controls and field-level minimization during indexing.
- Copy every HR row because a larger context automatically makes responses more useful.
- Add a prompt warning not to mention payroll while still indexing all confidential columns for every employee.
- Enable public read on the entire index so users can query without authentication.
Explanation
Correct Answer
A:Identify the legitimate question scope and retrieve only authorized policy content, not unrelated employee records. Apply field-level selection, privacy classification, source permissions and tenant/user authorization before ingestion. Test that private medical or payroll records cannot be retrieved through either direct search or generation. Keep original data minimization and retention policies aligned. Attempt payroll-specific queries as an ordinary employee and confirm no underlying source is retrievable.
Incorrect Answers
B:Copying payroll and medical columns into the RAG index broadens the data that could be exposed, even though the assistant only answers public leave-policy questions. A larger corpus is not necessarily more relevant. Ingest approved public policy material instead, leaving private employee records outside this search path entirely.
C:A model prompt saying “do not mention payroll” is not an access-control mechanism. Once confidential salary or medical columns are indexed, they can enter retrieval results, internal prompts, caches or logs. Exclude those columns at ingestion and enforce source and requester permissions before model context assembly.
D:Making the whole index publicly readable would expose records unrelated to the leave-policy task, including private employee information. It also removes the authentication boundary needed for restricted HR data. Use a minimal approved policy corpus and protect any internal retrieval paths with verified caller authorization.