Question 60
A retail app offers offline product-category suggestions on low-memory handheld scanners. Its model must run locally with no network connectivity, meet a measured accuracy floor, and respond in under 80 milliseconds. A team proposes using its largest cloud-hosted generative model merely because it scores highest on a general benchmark. What choice should drive deployment?
- Prefer a compact locally deployable model validated against the category dataset, memory ceiling, and latency requirement.
- Select a distilled cloud language model because its billed token cost is lower, then access it through a network endpoint from the scanners despite the required fully offline operation.
- Cache vector representations of product names locally, but continue calling a remote embedding service to encode each new offline query at classification time.
- Choose a hosted, high-capacity language model with short completions as a proxy for a device-resident runtime, without checking offline availability or memory footprint.
Explanation
Correct Answer
A:Choose a small model or classifier that can actually run on the handheld device within memory and latency budgets, and test it on representative product categories rather than relying on broad benchmark scores. Offline operation rules out remote inference as the only path. Evaluate confusion among similar product groups, quantized precision tradeoffs, and on-device update handling before deployment. A more capable large model may be useful for occasional server-side enrichment when connectivity exists, but it cannot satisfy the stated fully offline guarantee. The selection criteria are measured task fitness, resource consumption, and response reliability together.
Incorrect Answers
B:Distilled hosted models can reduce inference expense, but a cloud endpoint is unavailable when a handheld scanner has no network connection. Token price also does not tell whether the client can run the model within its memory and response-time limits. The decision here is about on-device execution and known classification quality. Test a compact locally deployable model on the product categories and the scanner's actual compute constraints.
C:A local vector cache can speed retrieval of known records, which makes this design seem economical. Yet an offline scanner cannot request a new embedding from a remote service after it loses connectivity. It also needs a validated category assignment rather than merely its nearest catalog neighbor. A self-contained local model or fully local embedding and classifier pipeline must meet the memory budget and measured label accuracy without any cloud dependency.
D:A hosted model may achieve good classification accuracy and short outputs can reduce transmission and generation cost. Neither feature proves the model can execute on an intermittently disconnected phone with the stated memory budget. The tested decision concerns local resource limits and offline operation, not merely response length. Compare compact deployable models and runtime requirements against measured device memory and latency instead of substituting a cloud model that depends on network access.
Question 61
A medical-information assistant passes a relevance evaluator because every reply addresses the patient's question. A separate red-team set reveals occasional disallowed self-treatment instructions. The product owner proposes declaring the model safe based on the relevance score alone. Which change best isolates and measures the remaining risk?
- Add a groundedness check against retrieved medical sources while continuing to treat that metric as a complete substitute for content-safety policy evaluation.
- Increase the strictness of the relevance rubric so unsafe medical replies receive a lower score only when they fail to answer the patient’s question.
- Run dedicated content-safety evaluations on representative unsafe prompts and inspect policy violations independently of relevance.
- Expand retrieval to more medical passages and assume that additional grounding evidence eliminates unsafe self-treatment recommendations without a separate safety gate.
Explanation
Correct Answer
C:Evaluate safety as a separate property using relevant Microsoft Foundry safety evaluators or content-safety classification workflows on adversarial and ordinary medical questions. Label the kinds of prohibited advice, compare the outputs to an explicit policy, record severity and failure rates, and inspect false positives where harmless education was blocked. Relevance measures whether the assistant addresses the user's request; it does not certify the content is permissible. Use identified violations to adjust grounding, system constraints, moderation controls and escalation paths, then retest on held-out cases. A model-assisted judge is a signal, not a physician or independent medical certification.
Incorrect Answers
A:Groundedness can detect claims unsupported by retrieved evidence and is important for medical-information accuracy. A statement can still be sourced yet disallowed by the product’s self-treatment safety policy, or an answer may include harmful instructions in an otherwise relevant response. The red-team findings show a specific behavioral safety problem. Evaluate those policy violations with dedicated labeled unsafe cases, separately from answer relevance or citation support, and investigate failures before release.
B:A more selective relevance evaluator may identify evasive or off-topic responses and can improve general answer quality. It does not test whether a directly relevant answer contains disallowed treatment instructions. The known examples were already relevant; their problem was harmful content. The team must measure safety categories and intervention outcomes on representative red-team prompts rather than attempt to encode a separate risk dimension solely into relevance scoring.
D:Retrieval can improve factual support and may help a model cite appropriate medical references. More documents do not guarantee compliance with restrictions on providing disallowed self-treatment instructions, especially if the model misuses or overgeneralizes the material. The product owner needs a separate evaluation that detects the unsafe behavior observed in the red-team set. Grounding and policy compliance are complementary requirements, not interchangeable scores.
Question 62
A Python data-science service generates only embeddings and sends vectors into an existing Azure AI Search index. It does not need chat completions or agent orchestration. Developers want to use the supported Foundry model inference endpoint but are considering constructing a project Agent SDK client for every vector request. What is the simplest compatible design?
- Create a stateful agent conversation for every embedding request and route each input through the general chat-completions interface rather than the available embeddings operation.
- Invoke a generic chat-completions deployment with a strict JSON schema for floating-point arrays, then treat those generated numbers as if they came from the production embedding model.
- Use an existing index’s stored document vectors as substitutes for new input embeddings whenever source text resembles an indexed record, without invoking the selected embedding model.
- Use a supported embeddings deployment and compatible model-inference SDK/client endpoint directly, checking model and vector dimensions.
Explanation
Correct Answer
D:Select a deployed embedding model that the chosen Foundry or OpenAI-compatible inference endpoint supports, call its embeddings operation directly from Python, and send those vectors to the correctly dimensioned Azure AI Search field. Validate authentication, endpoint family, model deployment name and the model's output dimension rather than confusing project APIs with inference routes. This keeps the pipeline narrow and efficient, and it avoids agent orchestration that provides no value for a single stateless transformation. Use the same compatible embedding model for index content and query vectors, and version migrations explicitly if the model changes.
Incorrect Answers
A:A project agent can orchestrate model calls when a workflow needs tools, context or multiple reasoning steps. The data-science service only needs vector representations of supplied text for an existing search index. Maintaining thousands of agent sessions adds state and overhead without changing the required embedding output. Use the documented model inference or embeddings SDK interface with the correct deployment and vector dimensions, then validate the produced vectors before indexing them.
B:A JSON schema can constrain output syntax but cannot turn numbers sampled by a chat model into a trained semantic embedding space. Vector similarity requires document and query vectors produced by a compatible embedding model with consistent dimensions and normalization. An array that merely has 1,536 valid floats can be useless for retrieval. Call the supported embedding endpoint directly and verify that the index field dimensions match the deployment's output.
C:Reusing cached embeddings can legitimately save work when the exact same text, preprocessing and model version are known to match. A nearest existing vector is not the correct representation of arbitrary new input, and copying it would collapse distinct documents into misleading coordinates. The service needs an embeddings inference path for each uncached text item and consistent model metadata. Approximate text similarity is not sufficient proof that two input vectors should be identical.
Question 63
An equipment-support agent searches internal manuals using only vector similarity. A technician asks for replacement part ZX-4097, but the system returns a semantically related guide for ZX-4079 because both describe the same pump assembly. The part identifier must match exactly. What retrieval improvement should be applied?
- Add a lexical or exact-field retrieval path for part numbers alongside vector search, then merge or filter results appropriately.
- Index the part-number string as an additional searchable semantic field and boost its vector similarity weight, but do not require exact equality for the requested ZX-4097 identifier.
- Normalize punctuation and case in product codes before embedding them, then rely solely on vector nearest-neighbor similarity without checking exact identifier equality.
- Increase the vector candidate count and use semantic reranking over generic pump descriptions, without applying an exact match or filter on the requested part number.
Explanation
Correct Answer
A:Exact product identifiers are better served by an explicit searchable text or filterable key field than by embedding similarity alone. Configure Azure AI Search keyword/BM25 or exact code filtering for ZX-4097, combine it with vector retrieval when semantic context is useful, and confirm the product code in the returned record before grounding the answer. Hybrid retrieval uses lexical and vector signals and can merge results with reciprocal rank fusion, but required identifier equality should be enforced as a filter or validation where necessary. This preserves semantic discovery without sacrificing the mandatory part-number match.
Incorrect Answers
B:Giving part numbers more weight can improve approximate retrieval rankings and may help when technicians describe a family of components. It does not guarantee that ZX-4097 outranks ZX-4079, because their strings and associated product descriptions remain very similar. This case explicitly requires an exact replacement identifier, not simply the nearest pump-related document. The tool needs lexical or filterable identity matching to avoid substituting a technically different part despite strong semantic similarity.
C:Normalization can improve matching when users vary capitalization or hyphenation and is an appropriate preprocessing choice for catalog identifiers. It does not make semantic vector distance an exact test of ZX-4097 versus ZX-4079. Those codes are similar but represent different parts. The tool needs a lexical or filterable identifier path to enforce equality and can combine it with vector search for descriptive queries, rather than treating cleaned vectors as an exact key lookup.
D:Larger candidate sets and semantic reranking can improve retrieval of conceptually related maintenance documents, and they may surface more pump guides. The technician’s requirement is an exact part identifier, however. A highly ranked guide for ZX-4079 can be semantically indistinguishable from ZX-4097 while still being the wrong replacement. Combine exact lexical or filterable code matching with semantic evidence so similarity cannot override the specified identifier.
Question 64
A municipal website must provide alternative text for icons and infographics used by screen readers. Its image-description model produces long decorative commentary that omits what a 'Submit permit' icon actually does. The website team wants short and useful accessibility text. What should guide generation and review?
- Output every detected color and pixel position even when the icon's action is obvious from the adjacent text.
- Describe the image's functional purpose in concise context-appropriate alt text and verify it with accessibility review.
- Use the model's short literal description of the icon's appearance, such as 'blue arrow inside box,' even where the control's purpose is submitting a permit.
- Use the model’s full descriptive caption as alt text and trim it only by character count, without testing whether the resulting words convey the icon’s action.
Explanation
Correct Answer
B:For a functional 'Submit permit' icon, alternative text should communicate the control's action, avoiding verbose speculation about decorative colors or shapes. Generate a concise candidate from the visual and surrounding interface context, then review it with assistive-technology expectations and the actual control label. Where adjacent visible text already supplies the same accessible name, avoid duplicate announcements and use the appropriate markup. AI descriptions can miss task context, so human accessibility validation remains important. This approach improves actual navigation and comprehension instead of maximizing description length.
Incorrect Answers
A:Listing colors and coordinates can create noise for a screen-reader user while failing to convey the icon's purpose. Accessibility text depends on context: a functional permit-submission control needs its action communicated, whereas a purely decorative border may need an empty alternative. A complete pixel inventory is not the requirement. The team should prioritize the workflow meaning and ensure the result is understandable without sight.
C:A literal visual description can accurately identify a shape and is a reasonable starting point for alt text. However, screen-reader users need to understand the interactive control's function, not merely its colors or drawing primitives. The adjacent form makes 'Submit permit application' more useful than an isolated icon description. Accessibility acceptance must consider surrounding text and behavior, with human review where imagery has operational meaning.
D:Limiting caption length can improve readability, but it does not guarantee that a decorative description communicates what an interactive Submit permit control does. A model might discuss color and shape before naming the action, so simple truncation could drop the essential information. The design should derive concise task-relevant text from the icon’s function and test it with screen-reader review rather than equating brevity with accessibility.
Question 65
A legal-document classifier extracts two mentions of 'Kim' from an internal investigation: one is a witness who signed a statement, and the other is a company attorney quoted in an email. The service labels every 'Kim' as the attorney because the surname matches a directory entry. What analysis step best corrects the entity attribution?
- Run document-level entity linking to the legal directory once, then use the highest-scoring directory entry for every matching surname without resolving each witness and attorney mention separately.
- Use the directory's first matching entry for every identical surname across all pages.
- Resolve mentions using surrounding spans, roles, document context, and other identifying evidence before assigning an entity label.
- Use a document-wide entity-linking directory match and assign every 'Kim' mention to the highest-confidence attorney record, without separating each reference by role.
Explanation
Correct Answer
C:Use surrounding sentence spans, job titles, signature blocks, dates, email identities and document provenance to link each 'Kim' mention to the correct candidate. A contextual named-entity or coreference workflow can propose links, but the application should validate them and retain an unresolved designation when the evidence is insufficient. The witness signature and the attorney email are discriminating facts; exact surname matching is not. Preserve the character offsets and source passages so reviewers can investigate a mistaken attribution instead of trusting an opaque label. This yields useful extraction without silently merging two distinct people.
Incorrect Answers
A:Directory linking can help identify a person, but a document-wide highest score is insufficient when two people share the same surname and appear in distinct legal roles. The two occurrences of Kim need local contextual evidence such as title, affiliation, signature block and nearby entity mentions. Assigning both to the attorney creates a material attribution error even though the directory record itself is genuine. Resolve each span independently and retain evidence.
B:Directory lookup can provide candidate identities, but identical surnames do not establish that every mention refers to one individual. The witness and attorney have different roles and appear in separate document contexts. Assigning the first match systematically misattributes statements and could corrupt a legal case summary. Entity assignment needs mention-specific evidence and an uncertain state when neither candidate is sufficiently supported.
D:Entity linking can exploit reference directories and is useful when names recur across documents. But two different people share this surname in the current investigation, and a document-wide default assignment can merge the witness and attorney. The system needs local spans, signed-statement context, organizational role and other identifiers for each mention. A high confidence directory match is not evidence that all identical surnames denote one person.
Question 66
A broadcaster stores thousands of training videos. Editors want to ask, 'Find the moment the mechanic connects the blue hose' and jump directly to the relevant portion instead of replaying entire hour-long recordings. A simple filename index returns the right video but no location within it. What representation best supports that task?
- Index only the original video title and one overall genre tag for each file.
- Generate one detailed semantic description for each entire training video and index it under the video ID, without creating timecoded segments or key-frame references for particular actions.
- Use scene or shot analysis to retain timestamped segments, relevant key frames and searchable descriptions tied to source video IDs.
- Index one scene summary per recording without storing start and end times, then return the whole video whenever the summary matches a search query.
Explanation
Correct Answer
C:Analyze footage into meaningful shots or segments, extract representative key frames and associated descriptions, and attach start/end timestamps plus stable source-video identifiers. Index those time-addressable records so a query can retrieve the moment of the hose connection and open a player at the corresponding offset. Preserve limitations from frame sampling and verify the cited segment visually, especially if a quick action spans frames. Content Understanding video capabilities can supply segment-aware information where supported; the production API version and processing limits must be checked. This fulfills both semantic findability and navigable temporal provenance.
Incorrect Answers
A:A title and genre can identify a broad recording, but they cannot locate the specific hose connection inside an hour of footage. Editors need segment-level coordinates, not merely a correct file name. If the index stores only file-level metadata, it may return a video without providing any route to the decisive moment. Additional temporal evidence and searchable descriptions must be retained during ingestion.
B:A rich whole-video description can improve coarse retrieval, letting editors locate the right recording without replaying every title. It still cannot tell them at which minute and second the mechanic connects the blue hose. The use case explicitly requires a jump to the moment inside an hour-long asset. Extract and index timestamped scenes, shots and key frames with searchable descriptions and source links instead of treating video-level topical relevance as precise temporal grounding.
D:Per-video summaries can capture actions and are a meaningful improvement over filename-only indexing, so this is a plausible retrieval design. However, an editor asks to jump to the moment the blue hose is connected inside an hour-long file. A summary without time offsets cannot locate that moment. Segment-level source IDs, timestamps and relevant visual descriptions must survive indexing and retrieval.
Question 67
A Python Foundry application receives a 'deployment not found' result when requesting an approved model. The model appears in one team's project but the caller authenticates against another Foundry project and has only Reader access. Quotas and service status are healthy. What should the engineer verify first?
- Grant the caller a Reader role on the Foundry subscription and retry the approved model’s catalog name through the current project endpoint, without checking which project actually contains the deployed model or whether runtime inference permission exists.
- Confirm the deployment is accessible in the intended project, use its exact deployment identifier and correct endpoint, and verify the caller's effective permissions.
- Increase the caller’s Foundry model-reader role within the current project, without verifying that the approved deployment is actually registered in that project or that the URL addresses it.
- Grant the application identity a broad management-plane Contributor role over both Foundry projects and retry the same default endpoint without checking the approved deployment's project membership or data-plane access.
Explanation
Correct Answer
B:Confirm that the Python client uses the proper Foundry project or inference endpoint for the deployed model, and that it supplies the actual deployment name visible to that project. Check assignment of the caller's identity and required inference permissions, distinguishing resource discovery from invoking the data plane. Project-level separation can make a deployment visible to one team but not another. Log the request's project, endpoint family and authorization failure without exposing credentials. Fixing those concrete binding and access differences addresses 'deployment not found' while preserving tenant isolation and least privilege.
Incorrect Answers
A:A subscription-level Reader role can confirm resource visibility and may help with inventory troubleshooting, but it does not necessarily authorize project data-plane model invocation. A catalog label also need not match the deployed model identifier, and the problem states that the model is registered under another team’s project. The application must target the actual permitted project and deployment and hold the required effective runtime role. Broad read visibility does not repair those routing and permission distinctions.
C:A project-scoped identity grant can be necessary for invoking model deployments, and permission failures should not be ignored. The stated error is deployment not found and the model is visible in a different team’s project. Broader grants in the wrong project cannot create a missing deployment or correct its route. The application must first identify the intended project endpoint and actual deployed identifier, then validate effective rights for that exact target.
D:A broad Contributor grant can help administer Azure resources, but it is excessive for a single model-inference operation and does not guarantee the intended project data-plane permissions. The error is deployment-not-found while the model is visible in another team's project. The caller must use the correct project endpoint and exact deployed name, then verify whether its identity can invoke that deployment. Escalating management privileges on both projects without resolving resource identity can leave the request pointed at the same nonexistent target and increase risk.
Question 68
A small help center contains 12,000 independent one-question/one-answer FAQ entries. Users search for an exact warranty question and expect to see the matched answer with its own source URL. An indexer currently concatenates 150 unrelated FAQs into a giant document. What indexing design gives more reliable retrieval and attribution?
- Index each independent FAQ answer as its own searchable record with question text, answer text and stable source metadata.
- Keep the 150-FAQ grouped documents but add a section identifier to each paragraph, relying on one group-level search hit to return the precise matching answer and its independent URL.
- Create one embedding per 150-FAQ concatenation and return the whole block with a single source URL when any subquestion matches.
- Create one searchable record per FAQ question but discard its original answer URL, then synthesize a generic help-center link for whichever text matches best.
Explanation
Correct Answer
A:An independent FAQ entry is a natural retrieval unit: store its question, answer, identifier and source URL together so keyword or vector matches return the precise issue and its supported response. This avoids pulling unrelated questions into a single context chunk and gives the application a clear citation target. Validate updates and deletions so stale warranty policies are not returned. The design can still use hybrid retrieval, but the foundational change is choosing a coherent record boundary that aligns with what users ask, not an arbitrary mass concatenation.
Incorrect Answers
B:Section IDs are useful metadata and can help a downstream application find a sub-answer inside a larger document. The search index is still ranking one combined record containing 150 unrelated FAQ questions, so a single embedding or result score is too coarse for exact warranty queries. Group-level citations also obscure which answer belongs to which source URL. Index independent question/answer pairs with stable identifiers, then rank and cite the correct individual entry.
C:Embedding blocks of related FAQs can reduce indexing overhead and retrieve broad topics. In this case the entries are independent, and a vector for a large mixed block blurs the exact question and its own answer. The app also promises a stable source link per FAQ. Keep each Q/A unit addressable with its specific metadata; retrieving a giant aggregate makes precise matching and citation unreliable.
D:Separating FAQ entries is a substantial improvement over concatenating 150 unrelated answers because each question can be ranked individually. The requirement additionally calls for the matching answer's own source URL. Generating a generic portal link does not meet that attribution contract and may direct users to a different warranty policy. Preserve stable per-entry source identity and answer text throughout ingestion and retrieval, not merely the more granular document boundaries.
Question 69
A municipal benefits agent must answer questions from a restricted policy library and quote the effective policy section. Its current agent is fluent but answers from general model memory, frequently citing sections that do not exist. Which agent capability and instruction should be added?
- Enable a citation-format schema that requires a sectionId string for every answer, but allow the model to populate that field without binding it to actual authorized retrieval results.
- Use semantic reranking over the general model's own proposed policy sections without retrieving the municipality's authoritative policy records.
- Search the municipality’s public website for a similarly named benefits policy and use the first result without checking that it matches the restricted, currently effective internal library version.
- Attach an authorized policy retrieval tool and require answers to cite actually returned passages or acknowledge missing evidence.
Explanation
Correct Answer
D:Connect an authorized search or file-retrieval tool to the city's controlled policy index and require the agent to ground each eligibility statement in returned passages with document IDs, section offsets and effective dates. When the tool returns no relevant approved clause, have the agent state that limitation or escalate rather than guess. Preserve per-user access filters and audit query/result citations so the model cannot quote a clause the caller is not allowed to read. This adds both the missing evidence path and a behavioral constraint on unsupported claims, while keeping final interpretation distinguishable from official policy text.
Incorrect Answers
A:A required citation field can improve output consistency, yet structural validation does not prove that the cited policy section exists. The municipality has a restricted policy library that can be retrieved, and employee answers must quote a real effective passage. A model could generate a plausible identifier that satisfies the schema while pointing nowhere. The agent must connect a permitted retrieval tool and validate each citation against returned document identifiers and passages.
B:Semantic reranking can improve ordering among candidate passages, making it superficially relevant to evidence-grounded answers. But if the candidates are model-generated guesses rather than indexed municipal source material, reranking only sorts invented references. It cannot establish that a section number exists or is effective. The agent should retrieve real authorized policy text first, validate its source and cite only passages actually returned by that tool.
C:Public web search can provide useful background information, so the proposed path initially sounds reasonable. In this case the authoritative policy is an internal restricted library and may contain approval or effective-date changes absent from public pages. A highly ranked public result can be obsolete or refer to a different program. Retrieve with the user's permissions from the designated internal source, then cite a verified passage or state that evidence is missing.
Question 70
An order-management assistant should look up an order and, after authenticated employee approval, submit a change through an existing internal REST API. The API requires orderId, actionCode and approvedBy, and the service account has broad access to other routes that must remain unavailable to the model. How should the tool be exposed?
- Expose every internal REST operation through an untyped text tool and let the model guess which call to execute.
- Grant the language model direct administrator credentials and assume its system prompt enforces allowed routes.
- Register a narrowly scoped typed function for the permitted order operation, enforcing argument validation, caller authorization and approval before execution.
- Register a narrowly typed order-update function, but invoke it before the employee's approval state has been validated because the API returns a confirmation afterward.
Explanation
Correct Answer
C:Define a tool schema for the one supported order-change action, with explicit orderId, actionCode and approvedBy fields and controlled enum/range constraints. Require a trusted authenticated employee identity and a transaction-scoped approval token, then authorize the operation at the server and log its actual result. Prefer least-privilege connection credentials or identity passthrough where supported, prevent duplicated writes with an idempotency key, and return a typed success or failure. The model may propose the action, but it cannot bypass application validation or invoke unrelated routes. This is safe functional integration rather than uncontrolled tool access.
Incorrect Answers
A:An untyped tool covering the whole internal API would give the model unnecessary operations and no reliable argument contract. It might call an unrelated cancel or refund route while trying to update an order, and malformed arguments could be accepted silently. The company requires a particular approved change. Restrict the exposed tool to that operation and validate required fields instead of delegating route discovery to free-form prose.
B:Administrator credentials create an unnecessarily broad security boundary and are not neutralized by a system prompt. Retrieved documents or malformed instructions could still influence tool use, and prompt text cannot substitute for server-enforced route authorization. This employee approval policy belongs in the application and API layer. Use a restricted identity, allowed operation list and transaction approval verification rather than broad shared administrative secrets.
D:A typed schema prevents malformed orderId and actionCode fields, and a returned API confirmation can prove that a write occurred. Neither substitutes for policy approval before the change. This endpoint is consequential and its service account has broad permissions, so the application must enforce caller and approvedBy authorization before allowing execution. Post-write confirmation is an audit outcome, not a prerequisite gate.
Developing AI Apps and Agents on Azure (AI-103) Practice Tests