Amazon AWS Certified Generative AI Developer - Professional AIP-C01 Practice Test 39
Question 380
A GenAI invoice workflow extracts fields and then formats a payment instruction. The extraction stage sometimes produces a nonnumeric `totalAmount`. What should the orchestration enforce between stages?
- Allow the drafting model to guess the amount from the vendor name when extraction fails.
- Discard the document citation so the downstream model is less constrained.
- Send the raw unvalidated string to the payment tool and rely on retries.
- Validate the extraction output against a typed amount/currency schema and branch to correction or review before drafting.
Explanation
Correct Answer
D:Use an intermediate schema with numeric type, allowed currency and source-span evidence; check totals and confidence before continuing. Route invalid or inconsistent fields to a safe correction branch and require explicit payment authorization. This prevents invented financial values from being propagated into irreversible business actions.
Incorrect Answers
A:A supplier’s identity does not determine the amount owed. Guessing converts an extraction error into an unsupported monetary instruction. Flag incomplete evidence instead. A vendor identifier cannot determine the invoice's monetary total. Reject the nonnumeric field and request source correction before drafting payment.
B:Provenance helps operators resolve ambiguous invoice fields and detect manipulation. Removing source evidence makes validation and auditability worse. Removing citation offsets destroys the evidence needed to correct the extraction. Keep original invoice spans and typed validation states between stages. Preserve invoice source spans for correction.
C:Retrying an invalid payload cannot repair the original amount, and a permissive payment API could misinterpret it. Validate data prior to tool use. A string such as 'about five hundred' is not a validated payment amount. Block the downstream tool until numeric parsing and authorization pass.
Question 381
A system prompt for an internal GenAI app interleaves application policy, long retrieved articles and response-format instructions. An update causes the assistant to treat a source quotation as a new policy. What restructuring is appropriate?
- Append all documents without source labels so the model sees more contiguous text.
- Keep trusted role and task rules separate from explicitly delimited retrieved context and a validated output contract.
- Remove the output schema and allow each page to decide how the answer should look.
- Give retrieved pages system-message priority so their instructions become authoritative.
Explanation
Correct Answer
B:Organize application-owned instructions into stable trust-controlled messages, present retrieved documents as evidence with provenance and delimiters, and specify output requirements independently. The application should reject unauthorized tool actions regardless of model text. Test malicious retrieved instructions and ensure citations remain tied to sources. Keep external articles as delimited, provenance-tagged data rather than promoting quoted instructions into a privileged role. Test a malicious policy-looking paragraph and confirm the application's fixed rules and backend tool permissions remain authoritative.
Incorrect Answers
A:Without source boundaries the model may blend incompatible articles or mistake quoted instructions for authority. Retain source identity and context typing. Undelimited articles can contain hostile text that resembles application rules. Keep each passage labeled as lower-trust content with clear source provenance.
C:Letting untrusted content choose output shape creates parser failures and removes an application-owned contract. Preserve explicit schemas and a safe absence-of-evidence path. An external source must not define output format or tool authorization. Keep response schemas controlled by the application and validate parsed results.
D:External articles are not permitted to redefine the application’s authorization or behavior. Promoting them to a privileged role enables indirect prompt injection. A quoted web instruction has no authority to overwrite system policy. Preserve role separation and enforce backend permissions independently.
Question 382
A model vendor shows a strong public safety benchmark score. A hospital wants to use the model to summarize medication instructions for patients. What additional approval evidence is needed?
- No further evidence, because a vendor benchmark automatically covers all clinical workloads.
- A single fluent demo involving an uncomplicated patient case.
- A larger parameter count, accepted as a proxy for validated safety.
- Task-specific tests of medical factuality, omissions, vulnerable-user scenarios and known model limitations with accountable oversight.
Explanation
Correct Answer
D:Create a representative test plan including dosage numbers, contraindications, ambiguous source documents, reading-level needs and escalation requirements. Measure harmful omissions and unsupported assertions against authoritative documents with qualified operational oversight. Public benchmark results can inform selection but cannot establish safety in a distinct high-impact use case.
Incorrect Answers
A:Benchmark populations and failure costs can differ radically from patient-facing medication summaries. A general score is not proof of fitness for a particular risk profile. Medication errors have high patient consequences and may differ from the vendor's benchmark distribution. Evaluate source-grounded dose and contraindication fidelity for the intended clinical workflow.
B:One polished demonstration cannot characterize difficult cases, language variation or rare errors. Use a reproducible representative evaluation with explicit acceptance rules. One familiar case can conceal ambiguous instructions, missing evidence or rare dangerous omissions. Test realistic language and document variants before approval.
C:Model size may affect capability but neither verifies clinical correctness nor provides a recovery mechanism for harmful advice. Require evidence-based task tests. Parameter count does not certify medical safety. Use validated patient-facing tasks, severity-weighted error rates and a qualified escalation path.
Question 383
A few-shot prompt maps refund disputes to action codes. Its examples imply that every late delivery merits a refund, although the actual policy has exceptions. How should the developer fix the prompt?
- Add ten copies of the same simplistic refund example to reinforce the pattern.
- Remove policy source checks because the examples already provide labels.
- Replace misleading examples with policy-consistent positive and exception cases, then retest on held-out disputes.
- Add a vague “follow policy” sentence while retaining contradictory demonstration examples and skipping exception tests.
Explanation
Correct Answer
C:Correct the demonstration examples to reflect eligibility rules, including near-boundary cases and explicit nonrefund outcomes. Evaluate the revised prompt against separate labeled disputes not used in examples. Where policy changes, ground responses in current authoritative terms and preserve a structured eligibility trace. Include delayed deliveries that are not refund-eligible as well as clearly eligible cases, with current rule references. A balanced few-shot prompt must reproduce the documented exception rather than merely learn that 'late' always means 'refund.'
Incorrect Answers
A:Repeating a wrong generalization strengthens the same erroneous heuristic and underrepresents exceptions. Demonstrations should teach the real decision boundary. More identical late-delivery examples reinforce the false rule that every delay merits refund. Add eligible and excluded disputes from the current policy.
B:Few-shot examples are guidance, not a source of legal or contractual truth. Verify eligibility against the actual current refund policy before acting. Few-shot labels are not authoritative contract terms. Verify exceptions against the actual published refund policy and test held-out disputes.
D:General language instructions may be outweighed by repeated examples implying that every late delivery qualifies. The prompt should contain explicit correct and exception cases tied to current refund rules, then be tested on held-out disputes. A valid action code requires evidence of eligibility, not just persuasive wording.
Question 384
A support agent can look up orders, request refunds and edit customer contacts. An attacker places tool instructions in a retrieved knowledge article. What runtime design minimizes unauthorized actions?
- Validate only the final prose because tool side effects are implied by model output.
- Use narrowly scoped per-tool permissions, structured action validation and correlated execution receipts for every call.
- Grant the agent a global administrator role so all suggested tools succeed.
- Allow the article to redefine the agent’s tool permissions if it seems relevant.
Explanation
Correct Answer
B:Authorize each action against the authenticated customer and approved business workflow, verify parameters and approval requirements at the backend, and log actual tool results with request IDs. Treat knowledge-base instructions as untrusted evidence. A fluent answer cannot confer authorization to edit contacts or issue refunds.
Incorrect Answers
A:A model may claim a refund succeeded when no call occurred, or execute a call while describing something else. Verify tool receipts, not just text. A refund could be executed before the user sees a safe response. Enforce tool-specific backend authorization before side effects, not only prose filtering.
C:Broad tool privilege increases financial and privacy impact if the agent is compromised. Least privilege and explicit approvals are necessary controls. Broad account privileges magnify a poisoned article's impact. Limit each tool to required resources and demand verified user approval for refunds.
D:Retrieved articles can be edited by outsiders or contain accidental prompt-injection text. They must not promote themselves into higher-trust execution policy. A knowledge article is task evidence and may contain attacker instructions. Never let source text change permission scopes or tool access rules.
Question 385
A team observes different JSON structures from the same app in staging and production. Both environments claim to run the newest prompt version. What should be compared before changing the model?
- Only the friendly project names displayed in the two AWS accounts.
- Only the users’ device operating systems, ignoring server-side configuration.
- The number of documents in storage as an automatic explanation of JSON schema differences.
- Exact resolved prompt hash, model/deployment ID, decoding parameters, tool schema and response constraints in both environments.
Explanation
Correct Answer
D:Capture a sanitized reproducible invocation record for both environments, including actual model version, system/developer messages, tool definitions and structured-output settings. Run the same fixed inputs under equivalent controls and compare parser errors. Correct configuration drift before attributing the failure to inherent model behavior. A prompt label such as 'newest' is insufficient. Compare immutable message hashes, resolved model IDs, response-schema versions and inference settings using the same inputs in staging and production before blaming the base model.
Incorrect Answers
A:Friendly account and project names do not identify the bytes or parameters sent to inference. Two similarly named deployments can have different contracts. Two accounts with friendly matching names may still use different prompt hashes and model endpoints. Compare actual runtime request fields and versions.
B:Client platform could matter to an input field, but cannot establish equality of server-side generation controls. Compare the real invocation request and response. Mobile versus desktop can affect submitted content, but the server-side schema and prompt configuration must be compared on identical test inputs.
C:A larger corpus may change retrieved evidence, but does not explain an exact parser contract without inspecting prompts and model settings. Test the same context. Different document counts do not directly prove why generated JSON keys changed. First inspect output constraints, model IDs, prompt hashes and parser settings.
Question 386
A multimodal claims assistant extracts invoice totals from screenshots. It occasionally reads $8,900 as $8,000 when images are downscaled. What diagnostics should isolate the cause?
- Delete the raw image immediately before the processing mismatch is investigated.
- Increase output length to provide more rationale for a wrong number.
- Accept the generated amount whenever the surrounding prose sounds certain.
- Trace original and preprocessed image dimensions, examine crop/OCR confidence and validate extracted amounts against source evidence.
Explanation
Correct Answer
D:Keep privacy-controlled test fixtures with original resolution, orientation, crop and preprocessing configuration. Compare visual recognition at supported resolutions and add numeric-range or document-field checks. Route uncertain high-value amounts to review rather than letting one screenshot interpretation trigger payment. Compare original-resolution and downscaled screenshots, inspecting crop quality and OCR confidence around the disputed digits. The $8,900 versus $8,000 difference must be reconciled against the image before a payment or claim decision.
Incorrect Answers
A:Deleting all authorized diagnostic examples prevents reproduction of the defect. Retain only permitted minimal evidence while investigating the imaging pipeline. Retain a minimized approved image fixture long enough to compare OCR at different resolutions and verify the original digits. Deleting all evidence prevents diagnosis.
B:Additional prose can elaborate the same incorrect numeric observation. The issue is lost image detail or extraction fidelity, not a lack of language output. More rationale tokens cannot recover digits lost by downscaling. Inspect the crop around $8,900 and validate the extracted amount against source pixels.
C:Confidence in generated wording is not proof that digits were read correctly. Independently compare the extracted figure with visible source pixels and related totals. A confident statement can still omit the digit nine. Ground high-value financial fields in image regions and escalate discrepancies before posting.
Question 387
A legal settlement assistant generates very long explanations for straightforward numeric results, but reviewers require the exact amount, computation inputs and citation. How should its output contract change?
- Require a concise structured amount, relevant inputs, calculation method and cited source while validating none are truncated.
- Reduce the maximum output length to one token and assume auditors will infer the missing details.
- Remove citations to shorten every response, even when the amount is disputed.
- Apply a fixed character cutoff to every output without validating whether required numeric and citation fields survive.
Explanation
Correct Answer
A:Define a format with typed numeric result, units, calculation inputs and provenance, then use schema checks and representative long/short cases. Adjust the token budget only after confirming required evidence survives. Concision is useful when it preserves the records needed to reconstruct the financial result.
Incorrect Answers
B:A one-token cap truncates the amount and audit trail, violating the stated output requirements. Enforce structured concise fields rather than indiscriminate clipping. A one-token response cannot report the settlement amount, calculation factors and required citation. Bound verbosity without truncating mandatory audit fields.
C:Without source citations and inputs an auditor cannot verify a proposed settlement figure. Eliminate redundant prose, not essential evidence. Without a link to the source agreement and numeric inputs, reviewers cannot reproduce the figure. Keep compact but complete provenance. Keep exact amount and inputs verifiable.
D:A hard text cutoff can remove the computation inputs, amount or source reference that reviewers need. It may also create malformed JSON. Prefer a concise typed schema with required fields and validation, then measure whether the chosen token budget can satisfy the full contractual audit record.
Question 388
CloudWatch shows high p95 latency for a GenAI workflow, but the team cannot tell whether the bottleneck is retrieval, Bedrock inference or an external tool. What instrumentation is missing?
- End-to-end correlation IDs and trace spans around retrieval, model inference and tool calls with timing and error status.
- More CloudWatch alarm names without changing event or span instrumentation.
- A larger chat widget, so the response appears less delayed.
- A higher inference temperature to reduce response determinism.
Explanation
Correct Answer
A:Instrument each dependency boundary with start/end timing, sanitized correlation IDs, retry counts and relevant token or search metrics. Use supported distributed tracing such as AWS X-Ray and CloudWatch traces/metrics, then compare slow and normal requests. This isolates critical-path services without logging confidential prompt payloads.
Incorrect Answers
B:Alerts on aggregate latency do not provide stage-level timing by themselves. Add spans or equivalent correlated structured events. Additional alarms on the same total latency metric do not identify whether retrieval, inference or the pricing tool was slow. Add correlated per-stage spans.
C:Presentation size cannot identify which backend operation consumed elapsed time. The problem is missing dependency visibility. A larger widget has no effect on backend timeouts or queues. Measure request path durations and actual tool status instead. Correlate the slow request across backend services.
D:Sampling parameters are unrelated to whether the system can locate a slow retriever or third-party API. Instrument the actual call path first. Temperature changes generated response variation, not CloudWatch/X-Ray visibility of the slow dependent call. Instrument execution boundaries first.
Question 389
An automated insurance eligibility tool gives adverse recommendations but provides applicants no way to dispute a mistaken source record. Which governance mechanism should be added?
- A requirement that every appeal be processed exclusively by the same model without review authority.
- A hidden prompt that discourages users from requesting a reconsideration.
- An accountable review, evidence-correction and appeal path with traceable decisions separate from model generation.
- A message explaining that language models cannot be challenged once trained.
Explanation
Correct Answer
C:Identify responsible operators who can examine source evidence, correct inaccurate information and reverse a consequential recommendation when warranted. Preserve access-controlled decision records and a documented escalation timeline. A model score does not eliminate the organization’s accountability for actions taken on its output. Applicants need a documented way to challenge an incorrect input record and have an authorized decision-maker correct or override an adverse recommendation. Keep the appeal outcome and evidence distinct from the model's own explanation.
Incorrect Answers
A:Running the same disputed process without independent authority risks repeating its original bias or error. Appeal outcomes need accountable review and corrections. A model should not be the sole judge of a challenge to its own unverified source facts. Assign an accountable authorized review and correction process.
B:Hiding appeal routes impairs transparency and user trust. Document available correction and escalation channels and ensure the backend honors them. Suppressing appeals prevents affected applicants from correcting bad identity or eligibility records. Provide visible escalation and source-record amendment rights as applicable.
D:A categorical claim that generated outcomes are final denies a legitimate route to correct data and decisions. Implement an actual human-governed workflow. A trained model's recommendation does not make it legally or operationally irreversible. Keep review authority, evidence and a record of the corrected decision.
Question 390
A claims workflow extracts vehicle details, verifies coverage and drafts a settlement notice. A downstream step occasionally receives a free-form description instead of the expected policy limit. Which architecture should be used?
- Pass unvalidated free-form output directly to a payment or settlement action.
- Chain extraction, verification and drafting using typed, source-linked intermediate artifacts and stop when required fields fail validation.
- Remove step identifiers so the final response cannot be tied to an earlier extractor.
- Have the final drafting model invent a plausible policy limit when the verifier fails.
Explanation
Correct Answer
B:Give extraction an explicit schema and provenance, coverage verification a validated decision/result, and drafting a narrow input contract. An orchestration service such as Step Functions can branch to review on invalid or missing data. Carry approved source references and constrain any financially consequential action behind independent authorization.
Incorrect Answers
A:Free-form text may omit units, validity dates or the exact contract amount. Passing it directly to a payment side effect is unsafe and not auditable. A free-form `totalAmount` may be missing currency or contain a guess. Require a typed valid extraction before any settlement or payment step.
C:Intermediate IDs are needed to reconstruct why a notice used a particular figure. Dropping them harms observability and incident investigation. Identifiers link original documents, verified coverage and final notices. Removing them makes it impossible to attribute a wrong settlement amount.
D:A made-up limit can cause an unauthorized settlement. Missing evidence is a failure state requiring clarification or human review, not improvisation. When validation fails, the model cannot infer a legitimate policy limit from general patterns. Branch to correction or review rather than fabricate it.