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

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.

Question 241

A long chat keeps repeating obsolete troubleshooting steps until later user corrections are missed. Which design choice is most appropriate?

  1. Compact old turns while retaining current constraints and corrected facts
  2. Rerank and select a bounded evidence set before generation
  3. Reset or partition conversation state by authorized tenant context
  4. Keep authoritative source excerpts separate from lossy conversation summaries

Explanation

Correct Answer

A:

State summarization reduces context load and should prioritize the latest authoritative user requirements.

Incorrect Answers

B:

Focused context improves signal-to-noise ratio and reduces token cost while retaining passages needed for the answer; the requested solution requires compacting old turns while retaining current constraints and corrected facts rather than this different mechanism.

C:

Old dialogue and memory must not bleed across access scopes even when the same person initiates both sessions; it addresses a neighboring concern, while the task tests compacting old turns while retaining current constraints and corrected facts.

D:

Summaries can omit legally important wording; retrieval should rehydrate the precise primary evidence when needed; it cannot substitute for compacting old turns while retaining current constraints and corrected facts under these conditions.

Question 242

A RAG workflow retrieves 50 chunks but only five are relevant to the user's question. What should be included in the design?

  1. Rerank and select a bounded evidence set before generation
  2. Reset or partition conversation state by authorized tenant context
  3. Redact sensitive historical material before including it again
  4. Compact old turns while retaining current constraints and corrected facts

Explanation

Correct Answer

A:

Focused context improves signal-to-noise ratio and reduces token cost while retaining passages needed for the answer.

Incorrect Answers

B:

Old dialogue and memory must not bleed across access scopes even when the same person initiates both sessions; the scenario instead depends on reranking and select a bounded evidence set before generation.

C:

History management should prevent repeated exposure of secrets that the next inference request does not need; the requested solution requires reranking and select a bounded evidence set before generation rather than this different mechanism.

D:

State summarization reduces context load and should prioritize the latest authoritative user requirements; it addresses a neighboring concern, while the task tests reranking and select a bounded evidence set before generation.

Question 243

An application must reserve space for a sufficiently complete model response. Which design choice is most appropriate?

  1. Budget prompt tokens together with the maximum output allowance
  2. Reset or partition conversation state by authorized tenant context
  3. Rerank and select a bounded evidence set before generation
  4. Compact old turns while retaining current constraints and corrected facts

Explanation

Correct Answer

A:

A model context limit applies to total input and generated output; using all space on source text leaves no room for the answer.

Incorrect Answers

B:

Old dialogue and memory must not bleed across access scopes even when the same person initiates both sessions; the needed design choice concerns reserving space for a sufficiently complete model response instead.

C:

Focused context improves signal-to-noise ratio and reduces token cost while retaining passages needed for the answer; the scenario instead depends on reserving space for a sufficiently complete model response.

D:

State summarization reduces context load and should prioritize the latest authoritative user requirements; the requested solution requires reserving space for a sufficiently complete model response rather than this different mechanism.

Question 244

A conversation contains confidential tokens from earlier debugging and those tokens are unrelated to the next task. How should the developer address this requirement?

  1. Apply a token-based sliding window with retained memory summaries
  2. Redact sensitive historical material before including it again
  3. Reset or partition conversation state by authorized tenant context
  4. Budget prompt tokens together with the maximum output allowance
  5. Use explicit conversation state to identify the current answer being revised

Explanation

Correct Answer

B:

History management should prevent repeated exposure of secrets that the next inference request does not need.

Incorrect Answers

A:

Bounded recent context preserves conversational coherence without linearly increasing inference cost with session length; the relevant decision is redacting sensitive historical material before including it again, not the separate action described here.

C:

Old dialogue and memory must not bleed across access scopes even when the same person initiates both sessions; the needed design choice concerns redacting sensitive historical material before including it again instead.

D:

A model context limit applies to total input and generated output; using all space on source text leaves no room for the answer; the scenario instead depends on redacting sensitive historical material before including it again.

E:

Task state prevents an ambiguous follow-up from operating on a much earlier response simply because it remains in the transcript; the requested solution requires redacting sensitive historical material before including it again rather than this different mechanism.

Question 245

An assistant handles a follow-up phrase such as 'make it shorter' after several topic changes. What is the most suitable next implementation decision?

  1. Reset or partition conversation state by authorized tenant context
  2. Keep authoritative source excerpts separate from lossy conversation summaries
  3. Redact sensitive historical material before including it again
  4. Use explicit conversation state to identify the current answer being revised

Explanation

Correct Answer

D:

Task state prevents an ambiguous follow-up from operating on a much earlier response simply because it remains in the transcript.

Incorrect Answers

A:

Old dialogue and memory must not bleed across access scopes even when the same person initiates both sessions; that mechanism does not itself establish using explicit conversation state to identify the current answer being revised.

B:

Summaries can omit legally important wording; retrieval should rehydrate the precise primary evidence when needed; the relevant decision is using explicit conversation state to identify the current answer being revised, not the separate action described here.

C:

History management should prevent repeated exposure of secrets that the next inference request does not need; that would not ensure using explicit conversation state to identify the current answer being revised for this workload.

Question 246

An agent must retrieve a long compliance clause exactly, even after summarizing earlier turns. Which configuration or component should be selected?

  1. Keep authoritative source excerpts separate from lossy conversation summaries
  2. Reset or partition conversation state by authorized tenant context
  3. Use explicit conversation state to identify the current answer being revised
  4. Redact sensitive historical material before including it again
  5. Apply a token-based sliding window with retained memory summaries

Explanation

Correct Answer

A:

Summaries can omit legally important wording; retrieval should rehydrate the precise primary evidence when needed.

Incorrect Answers

B:

Old dialogue and memory must not bleed across access scopes even when the same person initiates both sessions; that mechanism does not itself establish retrieving a long compliance clause exactly, even after summarizing earlier turns.

C:

Task state prevents an ambiguous follow-up from operating on a much earlier response simply because it remains in the transcript; the relevant decision is retrieving a long compliance clause exactly, even after summarizing earlier turns, not the separate action described here.

D:

History management should prevent repeated exposure of secrets that the next inference request does not need; that would not ensure retrieving a long compliance clause exactly, even after summarizing earlier turns for this workload.

E:

Bounded recent context preserves conversational coherence without linearly increasing inference cost with session length; the needed design choice concerns retrieving a long compliance clause exactly, even after summarizing earlier turns instead.

Question 247

A chat application cannot send all historic turns because of strict response latency targets. Which design choice is most appropriate?

  1. Budget prompt tokens together with the maximum output allowance
  2. Keep authoritative source excerpts separate from lossy conversation summaries
  3. Redact sensitive historical material before including it again
  4. Compact old turns while retaining current constraints and corrected facts
  5. Apply a token-based sliding window with retained memory summaries

Explanation

Correct Answer

E:

Bounded recent context preserves conversational coherence without linearly increasing inference cost with session length.

Incorrect Answers

A:

A model context limit applies to total input and generated output; using all space on source text leaves no room for the answer; on its own this leaves applying a token-based sliding window with retained memory summaries unaddressed.

B:

Summaries can omit legally important wording; retrieval should rehydrate the precise primary evidence when needed; meeting the stated constraint still involves applying a token-based sliding window with retained memory summaries.

C:

History management should prevent repeated exposure of secrets that the next inference request does not need; that mechanism does not itself establish applying a token-based sliding window with retained memory summaries.

D:

State summarization reduces context load and should prioritize the latest authoritative user requirements; the relevant decision is applying a token-based sliding window with retained memory summaries, not the separate action described here.

Question 248

A user switches from one tenant's support request to another under the same login. Which design choice is most appropriate?

  1. Reset or partition conversation state by authorized tenant context
  2. Keep authoritative source excerpts separate from lossy conversation summaries
  3. Use explicit conversation state to identify the current answer being revised
  4. Budget prompt tokens together with the maximum output allowance

Explanation

Correct Answer

A:

Old dialogue and memory must not bleed across access scopes even when the same person initiates both sessions.

Incorrect Answers

B:

Summaries can omit legally important wording; retrieval should rehydrate the precise primary evidence when needed; on its own this leaves reseting or partition conversation state by authorized tenant context unaddressed.

C:

Task state prevents an ambiguous follow-up from operating on a much earlier response simply because it remains in the transcript; meeting the stated constraint still involves reseting or partition conversation state by authorized tenant context.

D:

A model context limit applies to total input and generated output; using all space on source text leaves no room for the answer; that mechanism does not itself establish reseting or partition conversation state by authorized tenant context.

Question 249

A compliance classifier returns inconsistent category text for identical short inputs. What is the most suitable next implementation decision?

  1. Set an appropriate maximum output-token budget and concise response instructions
  2. Experiment with higher supported sampling diversity within policy limits
  3. Reduce sampling randomness and constrain output to a category enum
  4. Require a small output vocabulary and validate the returned label

Explanation

Correct Answer

C:

Low-variance generation and restricted labels improve repeatability, though downstream correctness testing is still essential.

Incorrect Answers

A:

Output limits bound generation length, while explicit completion requirements guard against truncating essential legal qualifications; it addresses a neighboring concern, while the task tests reducing sampling randomness and constrain output to a category enum.

B:

Increasing diversity can surface alternatives, but quality and safety must be reviewed rather than treating novelty as correctness; it cannot substitute for reducing sampling randomness and constrain output to a category enum under these conditions.

D:

Constrained choices address the interface directly, rather than relying solely on a low temperature to force exact wording; meeting the stated constraint still involves reducing sampling randomness and constrain output to a category enum.

Question 250

A creative marketing task produces repetitive slogans with little variation. Which action directly produces the required outcome?

  1. Experiment with higher supported sampling diversity within policy limits
  2. Instruct it to abstain without supporting evidence and verify groundedness
  3. Put task-critical instructions and high-value evidence in deliberate prompt positions
  4. Use only generation parameters supported by the target model and API
  5. Evaluate candidate prompts across a diverse held-out dataset

Explanation

Correct Answer

A:

Increasing diversity can surface alternatives, but quality and safety must be reviewed rather than treating novelty as correctness.

Incorrect Answers

B:

Abstention rules reduce unsupported certainty, but retrieval and evaluation must confirm the model follows them; it addresses a neighboring concern, while the task tests experimenting with higher supported sampling diversity within policy limits.

C:

Context order and selection influence attention; rearranging the prompt can improve performance without changing the model; it cannot substitute for experimenting with higher supported sampling diversity within policy limits under these conditions.

D:

Sampling controls differ by model family and endpoint; unsupported knobs should not be assumed to transfer unchanged; on its own this leaves experimenting with higher supported sampling diversity within policy limits unaddressed.

E:

Single-example optimization overfits the example; representative tests measure whether improvements generalize across tasks; meeting the stated constraint still involves experimenting with higher supported sampling diversity within policy limits.

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