Question 230

A workflow has separate branches for complete documents and documents needing clarification. Tests exercise only the complete branch, and a missing-field request fails at runtime. What development change best addresses this gap?

  1. Replace the branch with an unconditional success response
  2. Test branch predicates and both reachable branch contracts using explicit fixtures
  3. Measure only the total execution time of successful complete-document runs
  4. Increase the number of complete-document tests without exercising the alternate branch

Explanation

Correct Answer

B:

A successful default path does not validate alternate control flow. Fixtures should assert which branch runs and the required output or clarification behavior.

Incorrect Answers

A:

This hides validation failures and removes the required clarification behavior.

C:

Timing on an unrelated path does not establish correctness of the failing branch.

D:

More coverage of the same path cannot reveal a mapping defect confined to the missing-field branch.

Question 231

An application integration receives an HTTP event whose body is a JSON string. The handler forwards that string as though it were the already parsed business object, so the downstream field mapper cannot find documentId. What should be fixed?

  1. Increase the model's context window so it can guess the missing field
  2. Decode the event according to its transport envelope, parse the body, and validate the business schema
  3. Rename documentId in the downstream prompt without inspecting the parsed object
  4. Mark the job as successfully accepted and omit its document identifier

Explanation

Correct Answer

B:

The envelope and its embedded payload are different layers. Correct decoding exposes the expected fields without relying on the FM to infer application structure.

Incorrect Answers

A:

The identifier is present in an unparsed application payload. A transport-to-object mapping defect should be repaired before inference.

C:

Renaming does not expose a field while the body remains an opaque string.

D:

The worker cannot reliably associate the task with its input. Acceptance must not conceal a failed payload contract.

Question 232

A new answer-verification stage should be disabled quickly if it causes widespread failures. What deployment support fits?

  1. Hard-code the experiment into every client release
  2. A controlled feature flag with safe defaults, monitoring, and rollback behavior
  3. Allow arbitrary users to toggle verification globally
  4. Remove monitoring during the experiment

Explanation

Correct Answer

B:

Runtime configuration can limit exposure without rebuilding everything. Both enabled and disabled paths need defined semantics.

Incorrect Answers

A:

That slows coordinated rollback and can leave mixed behavior across users.

C:

A global operational control requires authorized management.

D:

Without telemetry, the team cannot know when rollback is needed.

Question 233

An FM returns text containing HTML and script-like content. How should a web client display ordinary answers?

  1. Assume model safety filters eliminate all XSS risk
  2. Give the response access to application cookies
  3. Insert it directly as unrestricted HTML
  4. Render as escaped text or through a constrained sanitized markup pipeline

Explanation

Correct Answer

D:

Generated output is untrusted browser input. Display formatting must not create executable content.

Incorrect Answers

A:

Content moderation is not a browser-specific output-encoding guarantee.

B:

Model-generated text does not need executable access to user credentials.

C:

This can turn generated text into browser code or unsafe markup.

Question 234

Users can export their assistant history. What should the export endpoint enforce?

  1. Expose every user's history because export is read-only
  2. Ask the model whether the requester sounds legitimate
  3. Authenticated ownership checks and the same data-access rules as the chat interface
  4. Trust any requested conversation ID

Explanation

Correct Answer

C:

An alternate output path must not bypass conversation authorization. Export format does not reduce sensitivity.

Incorrect Answers

A:

Read access can disclose sensitive information even without writes.

B:

Authorization needs verified identity and policy rather than linguistic impressions.

D:

Identifiers can be guessed, leaked, or copied and are not permission grants.

Question 235

A user flags an answer as incorrect. What metadata makes the feedback actionable?

  1. Store only a daily count of negative clicks
  2. Treat every complaint as a confirmed model defect
  3. Automatically rewrite the model's system prompt from the comment
  4. Link it to the response, relevant component versions, and a protected failure category

Explanation

Correct Answer

D:

Correlation supports reproduction and targeted improvement. Collect only necessary personal data.

Incorrect Answers

A:

Counts show volume but do not identify what failed.

B:

Feedback is evidence to investigate, not a verified diagnosis.

C:

Untrusted feedback should not directly modify production instructions.

Question 236

A developer tests a new agent using credentials that can modify production customer records. What should change?

  1. Keep production privileges and add a comment saying test only
  2. Use isolated test resources and roles scoped to approved test operations
  3. Hide the credentials in a local variable
  4. Rely on the model to recognize test traffic

Explanation

Correct Answer

B:

Environment separation prevents experiments from affecting live business data. Representative fixtures can exercise behavior safely.

Incorrect Answers

A:

Comments do not enforce resource boundaries.

C:

Storage location alone does not reduce their authority.

D:

The executor must enforce the environment, regardless of generated intent.

Question 237

An application expects generated labels from a fixed set of five categories. What integration test is useful?

  1. Require an exact prose match for every explanation
  2. Test only whether the response is nonempty
  3. Verify parseability, allowed labels, and failure handling on representative edge cases
  4. Accept any new label because the model generated it

Explanation

Correct Answer

C:

Clients depend on structural invariants even when wording varies. Invalid categories need a defined rejection or repair path.

Incorrect Answers

A:

Different valid explanations can exist; exact text matching is too restrictive for that field.

B:

A nonempty response can contain an unsupported category or invalid structure.

D:

Uncontrolled labels break downstream assumptions and reporting.

Question 238

An assistant blocks harmful user prompts but can still produce harmful replies to benign prompts. What control is missing?

  1. Apply the input safety assessment to the user message twice and skip output assessment
  2. Assume all accepted inputs imply approved outputs
  3. Evaluate output safety as well as input safety
  4. Only increase input-filter sensitivity

Explanation

Correct Answer

C:

A benign request does not guarantee a safe completion. Response controls must inspect generated content before release under the application's policy.

Incorrect Answers

A:

Repeating input checks does not inspect content introduced by the generator. A benign input can still produce a harmful response.

B:

The model can introduce content not present in the request.

D:

Input-only checks cannot inspect harmful content introduced during generation.

Question 239

A production application references an editable guardrail draft. What change improves reproducible safety enforcement?

  1. Record only the guardrail's friendly name
  2. Use the approved guardrail version and record it with each release
  3. Disable filtering during policy edits
  4. Always select whichever draft was modified last

Explanation

Correct Answer

B:

Version pinning connects behavior to the tested policy. Editing a draft should not silently change deployed controls.

Incorrect Answers

A:

Names may remain unchanged across policy revisions.

C:

Editing should not create an unprotected production interval.

D:

Recency does not establish approval or stable behavior.

Question 240

An application uses a model outside Bedrock but wants to evaluate text with an applicable Bedrock guardrail. What integration should be considered?

  1. Use a vector similarity score as the guardrail result
  2. Assume every external model automatically inherits Bedrock filtering
  3. Send the guardrail name only in a system prompt
  4. Invoke ApplyGuardrail but treat its assessment as advisory while always displaying the original
  5. Use ApplyGuardrail with the configured policy and supported content

Explanation

Correct Answer

E:

The guardrail evaluation can be separate from generation. The application must still enforce the returned assessment before displaying content.

Incorrect Answers

A:

Retrieval similarity is not an assessment against configured safety policies.

B:

An external generation path needs an explicit safety integration.

C:

Mentioning a policy identifier does not invoke the evaluation API.

D:

The integration must enforce the returned action. Calling the assessment API does not protect users if the application ignores intervention results.

AWS Certified Generative AI Developer - Professional AIP-C01 Practice Tests