Amazon AWS Certified Generative AI Developer - Professional AIP-C01 Practice Test 37
Question 360
A code assistant generates unit tests for a Bedrock-integrated Lambda handler. Every AWS call is mocked, so the tests pass even though the deployed role lacks permissions. What should CI add?
- Scoped integration tests with authorized sandbox resources covering actual IAM denies and service API contracts.
- An instruction to the model that the permissions are valid without executing a real call.
- Broader production IAM permissions so the generated tests do not need changes.
- More mocks that always return success for every AWS operation.
Explanation
Correct Answer
A:Use a dedicated limited test account or resources to exercise representative service calls, roles and failure behavior. Keep fast unit tests for local logic but add real integration checks of authorization, request schemas and retries. Record test resource cleanup and avoid billable operations not authorized by the owner.
Incorrect Answers
B:A generated claim about authorization cannot substitute for API behavior. Validate with permitted test resources and captured responses. The real role may receive AccessDenied even when mocks accept every call. Add a controlled integration test using the deployed workload identity.
C:Broadening production rights hides the configuration defect and increases risk. Fix least-privilege permissions based on actual needs. AdministratorAccess may hide the missing narrow grant but creates unrelated security exposure. Verify necessary Bedrock and resource actions explicitly. Denial tests should run under the intended minimal workload role.
D:More unconditional mocks cannot reveal a real IAM deny or API contract drift. Combine isolated tests with carefully scoped integration evidence. Mocks are useful for local unit logic but cannot validate actual AWS permission or API contract. Exercise approved and denied calls in a secure integration environment.
Question 361
A regulated customer assistant uses shared prompt templates. Auditors ask which exact policy instructions and model settings produced a disputed answer last Tuesday. Which design provides reproducible traceability without retaining raw account numbers?
- Keep only the final answer text and ask the model to reconstruct its prompt later.
- Record the immutable prompt-template version, deployment/model version, sanitized input identifiers and correlated request metadata.
- Overwrite the previous prompt template during each release to guarantee only one active version.
- Include raw payment details permanently in every application log so a reviewer has complete context.
Explanation
Correct Answer
B:Version the actual system/developer prompt, model identifier, approved tool configuration and retrieval corpus reference. Correlate the generation request to a privacy-minimized record with timestamps and token settings. Retain only the permitted metadata and verify that a sampled answer can be traced to its deployed configuration even after later releases.
Incorrect Answers
A:A generated reconstruction is not a reliable historical record. The model may invent the old system prompt and cannot know overwritten settings. Preserve versioned source-of-truth configuration and measured invocation evidence rather than relying on its recollection.
C:Overwriting removes the exact artifact required to reproduce or investigate a past release. Immutable versioning can coexist with one currently deployed version. Track both the active pointer and historical release artifacts.
D:Raw personal or payment records create a separate confidentiality and retention risk. An audit usually needs provenance and authorized evidence, not unrestricted copies of sensitive prompts. Record secure references and redact unnecessary identifiers.
Question 362
A product-help RAG index still answers from yesterday’s warranty policy after new source files arrive every morning. Which signal should the team monitor to detect this operational failure?
- Increase output-token allowance to encourage more complete old answers.
- Use model temperature zero and infer that every retrieved passage is current.
- Measure successful ingestion completion per source version, indexing lag and failed synchronization batches, with freshness alerts.
- Report only average inference latency, since it includes all ingestion delays.
Explanation
Correct Answer
C:Compare source object version or modification timestamp with the indexed document version, including deleted and failed records. Alert on excessive ingestion lag and batch failures, then retry or quarantine failed work. A freshness SLA must be measured at the data pipeline, not inferred from model fluency.
Incorrect Answers
A:Longer output can repeat more obsolete facts and has no effect on whether the index contains the revised warranty clause. Verify ingestion timestamps and source-to-index reconciliation before changing generation controls.
B:Low temperature can make a stale answer more reproducible, but not fresher. The generator consumes retrieved evidence as provided. Correct source synchronization and test a recently changed clause. A deterministic generator can repeatedly cite obsolete warranty language if the ingestion job did not refresh the index. Monitor source revision and sync completion.
D:Request latency measures serving time, not whether yesterday’s ingestion succeeded. A fast answer can still cite a deleted source. Add separate pipeline freshness and failure telemetry. Fast generation of a stale passage still gives incorrect warranty advice. Track the gap between S3 update, index availability and cached answer invalidation.
Question 363
A safety guardrail rejects harmless slang used by one dialect group far more often than equivalent requests in standard English. What is the correct first evaluation?
- Add the dialect group’s phrases to a universal blocklist without labeling their meaning.
- Compare false-positive safety rejection rates on representative labeled dialect and standard-language cases, then test targeted mitigation.
- Disable toxicity controls for every user to guarantee equal acceptance rates.
- Measure only global rejection accuracy and treat group imbalance as irrelevant.
Explanation
Correct Answer
B:Construct consent-appropriate examples labeled for actual unsafe meaning, including benign slang, ambiguous contexts and genuinely harmful content. Compare subgroup false positives with sample sizes and measure whether a proposed change weakens true-positive detection. Document the tradeoff and retest under the same rubric. Include harmless local idioms and genuinely disallowed near-misses in a labeled test set. Adjust the detector only after measuring both types of errors, preserving the approved safety boundary for the same underlying intent regardless of dialect.
Incorrect Answers
A:A blanket blocklist can amplify the problem by converting benign local expressions into automatic denials. Ground the filter changes in labeled meaning and actual user context rather than spelling alone.
C:Uniformly removing a safety control may reduce one fairness disparity by allowing harmful requests for everyone. That does not satisfy the security goal. Find a narrowly validated adjustment that preserves appropriate blocking.
D:An aggregate metric can hide disproportionate denials for users of a smaller language group. The suspected harm concerns group-specific false positives, which must be measured separately alongside overall safety. Global accuracy may be dominated by standard-language users and hide excessive refusal in a small dialect cohort. Compare labeled equivalent requests by group.
Question 364
A legal-advice drafting prompt is shortened. Reviewers like the new tone, but several outputs omit a mandatory jurisdiction-specific disclaimer. Which release test should stop deployment?
- A spelling check on the disclaimer in the old prompt, without executing the new one.
- A versioned assertion suite checking the required disclaimer across representative regulated cases and negative inputs.
- A tokenizer check confirming the system prompt uses fewer tokens than before.
- A subjective rating that the new output sounds more concise than the previous version.
Explanation
Correct Answer
B:Run both template versions against representative jurisdictions, languages and exceptional cases. Assert the exact required disclosure and permitted placement, compare factuality, and fail release when an obligation disappears. Track the tested prompt hash and model version so regressions can be reproduced. Make the legal notice a nonnegotiable acceptance assertion across the frozen prompt test suite. A shorter prompt can improve latency yet violate a regulated response contract; block promotion until the required notice appears under ambiguous and adversarial user requests.
Incorrect Answers
A:An old prompt being spelled correctly says nothing about how the new version behaves. Execute the deployed candidate and assert the disclaimer appears when required, including edge cases. Execute the new shortened prompt on regulated examples and assert that every required notice survives. The old file's spelling cannot validate a deployed change.
C:Token count is an efficiency measure and cannot prove that essential instructions survive compression. A shorter prompt might remove compliance safeguards. Measure output behavior on the regulated use cases. A lower token count is useful only if mandatory legal disclosures are intact. Compare exact response content against a frozen jurisdiction-specific rubric.
D:Fluent prose does not establish compliance with a legal content requirement. The change can improve readability while violating a mandatory disclosure. Review the output contract, not just subjective style. Improved tone cannot substitute for a required compliance notice. Block promotion on missing notices even when human preference scores rise.
Question 365
An AI coding assistant refactors an AWS Bedrock client and changes `modelId` to `modelName` in the invocation payload. Unit tests mock the API and still pass. What should the merge pipeline add?
- An increase in the Lambda execution timeout to hide malformed request errors.
- A prompt asking the code assistant to state that its refactor is correct.
- Schema-contract checks against the documented SDK/API request shape and a controlled supported integration test.
- A suppression rule for all Bedrock validation exceptions in the application.
Explanation
Correct Answer
C:Check request field names, types and response parsing against the pinned SDK and target service contract. Add an allowed sandbox invocation or recorded schema validation with a negative malformed-payload test. Block merging when the new field fails validation; do not let mocks stand in for the production API contract.
Incorrect Answers
A:Malformed request validation typically fails regardless of available runtime. More timeout budget adds cost and delays diagnosis without changing the accepted property name. `modelName` may not be an accepted request field; extra Lambda execution time cannot change a rejected Bedrock API schema. Run an integration contract test.
B:A coding model can produce plausible but nonexistent fields. Self-attestation is not authoritative API evidence. The build needs executable contract validation and pinned version documentation. The assistant that created the patch is not authoritative documentation for the runtime request. Compare actual payload fields with the SDK and API definition.
D:Ignoring validation errors converts a visible deployment defect into silent failure. Preserve error handling, test the actual request schema and revert the invalid refactor. A suppressed ValidationException prevents engineers from detecting an incompatible client and may cause false status reports. Retain typed errors and repair the field name.
Question 366
A hybrid keyword/vector search for internal runbooks ranks marketing pages ahead of exact troubleshooting instructions. The correct runbooks contain the model numbers and error codes. What diagnostic sequence should be tried?
- Disable keyword retrieval entirely without measuring recall for exact error codes.
- Increase the semantic vector weight without checking whether exact error-code matches and runbook source filters are lost.
- Inspect query analyzers and filters, compare lexical/vector retrieval candidates, then evaluate reranking against judged technical cases.
- Delete all document metadata and use the nearest vector regardless of source type.
Explanation
Correct Answer
C:Validate that error codes survive tokenization, apply source-type or recency filters where justified, and inspect each retriever’s score contribution. Compare hybrid weighting and reranking on held-out runbook queries with known relevant documents. Keep access permissions enforced during candidate selection. Keep exact model numbers and diagnostic error codes intact through the lexical analyzer. Compare retrieved technical runbooks versus marketing pages and quantify ranking improvement at a fixed query budget, with authorized source filtering retained.
Incorrect Answers
A:Lexical matching can be valuable for exact identifiers where semantic embeddings are weak. Removing it blindly may worsen error-code recall. Tune both components with measurements. Error codes and exact model numbers often work best with lexical matching. Compare hybrid results before tuning the keyword weight or disabling a useful index.
B:A stronger semantic weight can further demote exact model numbers and technical fault codes that the lexical component handles well. Examine both candidate lists and query analyzer output before tuning weights. Judge proposed rankings against known runbook questions and keep authoritative source-type filtering.
D:Source metadata distinguishes authoritative runbooks from promotional material. Removing it sacrifices a useful filter and can increase false citations. Preserve provenance and retrieval diagnostics. Marketing pages may share vocabulary with repair instructions. Retain document-type and source filters so reranking favors approved diagnostic runbooks.
Question 367
After a summarization prompt is shortened, weekly finance summaries sometimes drop numeric totals while retaining a polished narrative. What should be added to release validation?
- A factuality regression suite matching reported amounts, dates and units to the labeled source reports.
- A readability check that rewards answers with fewer numerical tokens.
- An instruction telling the generator to sound confident about missing totals.
- A faster inference benchmark that ignores the report content.
Explanation
Correct Answer
A:Keep a frozen set of source reports with expected numeric facts and tolerance rules. Run the old and proposed templates, check retained totals and units, and flag unsupported figures or missing material numbers. Validate under long inputs and truncated contexts before the new prompt is released.
Incorrect Answers
B:Removing numbers can increase apparent readability while destroying the business information that a summary must preserve. Evaluate source fidelity rather than sentence length alone. The report must preserve total amounts, currencies and their calculation inputs. Rewarding fewer numeric tokens could prefer precisely the omission that failed review.
C:Confident phrasing does not recover a missing numeric source and can make an inaccurate summary seem trustworthy. Ground every consequential figure in the supplied report. A confident summary without source totals may drive erroneous finance decisions. Validate the amounts against source rows and refuse unsupported figures.
D:Latency cannot establish whether a required figure was omitted. A fast incorrect report remains a material defect. Use content-level assertions alongside performance tests. A faster response can still omit a critical total. Test numeric-field coverage and faithful arithmetic under the new prompt version.
Question 368
A multilingual HR assistant translates employee performance notes but inconsistently substitutes gendered pronouns, potentially changing the subject of feedback. What evaluation best addresses this risk?
- Measure only translation speed and accept any grammatically correct pronoun.
- Use the same English output for every language without checking employee comprehension.
- Remove all cases involving personal references from the evaluation corpus.
- Use paired, human-reviewed multilingual cases measuring pronoun fidelity and disparity across relevant identity and language contexts.
Explanation
Correct Answer
D:Use legitimate, consent-appropriate examples with known reference relationships and ambiguity annotations. Assess whether translated pronouns change who performed an action, compare error patterns across languages, and require specialist review of high-impact HR outputs. Test remediation without adding guessed demographic attributes. Use paired source and translated HR notes to score who performed each action, not just language fluency. A pronoun swap can invert an employee performance claim; route high-impact ambiguous attribution to controlled review.
Incorrect Answers
A:High translation throughput does not prevent a pronoun error from attributing performance to the wrong employee. The task needs semantic fidelity, not only grammar or latency. A grammatically correct translation that changes who received criticism is factually wrong. Measure source-referenced pronoun and entity attribution, not speed.
B:A universal English answer does not serve the requested languages and may create accessibility barriers. Validate language-specific meaning and provide review or clarification for ambiguous source references. A blanket English response does not ensure comprehension by employees using supported languages. Evaluate meaning and accessibility in each intended locale.
C:Removing complex reference cases conceals the failure mode most likely to harm users. Keep representative edge cases and measure the specific mistranslation pattern. Dropping difficult pronoun cases hides disparities in high-impact employee evaluations. Keep paired labeled examples covering different pronoun contexts and languages.
Question 369
A coding assistant suggests placing an AWS API credential directly in a Python repository to simplify a Bedrock integration. Which remediation addresses both the immediate design and possible earlier exposure?
- Extend the access key expiration so test runs are more reliable.
- Use an IAM role or managed secret location and inspect repository history for any already committed credential, rotating it if exposed.
- Leave the credential in source but add a comment warning teammates not to copy it.
- Base64-encode the secret in the repository and treat the encoded value as encrypted.
Explanation
Correct Answer
B:Prefer temporary role credentials for AWS workloads; where a secret is unavoidable, use a restricted manager such as AWS Secrets Manager with rotation and audit. Search branches, build logs and past commits for exposure, revoke compromised values, and ensure CI blocks future secret commits. An AWS API key embedded in version control can be copied into branches, CI logs or public forks. Use a scoped workload role or managed secret, revoke any committed key and check repository history before declaring exposure resolved.
Incorrect Answers
A:Long-lived credentials increase the exploitation window after a leak. Stable deployments are achieved by managed credential refresh, least privilege and recovery testing, not extended static exposure. An exposed long-lived AWS key can be replayed from any copied repository. Revoke it and use scoped workload identity or an approved secret manager.
C:A warning comment does not alter access to the underlying source or stop a scanner or outsider from retrieving the credential. Secrets need separate secure storage and controls. A comment cannot prevent Git history, packages or automated scanners from exposing the credential. Rotate the key and remove its use from source.
D:Encoding is trivially reversible and leaves the same credential readable to anyone with repository access. Use role-based authentication or actual protected secret management. Base64 is only reversible text encoding. Anyone reading the repository can decode and reuse the same AWS API key.
Question 370
A vector index still returns passages from documents that the owner deleted yesterday, although the source S3 objects no longer exist. What should the ingestion team validate?
- Increase the chunk overlap so removed paragraphs appear in more search results.
- Change only the visible citation URL to a newer unrelated document.
- Deletion-tombstone propagation and removal of all derived chunks or cache entries from retrievable indexes.
- Keep the old vectors because deleting the original object makes the embeddings harmless.
Explanation
Correct Answer
C:Track source IDs, document versions and index chunk IDs through a deletion or tombstone event. Test that the retriever and caches exclude removed content and preserve an auditable cleanup receipt. Reconciliation should detect lost or delayed deletion notifications; source removal alone is insufficient. A deleted S3 object may still have retrievable embeddings or cached quotations. Confirm a tombstone causes removal from the vector store and caches, and test that queries cannot cite the deleted document after synchronization.
Incorrect Answers
A:Greater overlap creates additional copies of content, increasing cleanup complexity and the chance of stale hits. Fix index deletion and provenance tracking rather than multiply vectors. Additional overlap produces even more stale vectors from a removed document. Propagate the deletion event and remove derivative chunks and cache entries.
B:Rewriting a citation link hides the provenance error and can present stale passages as current evidence. Remove affected vectors and regenerate only from authorized current sources. A new citation target cannot make old source text current. Delete or invalidate the affected vector passages using their original source identifiers.
D:Embeddings and stored snippets can reveal source information or continue to ground obsolete answers after the original file is gone. Enforce deletion across derivative stores. Embeddings and snippet metadata remain derived copies with potential confidential content. Synchronize deletion across indexes, caches and retrieval results.