Microsoft AI-103 (Developing AI Apps and Agents on Azure) Practice Test 24

Question 230

A user message contains three independent tasks and the model routinely forgets the second. What is the most suitable next implementation decision?

  1. Add representative labeled examples that contrast the two categories
  2. Parameterize presentation-style guidance separately from the evidence and constraints
  3. Represent the task as an explicit checklist or structured plan
  4. Separate untrusted retrieved content from system and developer instructions

Explanation

Correct Answer

C:

A visible task breakdown helps the workflow track required outputs and completion status across multiple generation steps.

Incorrect Answers

A:

Contrasting demonstrations clarify the decision boundary better than repeating an abstract label name in a long prompt; the requested solution requires representing the task as an explicit checklist or structured plan rather than this different mechanism.

B:

Formatting and tone can vary without loosening factual grounding or changing protected business requirements; it addresses a neighboring concern, while the task tests representing the task as an explicit checklist or structured plan.

D:

Trust hierarchy prevents adversarial source instructions from appearing to grant new control over the assistant's actions; on its own this leaves representing the task as an explicit checklist or structured plan unaddressed.

Question 231

A document analysis prompt includes irrelevant background that pushes important instructions out of context. Which implementation should the team choose?

  1. Specify the required output structure and verify it with schema validation
  2. Maintain a strict separation between user content and confidential instructions
  3. Parameterize presentation-style guidance separately from the evidence and constraints
  4. Trim unrelated material and prioritize critical task constraints

Explanation

Correct Answer

D:

Prompt composition should reserve context budget for the actual objective and evidence rather than bloating inputs with extraneous prose.

Incorrect Answers

A:

Explicit format instructions guide generation while application-side validation checks that the final result is structurally usable; the scenario instead depends on triming unrelated material and prioritize critical task constraints.

B:

The application must not reveal privileged policy text merely because a lower-trust input asks for it; the requested solution requires triming unrelated material and prioritize critical task constraints rather than this different mechanism.

C:

Formatting and tone can vary without loosening factual grounding or changing protected business requirements; it addresses a neighboring concern, while the task tests triming unrelated material and prioritize critical task constraints.

Question 232

An API accepts untrusted chat messages that request disclosure of hidden safety instructions. What is the most suitable next implementation decision?

  1. Represent the task as an explicit checklist or structured plan
  2. Maintain a strict separation between user content and confidential instructions
  3. Separate untrusted retrieved content from system and developer instructions
  4. Trim unrelated material and prioritize critical task constraints
  5. Place stable business constraints in a higher-priority instruction layer

Explanation

Correct Answer

B:

The application must not reveal privileged policy text merely because a lower-trust input asks for it.

Incorrect Answers

A:

A visible task breakdown helps the workflow track required outputs and completion status across multiple generation steps; the needed design choice concerns maintaining a strict separation between user content and confidential instructions instead.

C:

Trust hierarchy prevents adversarial source instructions from appearing to grant new control over the assistant's actions; the requested solution requires maintaining a strict separation between user content and confidential instructions rather than this different mechanism.

D:

Prompt composition should reserve context budget for the actual objective and evidence rather than bloating inputs with extraneous prose; it addresses a neighboring concern, while the task tests maintaining a strict separation between user content and confidential instructions.

E:

Trusted application instructions establish behavioral rules; user input remains task data and should not override those constraints; it cannot substitute for maintaining a strict separation between user content and confidential instructions under these conditions.

Question 233

A purchase-order extraction workflow must emit machine-readable JSON matching a defined set of fields. What should the engineer implement?

  1. Apply domain-rule validation after parsing the JSON
  2. Use supported structured-output schema constraints with downstream validation
  3. Use an API-supported structured response format rather than text-only formatting requests
  4. Verify citation identifiers against the retrieval result set

Explanation

Correct Answer

B:

Schema-constrained generation can enforce the required shape, and validation still checks domain semantics before persistence.

Incorrect Answers

A:

Schema validity addresses types and structure; business rules must separately reject semantically invalid values; that would not ensure emiting machine-readable JSON matching a defined set of fields for this workload.

C:

A structured response contract reduces packaging ambiguity; asking in prose alone cannot guarantee parser-ready output; the scenario instead depends on emiting machine-readable JSON matching a defined set of fields.

D:

A correctly shaped string is not proof of evidence; reference integrity requires checking against trusted source IDs; the requested solution requires emiting machine-readable JSON matching a defined set of fields rather than this different mechanism.

Question 234

A generated JSON object has the expected keys but contains an impossible negative quantity. What should the engineer implement?

  1. Use supported structured-output schema constraints with downstream validation
  2. Define typed tool parameters with required fields and enums
  3. Compute and compare totals in deterministic code before committing records
  4. Apply domain-rule validation after parsing the JSON

Explanation

Correct Answer

D:

Schema validity addresses types and structure; business rules must separately reject semantically invalid values.

Incorrect Answers

A:

Schema-constrained generation can enforce the required shape, and validation still checks domain semantics before persistence; the relevant decision is applying domain-rule validation after parsing the JSON, not the separate action described here.

B:

A tool schema narrows acceptable arguments before execution, avoiding loosely interpreted prose for operational calls; that would not ensure applying domain-rule validation after parsing the JSON for this workload.

C:

Arithmetic invariants require independent validation even if all values satisfy JSON numeric types; the needed design choice concerns applying domain-rule validation after parsing the JSON instead.

Question 235

A model occasionally wraps JSON output in Markdown code fences, breaking a strict parser. Which of the following would meet this need?

  1. Reject or normalize fields against an explicit allowlisted schema
  2. Define typed tool parameters with required fields and enums
  3. Use supported structured-output schema constraints with downstream validation
  4. Use an API-supported structured response format rather than text-only formatting requests
  5. Apply domain-rule validation after parsing the JSON

Explanation

Correct Answer

D:

A structured response contract reduces packaging ambiguity; asking in prose alone cannot guarantee parser-ready output.

Incorrect Answers

A:

Accepting arbitrary generated attributes can break clients or expose data; contract validation protects the integration boundary; that mechanism does not itself establish using an API-supported structured response format rather than text-only formatting requests.

B:

A tool schema narrows acceptable arguments before execution, avoiding loosely interpreted prose for operational calls; the relevant decision is using an API-supported structured response format rather than text-only formatting requests, not the separate action described here.

C:

Schema-constrained generation can enforce the required shape, and validation still checks domain semantics before persistence; that would not ensure using an API-supported structured response format rather than text-only formatting requests for this workload.

E:

Schema validity addresses types and structure; business rules must separately reject semantically invalid values; the scenario instead depends on using an API-supported structured response format rather than text-only formatting requests.

Question 236

An agent tool requires a date in ISO format and an enumerated shipment status. Which of the following would meet this need?

  1. Use supported structured-output schema constraints with downstream validation
  2. Reject or normalize fields against an explicit allowlisted schema
  3. Define typed tool parameters with required fields and enums
  4. Use an API-supported structured response format rather than text-only formatting requests

Explanation

Correct Answer

C:

A tool schema narrows acceptable arguments before execution, avoiding loosely interpreted prose for operational calls.

Incorrect Answers

A:

Schema-constrained generation can enforce the required shape, and validation still checks domain semantics before persistence; meeting the stated constraint still involves providing a date in ISO format and an enumerated shipment status.

B:

Accepting arbitrary generated attributes can break clients or expose data; contract validation protects the integration boundary; that mechanism does not itself establish providing a date in ISO format and an enumerated shipment status.

D:

A structured response contract reduces packaging ambiguity; asking in prose alone cannot guarantee parser-ready output; that would not ensure providing a date in ISO format and an enumerated shipment status for this workload.

Question 237

A back-end receives an extraction result with fields absent from the agreed interface. What is the most suitable next implementation decision?

  1. Apply domain-rule validation after parsing the JSON
  2. Use an API-supported structured response format rather than text-only formatting requests
  3. Compute and compare totals in deterministic code before committing records
  4. Use supported structured-output schema constraints with downstream validation
  5. Reject or normalize fields against an explicit allowlisted schema

Explanation

Correct Answer

E:

Accepting arbitrary generated attributes can break clients or expose data; contract validation protects the integration boundary.

Incorrect Answers

A:

Schema validity addresses types and structure; business rules must separately reject semantically invalid values; on its own this leaves rejecting or normalize fields against an explicit allowlisted schema unaddressed.

B:

A structured response contract reduces packaging ambiguity; asking in prose alone cannot guarantee parser-ready output; meeting the stated constraint still involves rejecting or normalize fields against an explicit allowlisted schema.

C:

Arithmetic invariants require independent validation even if all values satisfy JSON numeric types; that mechanism does not itself establish rejecting or normalize fields against an explicit allowlisted schema.

D:

Schema-constrained generation can enforce the required shape, and validation still checks domain semantics before persistence; the relevant decision is rejecting or normalize fields against an explicit allowlisted schema, not the separate action described here.

Question 238

A report generator must distinguish an unknown field from one observed with the numeric value zero. What is the most suitable next implementation decision?

  1. Allow an explicit null or missing-data representation in the contract
  2. Use an API-supported structured response format rather than text-only formatting requests
  3. Define typed tool parameters with required fields and enums
  4. Compute and compare totals in deterministic code before committing records

Explanation

Correct Answer

A:

A null or omission signals uncertainty; inventing zero would turn absence of evidence into a false measurement.

Incorrect Answers

B:

A structured response contract reduces packaging ambiguity; asking in prose alone cannot guarantee parser-ready output; on its own this leaves distinguishing an unknown field from one observed with the numeric value zero unaddressed.

C:

A tool schema narrows acceptable arguments before execution, avoiding loosely interpreted prose for operational calls; meeting the stated constraint still involves distinguishing an unknown field from one observed with the numeric value zero.

D:

Arithmetic invariants require independent validation even if all values satisfy JSON numeric types; that mechanism does not itself establish distinguishing an unknown field from one observed with the numeric value zero.

Question 239

An agent returns a structured reimbursement recommendation with an expense amount and citations. Some outputs contain a negative quantity or source URLs that were never retrieved. Which TWO independent post-generation checks prevent these errors from being accepted? Choose TWO.

  1. Check parsed amounts against reimbursement-domain numeric invariants
  2. Use supported structured-output schema constraints with downstream validation
  3. Reject citation identifiers not found in the actual retrieval results
  4. Reject or normalize fields against an explicit allowlisted schema
  5. Compute and compare totals in deterministic code before committing records

Explanation

Correct Answers

A:

Schema validity addresses types and structure; business rules must separately reject semantically invalid values; a syntactically valid number can still violate a reimbursement policy.

C:

A correctly shaped string is not proof of evidence; reference integrity requires checking against trusted source IDs; the displayed reference must be traceable to evidence actually retrieved.

Incorrect Answers

B:

Schema-constrained generation can enforce the required shape, and validation still checks domain semantics before persistence; it cannot substitute for domain-value constraints and cross-checks of retrieved citations under these conditions.

D:

Accepting arbitrary generated attributes can break clients or expose data; contract validation protects the integration boundary; meeting the stated constraint still involves domain-value constraints and cross-checks of retrieved citations.

E:

Arithmetic invariants require independent validation even if all values satisfy JSON numeric types; that mechanism does not itself establish domain-value constraints and cross-checks of retrieved citations.

Question 240

An application stores model-generated numeric totals that must exactly reconcile with line items. What should the engineer implement?

  1. Reject or normalize fields against an explicit allowlisted schema
  2. Use an API-supported structured response format rather than text-only formatting requests
  3. Use supported structured-output schema constraints with downstream validation
  4. Compute and compare totals in deterministic code before committing records
  5. Allow an explicit null or missing-data representation in the contract
  6. Apply domain-rule validation after parsing the JSON

Explanation

Correct Answer

D:

Arithmetic invariants require independent validation even if all values satisfy JSON numeric types.

Incorrect Answers

A:

Accepting arbitrary generated attributes can break clients or expose data; contract validation protects the integration boundary; the requested solution requires exactlying reconcile with line items rather than this different mechanism.

B:

A structured response contract reduces packaging ambiguity; asking in prose alone cannot guarantee parser-ready output; it addresses a neighboring concern, while the task tests exactlying reconcile with line items.

C:

Schema-constrained generation can enforce the required shape, and validation still checks domain semantics before persistence; it cannot substitute for exactlying reconcile with line items under these conditions.

E:

A null or omission signals uncertainty; inventing zero would turn absence of evidence into a false measurement; meeting the stated constraint still involves exactlying reconcile with line items.

F:

Schema validity addresses types and structure; business rules must separately reject semantically invalid values; that mechanism does not itself establish exactlying reconcile with line items.

Developing AI Apps and Agents on Azure (AI-103) Practice Tests