Amazon AWS Certified Generative AI Developer - Professional AIP-C01 Practice Test 11
Question 100
A LoRA adapter improves answers on a specialized industry corpus but reduces accuracy on general customer-service prompts. The business wants a safe deployment process. What should it implement?
- Replace all existing endpoints with the adapted model immediately and discard the baseline.
- Judge success only on the specialty training examples that were used to create the adapter.
- Increase the adapter rank until all general task failures disappear without testing.
- Version the base model and adapter, evaluate domain and general regressions, and canary deployment with rollback.
Explanation
Correct Answer
D:Track the base model, adapter weights, data lineage and version-specific evaluation evidence. Compare specialty benefits with general task regressions, set release thresholds, and promote via a limited canary. Preserve a tested rollback and model registry record so the system can recover quickly if quality deteriorates under real traffic. Include tasks outside the adaptation specialty in the canary evaluation so regressions in general customer service remain detectable.
Incorrect Answers
A:An immediate global replacement ignores a known regression and removes an easy recovery path. Customized model behavior can improve one niche while harming broader tasks. Maintain the previously accepted version and use measured task outcomes before expanding traffic.
B:Training examples can favor the adapter and do not provide an independent estimate of future performance. A useful assessment needs held-out cases from both the target specialty and general workloads that remain supported. Measure safety, output format and business correctness rather than only training fit.
C:Adapter hyperparameters affect learned behavior but do not guarantee preservation of all capabilities. Increasing capacity can worsen overfitting or operating cost. Make configuration changes through evaluated experiments, not as an untested assumption about generalization.
Question 101
A retailer has deployed a LoRA-adapted foundation model. A model update unexpectedly changes outputs, and the team needs to restore the last approved behavior without retraining. Which release mechanism is most dependable?
- Pin both the underlying model build and adapter artifact version, keeping a tested rollback deployment.
- Keep only the adapter name and let the model service always select the newest compatible base build.
- Reapply the old inference temperature while leaving the changed weights and adapter association unchanged.
- Save representative prompts but delete the earlier model and adapter artifacts after promotion.
Explanation
Correct Answer
A:Pinning both components identifies the actual inference behavior being served. Retain immutable artifacts, supported runtime configuration, evaluation evidence and a tested previous endpoint or deployment. A rollback can then restore the prior base-and-adapter combination rather than guess which change caused the regression. Monitor restoration against the same held-out test prompts. Include client compatibility checks that explicitly compare tokenization, adapter attachment and endpoint parameters before moving an alias back.
Incorrect Answers
B:An adapter can interact differently with different base weights even when the friendly adapter name stays constant. Automatically selecting a newer base build undermines reproducibility. Version the paired artifacts and deployment configuration, and test compatibility before the new combination receives production traffic.
C:Decoding settings can affect variation but cannot undo changes to trained weights. Restoring temperature may make output look more consistent while factual or safety regressions persist. The recovery path must restore the known-good model and adapter artifacts, not alter unrelated sampling controls.
D:Example prompts help detect regression but do not reconstruct deleted weights or deployment dependencies. If the previous artifacts are gone, rolling back may require an unvalidated rebuild. Preserve immutable model/adapter versions and operational configuration until the new release has met its acceptance and recovery gates.
Question 102
An order-support agent calls a function that updates a shipping address. It currently accepts arbitrary JSON arguments and executes with an account-wide administrator role. Which TWO controls directly reduce unauthorized record changes?
- Validate the tool schema, permitted fields and customer-record ownership before making the update.
- Raise model temperature so requests become less repeatable and harder for attackers to guess.
- Log the agent’s natural-language explanation but allow the update even when record ownership is unknown.
- Run the tool using narrowly scoped permissions instead of a broad administrator role.
- Let the model choose its own authorization policy from the user’s instruction on each call.
Explanation
Correct Answers
A:A declared JSON schema controls accepted argument names and types, while server-side checks must verify that the requester may modify the specific order. Validate the requested change against trusted identity and record ownership before any write occurs. A model-generated customer ID or syntactically valid address is not itself evidence of authorization. Validate that a user cannot change another customer’s shipping address even when their JSON uses every permitted field.
D:An execution identity with only necessary write actions and resource scope limits the consequences of tool misuse. Enforce the permission boundary outside the model, and test attempts to update another customer’s record. This complements schema and ownership checks rather than trusting the agent to honor a permission request. Review IAM policies for wildcard resources and test a denial on an unrelated order service.
Incorrect Answers
B:Temperature affects supported decoding randomness and cannot establish what customer records may be changed. Attackers can submit valid-looking tool arguments regardless of variation. Security must be enforced by the tool service and verified identity, not by making the agent less deterministic.
C:Logging an explanation improves forensic context but permits an unauthorized change to occur first. When ownership cannot be established, the service should reject or defer the write for controlled review. Auditability supplements, rather than replaces, pre-execution authorization and input validation.
E:A user prompt can be malicious or ambiguous, and the model does not control the backend authorization policy. Deriving permissions from prose risks granting access when an attacker asks for it. Use independently verified principal identities, fixed policies and narrowly scoped application roles.
Question 103
A contact-center bot masks account numbers in incoming messages, but a generated reply occasionally reproduces a previously retrieved access token. Which additional control most directly addresses that disclosure?
- Mask only the final browser display while retaining raw tokens in response logs and API payloads.
- Apply sensitive-data screening to retrieval, generation output and telemetry; block or redact disclosures before delivery.
- Shorten the response length without testing whether tokens are still present in short answers.
- Replace sensitive-data checks with document citation formatting, assuming citations stop disclosure.
Explanation
Correct Answer
B:Sensitive material may enter through retrieved context even when the user input was clean. Apply appropriate minimization and access authorization before retrieval, detect secret patterns in model output, and fail closed for unsafe responses. Sanitize tracing and logs as well, and test both realistic token formats and detection failures rather than relying on one boundary. Confirm that filters examine rendered output and any tool-result body that could contain credentials, not only raw user input.
Incorrect Answers
A:Client-side masking happens after a sensitive value may already have been sent through an API and persisted in logs. It can hide the value on one screen without removing the leak. Protect data before disclosure and ensure downstream sinks follow the same restrictions.
C:A smaller output budget changes the number of tokens generated but not which values are permitted to appear. A secret may fit in a short answer. Validate outputs and response handling for actual sensitive strings; truncation alone cannot establish data loss prevention.
D:Citations can improve traceability of claims but cannot guarantee that a retrieved document or generated answer contains no credentials. Source documents may be overly permissive or compromised. Implement input, retrieval, output and logging safeguards with explicit secret-detection and authorization policy.
Question 104
A voice assistant currently waits until the entire model response has been generated before showing any words. Users report long perceived delays even though total completion time is acceptable. Which change should the engineer evaluate?
- Queue every response for overnight batch processing and return nothing until the job completes.
- Reduce total generation time by shortening the model response, but continue withholding every token until completion.
- Stream supported partial response tokens to the client while validating content and respecting interruption handling.
- Duplicate the same synchronous request on several workers and display whichever complete reply finishes last.
Explanation
Correct Answer
C:Supported streaming allows the interface to render partial text as the model emits it, reducing perceived wait without claiming the full answer is finished. Manage partial moderation, sensitive-data exposure, connection drops and user cancellation. Record time-to-first-token and full completion latency; do not stream unvalidated sensitive actions or irreversible tool effects prematurely. The client should distinguish tentative streamed text from a validated final response and avoid executing actions from incomplete content.
Incorrect Answers
A:Batch processing is appropriate for noninteractive work but conflicts with a live conversational experience. It does not reduce time to the first visible response. Select a supported streaming path and measure both first-token latency and complete response behavior for actual user requests.
B:A shorter response may reduce total latency, but does not test whether supported streaming would improve perceived responsiveness. The stated product issue concerns waiting for the first visible words. Measure time-to-first-token and safely release validated partial output before changing content requirements.
D:Running duplicate requests can multiply cost and potentially repeat tool effects. Waiting for the slowest completion worsens perceived latency. Where parallelism is justified, it should be controlled and idempotent, but a straightforward supported token stream more directly addresses the user’s first-visible-output requirement.
Question 105
An updated language-model service is faster than the prior build, but a fixed regression test shows that it omits a mandatory legal notice in some regulated responses. What should the deployment pipeline do?
- Promote the model based on latency because the omission is not an infrastructure error.
- Append the missing notice manually to one demonstration response and mark the release green.
- Remove the notice test from CI so the speed improvement can be deployed immediately.
- Block promotion, investigate the failure and retest the legal-output rubric before release.
Explanation
Correct Answer
D:A release gate should evaluate both operational metrics and nonnegotiable business or regulatory output constraints. Preserve the failing input and expected notice, diagnose model/prompt/application behavior, implement a tested correction, and rerun the fixed regression alongside latency checks. Promote only when both quality and performance thresholds are satisfied. Include a test where the mandatory notice must appear even when users attempt to suppress it through conflicting instructions.
Incorrect Answers
A:Latency is only one quality dimension. Omitting required compliance language is a substantive functional defect even when responses arrive more quickly. A release decision must include the mandatory output contract and representative evaluation cases, not a performance-only threshold.
B:Editing a single example does not prove that the deployed application will reliably satisfy the notice requirement on future prompts. Fix the prompt, policy layer or deterministic response assembly as appropriate, then rerun the frozen regression suite and inspect actual generated outputs.
C:Deleting a failing test conceals an established requirement violation. The pipeline would lose the ability to detect the same regression after another model update. Keep the rubric and document the failure while correcting the responsible component.
Question 106
An enterprise plans to retire an older foundation-model deployment, but some production clients still use an unversioned alias that resolves to it. What control best prevents surprise failures and unsupported invocation?
- Rename the old model in the console but leave the alias resolving to the same deployment.
- Maintain versioned model/deployment registry entries and a documented client migration and endpoint retirement policy.
- Disable all request logging so deprecated client traffic does not trigger alerts.
- Change each client’s temperature and assume the alias will automatically select the supported model.
Explanation
Correct Answer
B:Track model versions and serving endpoints in a controlled registry, inventory invocation references, notify owners and migrate clients to approved supported aliases or exact deployment IDs. Validate new endpoints and compatibility before disabling the old path. Monitor calls during a deprecation window, then enforce the retirement policy rather than leaving unsupported models discoverable indefinitely. Maintain a list of clients still invoking the deprecated identifier, and validate that retired endpoints reject subsequent requests.
Incorrect Answers
A:Changing a display label may not affect API identifiers or references already embedded in clients. The old model can remain callable through an alias. Establish a real retirement mechanism with observable usage, supported destinations and an enforcement date.
C:Request logs are the evidence needed to find lingering clients and detect use of a deprecated endpoint. Disabling them makes migration less reliable and can hide unsupported invocations. Keep appropriately protected usage telemetry until client cutover and retirement checks finish.
D:Sampling configuration changes how generated text is selected; it does not decide which backend an alias resolves to. Clients may continue calling the obsolete endpoint and experience failures when it is eventually removed. Control alias resolution and client version migration explicitly.
Question 107
A support agent invokes a Lambda-backed CreateTicket tool. The function writes the ticket, but its response times out; the agent retries the same request. Which design prevents two identical support tickets?
- Use a stable idempotency key per intended ticket operation and record the first successful result for safe retries.
- Increase the maximum response-token setting so Lambda cannot time out.
- Generate a fresh random request ID on each retry so every attempt is unique.
- Delete the ticket database transaction log after a timeout to reduce duplicate detection work.
Explanation
Correct Answer
A:An idempotency key identifies the logical create operation rather than each network attempt. The backend should atomically reserve or check the key, write at most one ticket, and return the stored outcome to retries within the defined retention window. Verify behavior for concurrent attempts and partially completed timeouts; response loss does not mean the first write failed. When storing an operation receipt, bind the key to the authenticated customer and request parameters to prevent cross-user replay.
Incorrect Answers
B:Model output limits do not control Lambda execution timeout or whether an earlier database write succeeded. Even with a longer model response, network failures can require retries. Duplicate side effects must be prevented at the tool’s transaction boundary.
C:A different key on every retry tells the backend the attempts are unrelated, defeating deduplication. A timed-out response may have followed a successful ticket write. Reuse an operation-level key tied to the authorized request and record a durable creation receipt.
D:Transaction or idempotency records are needed to distinguish completed writes from failed calls. Deleting them increases the chance of duplicate ticket creation and weakens troubleshooting. Preserve a bounded durable record and design safe replay semantics.
Question 108
An internet-facing generative API filters harmful model output correctly, yet attackers can send thousands of costly allowed prompts per minute using one account. Which additional safeguard most directly limits abuse?
- Increase the model context window so requests can contain more tokens.
- Set a stricter grammar format for generated replies but accept unlimited calls.
- Apply authenticated per-principal request/token rate limits, quotas and anomaly monitoring at the API boundary.
- Remove model moderation and rely only on callers accepting an acceptable-use policy.
Explanation
Correct Answer
C:Authenticated throttles and usage quotas can cap requests, input tokens and overall spend per identity or client class. Enforce limits before model invocation, return an appropriate rejection, and alert on sudden anomalous patterns. Validate distributed-source and account-sharing abuse, because content moderation and resource-exhaustion controls solve distinct risks. Test whether callers can bypass limits by rotating API keys tied to the same account or by splitting one request.
Incorrect Answers
A:A larger context window permits more tokens within an individual request but does not restrict how many requests one identity can submit. In this scenario it may even enlarge the cost of each abusive call. Limits must be enforced before invoking the model, with request and token budgets tied to the authenticated account.
B:A strict output schema can prevent malformed replies, but the attacker is submitting an excessive number of otherwise allowed prompts. Every response may satisfy the format while still consuming costly inference. Admission controls and per-principal quotas address volume; JSON or grammar validation addresses a different problem.
D:Removing content moderation would discard an existing safeguard and leave the expensive call flood unchanged. Acceptable-use terms inform users about policy but cannot stop automated abuse. Retain the model safety checks while enforcing independent API gateway request rates, token limits, account quotas and anomaly alerts.
Question 109
A team serves a fine-tuned model on a GPU instance and discovers that real concurrent traffic reduces throughput far below single-request benchmarks. What should it do before cutting all production traffic over?
- Measure only CPU utilization because GPU memory and batching never affect language inference.
- Size the endpoint from average token count and single-request performance, omitting concurrent memory and batching tests.
- Disable load testing so real clients are the first sustained concurrency experiment.
- Benchmark representative concurrency, sequence lengths, batching, memory and autoscaling before sizing the endpoint.
Explanation
Correct Answer
D:Load-test the actual trained model with representative input/output token distributions, concurrent request counts and batch scheduling. Measure accelerator memory, queue delays, token throughput, errors and p95 latency. Configure capacity or supported autoscaling and keep a rollback path. Promote traffic gradually only when those production-representative measurements satisfy requirements. Compare prefill and decode token rates independently because long input contexts and long outputs stress resources differently.
Incorrect Answers
A:CPU metrics alone omit model loading, accelerator memory, attention cache and GPU saturation effects. These can dominate latency at higher concurrency. Collect inference-specific metrics across realistic prompt and output lengths rather than assuming a CPU threshold describes model-serving capacity.
B:An average-prompt estimate can miss GPU memory pressure, simultaneous decoding and sequence-length variation. Production sizing must use representative concurrent request rates, batch behavior and tail latency. Compare measured throughput and memory against real traffic before changing every request to the new endpoint.
C:Bypassing load tests exposes users to avoidable errors and unpredictable cost during a rollout. A controlled test can reveal memory and throughput limits without affecting customers. Retain performance gates and use a staged deployment strategy.
Question 110
An internal Model Context Protocol (MCP) tool provides SQL queries to a retrieval agent. The tool currently trusts table names and row filters written by the model, even when the request came from a low-privilege employee. What must the MCP service enforce?
- Permit any valid SQL string because the model and database run in the corporate network.
- Authorize allowed query operations and record visibility using the verified caller identity at the tool and database boundary.
- Rely only on a system prompt telling the agent not to reveal confidential tables.
- Mask the final chat response while still returning unrestricted database rows to the agent.
Explanation
Correct Answer
B:MCP exposes useful tool interfaces but the tool implementation must authenticate the requester and enforce the actual data authorization policy. Bind the request to a verified principal, restrict operations and allowed datasets, use parameterized queries, and log access. Test that one employee cannot retrieve another employee’s restricted rows despite model-supplied filters.
Incorrect Answers
A:Internal network location does not establish authorization to specific tables or rows. Model-generated SQL can be wrong or manipulated through prompt injection. Apply prepared allowlisted operations and database permissions rather than accepting arbitrary syntactically valid queries.
C:A high-priority prompt may guide the assistant but does not constitute database access control. Untrusted tool output and user messages can cause instruction failures. The service must reject unauthorized requests independently of what the model promises to do.
D:Output masking happens after sensitive rows have entered agent context and possibly telemetry. It can hide one visible response while still leaking data through logs or future prompts. Restrict retrieval at source, then apply additional output filtering as defense in depth.