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?
- Replace the branch with an unconditional success response
- Test branch predicates and both reachable branch contracts using explicit fixtures
- Measure only the total execution time of successful complete-document runs
- 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?
- Increase the model's context window so it can guess the missing field
- Decode the event according to its transport envelope, parse the body, and validate the business schema
- Rename documentId in the downstream prompt without inspecting the parsed object
- 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?
- Hard-code the experiment into every client release
- A controlled feature flag with safe defaults, monitoring, and rollback behavior
- Allow arbitrary users to toggle verification globally
- 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?
- Assume model safety filters eliminate all XSS risk
- Give the response access to application cookies
- Insert it directly as unrestricted HTML
- 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?
- Expose every user's history because export is read-only
- Ask the model whether the requester sounds legitimate
- Authenticated ownership checks and the same data-access rules as the chat interface
- 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?
- Store only a daily count of negative clicks
- Treat every complaint as a confirmed model defect
- Automatically rewrite the model's system prompt from the comment
- 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?
- Keep production privileges and add a comment saying test only
- Use isolated test resources and roles scoped to approved test operations
- Hide the credentials in a local variable
- 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?
- Require an exact prose match for every explanation
- Test only whether the response is nonempty
- Verify parseability, allowed labels, and failure handling on representative edge cases
- 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?
- Apply the input safety assessment to the user message twice and skip output assessment
- Assume all accepted inputs imply approved outputs
- Evaluate output safety as well as input safety
- 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?
- Record only the guardrail's friendly name
- Use the approved guardrail version and record it with each release
- Disable filtering during policy edits
- 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?
- Use a vector similarity score as the guardrail result
- Assume every external model automatically inherits Bedrock filtering
- Send the guardrail name only in a system prompt
- Invoke ApplyGuardrail but treat its assessment as advisory while always displaying the original
- 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.