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

Question 310

A team needs to assess whether generated summaries expose personal account numbers. What should the engineer implement?

  1. Attempt unauthorized tool-call scenarios with least-privilege enforcement
  2. Run sensitive-data disclosure evaluations on representative prompts
  3. Test both harmful-content detection and false-positive refusal rates
  4. Run direct jailbreak tests against protected behavior rules

Explanation

Correct Answer

B:

Privacy tests detect unwanted reproduction of identifiers that ordinary topical correctness evaluations do not cover.

Incorrect Answers

A:

Behavioral tests plus denied API permissions verify that manipulated prompts cannot cross the action boundary; the requested solution requires assessing whether generated summaries expose personal account numbers rather than this different mechanism.

C:

Overblocking can harm legitimate users; safety quality includes detecting dangerous requests without excessive rejection; it cannot substitute for assessing whether generated summaries expose personal account numbers under these conditions.

D:

Adversarial user prompts probe whether the assistant violates its higher-priority constraints under pressure; on its own this leaves assessing whether generated summaries expose personal account numbers unaddressed.

Question 311

A knowledge assistant may receive conflicting policy documents in its retrieval context. What is the most suitable next implementation decision?

  1. Run direct jailbreak tests against protected behavior rules
  2. Test visual and OCR-borne prompt-injection attacks
  3. Test how it handles contradiction and source authority
  4. Run sensitive-data disclosure evaluations on representative prompts

Explanation

Correct Answer

C:

Robust behavior should identify conflicts or defer rather than combining incompatible rules into a false confident answer.

Incorrect Answers

A:

Adversarial user prompts probe whether the assistant violates its higher-priority constraints under pressure; the scenario instead depends on testing how it handles contradiction and source authority.

B:

Adversarial instructions can be carried inside pixels; input modality does not make the embedded text trustworthy; the requested solution requires testing how it handles contradiction and source authority rather than this different mechanism.

D:

Privacy tests detect unwanted reproduction of identifiers that ordinary topical correctness evaluations do not cover; it cannot substitute for testing how it handles contradiction and source authority under these conditions.

Question 312

An agent is authorized to read data but could be induced to invoke a destructive tool. Which design choice is most appropriate?

  1. Attempt unauthorized tool-call scenarios with least-privilege enforcement
  2. Test how it handles contradiction and source authority
  3. Run direct jailbreak tests against protected behavior rules
  4. Run sensitive-data disclosure evaluations on representative prompts

Explanation

Correct Answer

A:

Behavioral tests plus denied API permissions verify that manipulated prompts cannot cross the action boundary.

Incorrect Answers

B:

Robust behavior should identify conflicts or defer rather than combining incompatible rules into a false confident answer; the scenario instead depends on attempting unauthorized tool-call scenarios with least-privilege enforcement.

C:

Adversarial user prompts probe whether the assistant violates its higher-priority constraints under pressure; the requested solution requires attempting unauthorized tool-call scenarios with least-privilege enforcement rather than this different mechanism.

D:

Privacy tests detect unwanted reproduction of identifiers that ordinary topical correctness evaluations do not cover; it addresses a neighboring concern, while the task tests attempting unauthorized tool-call scenarios with least-privilege enforcement.

Question 313

An agent must call a shipping-status API using an order ID and optional locale. Which action directly produces the required outcome?

  1. Enforce result bounds and identity-scoped filtering in the tool handler
  2. Declare a tool with typed parameter names, requirements, and descriptions
  3. Enforce server-side value ranges and authorization on the tool call
  4. Use disambiguated names and parameter documentation for each function

Explanation

Correct Answer

B:

A function schema guides argument construction and makes missing or mistyped values detectable before the API is invoked.

Incorrect Answers

A:

Tool arguments are untrusted proposals; the backend must limit returned content and query scope independently; that would not ensure calling a shipping-status API using an order ID and optional locale for this workload.

C:

Model-generated parameters never substitute for policy; validation must reject out-of-range actions before side effects; the scenario instead depends on calling a shipping-status API using an order ID and optional locale.

D:

Distinct tool contracts reduce selection errors and make traces easier to interpret during debugging; the requested solution requires calling a shipping-status API using an order ID and optional locale rather than this different mechanism.

Question 314

A refund tool must accept only preapproved reason codes. Which action directly produces the required outcome?

  1. Enforce result bounds and identity-scoped filtering in the tool handler
  2. Use an enumerated field in the callable tool schema
  3. Declare a tool with typed parameter names, requirements, and descriptions
  4. Return an explicit empty-result or error state in the tool contract

Explanation

Correct Answer

B:

Restricting the accepted vocabulary reduces ambiguous free-text values and enables deterministic server-side validation.

Incorrect Answers

A:

Tool arguments are untrusted proposals; the backend must limit returned content and query scope independently; the relevant decision is accepting only preapproved reason codes, not the separate action described here.

C:

A function schema guides argument construction and makes missing or mistyped values detectable before the API is invoked; the needed design choice concerns accepting only preapproved reason codes instead.

D:

A typed no-result path prevents the assistant from treating absent business data as successful retrieval; the scenario instead depends on accepting only preapproved reason codes.

Question 315

An agent sometimes passes a user name where a numeric account ID is required. Which design choice is most appropriate?

  1. Declare a tool with typed parameter names, requirements, and descriptions
  2. Provide precise tool purpose, side-effect, and precondition descriptions
  3. Return an explicit empty-result or error state in the tool contract
  4. Validate tool arguments against the API contract before execution

Explanation

Correct Answer

D:

Schema validation catches a wrong identifier type before the model's proposed call reaches a protected downstream service.

Incorrect Answers

A:

A function schema guides argument construction and makes missing or mistyped values detectable before the API is invoked; that mechanism does not itself establish validating tool arguments against the API contract before execution.

B:

Clear affordances help the model choose the correct operation without granting new permissions or making a broad generic tool; the relevant decision is validating tool arguments against the API contract before execution, not the separate action described here.

C:

A typed no-result path prevents the assistant from treating absent business data as successful retrieval; that would not ensure validating tool arguments against the API contract before execution for this workload.

Question 316

A tool description is vague and the agent selects it for unrelated tasks. Which implementation should the team choose?

  1. Provide precise tool purpose, side-effect, and precondition descriptions
  2. Enforce result bounds and identity-scoped filtering in the tool handler
  3. Enforce server-side value ranges and authorization on the tool call
  4. Validate tool arguments against the API contract before execution
  5. Use disambiguated names and parameter documentation for each function

Explanation

Correct Answer

A:

Clear affordances help the model choose the correct operation without granting new permissions or making a broad generic tool.

Incorrect Answers

B:

Tool arguments are untrusted proposals; the backend must limit returned content and query scope independently; that mechanism does not itself establish providing precise tool purpose, side-effect, and precondition descriptions.

C:

Model-generated parameters never substitute for policy; validation must reject out-of-range actions before side effects; the relevant decision is providing precise tool purpose, side-effect, and precondition descriptions, not the separate action described here.

D:

Schema validation catches a wrong identifier type before the model's proposed call reaches a protected downstream service; that would not ensure providing precise tool purpose, side-effect, and precondition descriptions for this workload.

E:

Distinct tool contracts reduce selection errors and make traces easier to interpret during debugging; the needed design choice concerns providing precise tool purpose, side-effect, and precondition descriptions instead.

Question 317

An agent uses an internal search tool and a payment-adjustment tool. Users are allowed to see only their own ten most relevant records and must not be able to request adjustments beyond an approved threshold. Which TWO protections must execute in backend tool handlers? Choose TWO.

  1. Limit search results and apply the caller’s identity filter in backend code
  2. Use disambiguated names and parameter documentation for each function
  3. Declare a tool with typed parameter names, requirements, and descriptions
  4. Validate payment-tool amounts and authorization on the execution server
  5. Provide precise tool purpose, side-effect, and precondition descriptions

Explanation

Correct Answers

A:

Tool arguments are untrusted proposals; the backend must limit returned content and query scope independently; the search handler—not the model prompt—must enforce per-user result constraints.

D:

Model-generated parameters never substitute for policy; validation must reject out-of-range actions before side effects; the payment API must reject unapproved amounts regardless of proposed tool arguments.

Incorrect Answers

B:

Distinct tool contracts reduce selection errors and make traces easier to interpret during debugging; meeting the stated constraint still involves server-enforced query bounds and payment argument authorization.

C:

A function schema guides argument construction and makes missing or mistyped values detectable before the API is invoked; that mechanism does not itself establish server-enforced query bounds and payment argument authorization.

E:

Clear affordances help the model choose the correct operation without granting new permissions or making a broad generic tool; that would not ensure server-enforced query bounds and payment argument authorization for this workload.

Question 318

An agent suggests calling two similar functions with overlapping names. What is the most suitable next implementation decision?

  1. Enforce result bounds and identity-scoped filtering in the tool handler
  2. Validate tool arguments against the API contract before execution
  3. Use disambiguated names and parameter documentation for each function
  4. Provide precise tool purpose, side-effect, and precondition descriptions

Explanation

Correct Answer

C:

Distinct tool contracts reduce selection errors and make traces easier to interpret during debugging.

Incorrect Answers

A:

Tool arguments are untrusted proposals; the backend must limit returned content and query scope independently; it cannot substitute for using disambiguated names and parameter documentation for each function under these conditions.

B:

Schema validation catches a wrong identifier type before the model's proposed call reaches a protected downstream service; on its own this leaves using disambiguated names and parameter documentation for each function unaddressed.

D:

Clear affordances help the model choose the correct operation without granting new permissions or making a broad generic tool; that mechanism does not itself establish using disambiguated names and parameter documentation for each function.

Question 319

A workflow must represent 'no matching customer' without fabricating a customer object. Which method is the best fit?

  1. Validate tool arguments against the API contract before execution
  2. Return an explicit empty-result or error state in the tool contract
  3. Enforce result bounds and identity-scoped filtering in the tool handler
  4. Enforce server-side value ranges and authorization on the tool call

Explanation

Correct Answer

B:

A typed no-result path prevents the assistant from treating absent business data as successful retrieval.

Incorrect Answers

A:

Schema validation catches a wrong identifier type before the model's proposed call reaches a protected downstream service; it addresses a neighboring concern, while the task tests representing 'no matching customer' without fabricating a customer object.

C:

Tool arguments are untrusted proposals; the backend must limit returned content and query scope independently; on its own this leaves representing 'no matching customer' without fabricating a customer object unaddressed.

D:

Model-generated parameters never substitute for policy; validation must reject out-of-range actions before side effects; meeting the stated constraint still involves representing 'no matching customer' without fabricating a customer object.

Question 320

An agent proposes an amount exceeding a payment tool's approved maximum. Which configuration or component should be selected?

  1. Enforce server-side value ranges and authorization on the tool call
  2. Enforce result bounds and identity-scoped filtering in the tool handler
  3. Provide precise tool purpose, side-effect, and precondition descriptions
  4. Declare a tool with typed parameter names, requirements, and descriptions

Explanation

Correct Answer

A:

Model-generated parameters never substitute for policy; validation must reject out-of-range actions before side effects.

Incorrect Answers

B:

Tool arguments are untrusted proposals; the backend must limit returned content and query scope independently; it addresses a neighboring concern, while the task tests enforcing server-side value ranges and authorization on the tool call.

C:

Clear affordances help the model choose the correct operation without granting new permissions or making a broad generic tool; it cannot substitute for enforcing server-side value ranges and authorization on the tool call under these conditions.

D:

A function schema guides argument construction and makes missing or mistyped values detectable before the API is invoked; on its own this leaves enforcing server-side value ranges and authorization on the tool call unaddressed.

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