Developing AI Apps and Agents on Azure · 25% of the exam

Build AI agents: free practice questions

5 sample questions from our 63-question bank for this domain — answers and explanations included. These are the same scenario-based style as the real Microsoft exam.

1. An Azure AI Foundry agent is used by a financial firm to generate trade summaries. A compliance requirement states that every agent response visible to end users must first be reviewed and approved by a compliance officer. Which mechanism in Azure AI Foundry Agent Service should you use to implement this requirement?

  • A. Set the Run's `max_completion_tokens` to zero until approval is received, then reset it
  • B. Configure a required_action of type `submit_tool_outputs` and treat compliance review as a manual tool output submission step
  • C. Poll the Run status for `requires_action`, surface the pending output to the compliance officer, and only continue the Run after the officer submits approval via the submit tool outputs endpoint✓ Correct
  • D. Deploy a second agent whose sole role is to intercept and hold all messages on the Thread until approved
Explanation

When an agent Run reaches `requires_action` status (typically due to a tool call that needs external input), execution is paused and the caller must submit tool outputs to resume. By modeling the compliance approval as a tool call whose output requires human review, you can pause the Run at that point, surface the pending action to the compliance officer, and only resume by calling the submit tool outputs API after approval — implementing a true human-in-the-loop gate. Setting `max_completion_tokens` to zero does not pause the Run in a reviewable state; it would cause the Run to fail or produce empty output. Treating a submit_tool_outputs action as a manual step is close but option C specifically describes the correct full flow: polling for `requires_action` then submitting approval — option B is incomplete because it omits polling and the approval gate logic. A second interceptor agent adds complexity, has no native pause mechanism, and does not guarantee the primary Run is actually paused.

2. An enterprise AI team wants to monitor the internal reasoning steps, tool calls, and token usage of all agents running in Azure AI Foundry. They need to route this telemetry to their existing Azure Monitor workspace for centralized analysis. Which observability approach should they implement?

  • A. Enable diagnostic logging on the Azure AI Foundry project and configure a diagnostic setting to stream logs and metrics to a Log Analytics workspace✓ Correct
  • B. Instrument each agent with a custom logging plugin in Semantic Kernel that writes Run steps to an Azure Blob Storage container
  • C. Query the Foundry Agent Service REST API on a polling schedule to retrieve Run step details and manually export them to Azure Monitor
  • D. Use Azure Application Insights standalone, configured with a manual TraceWriter injected into the agent's system prompt
Explanation

Enabling diagnostic logging on the Azure AI Foundry project with a diagnostic setting pointing to a Log Analytics workspace is correct. Azure AI Foundry integrates with Azure Monitor through Azure Diagnostics settings, allowing teams to stream agent telemetry—including Run traces, tool call details, and token metrics—directly into Log Analytics for querying with KQL and building dashboards in Azure Monitor. Instrumenting a custom Semantic Kernel logging plugin to Blob Storage is a partial, non-standard approach that bypasses the platform's native observability integration and requires custom parsing. Polling the REST API on a schedule is fragile, introduces latency, and is not a scalable observability strategy for production workloads. Injecting a TraceWriter into the system prompt is not a real pattern—system prompts are natural language instructions to the model, not configuration for telemetry infrastructure.

3. An Azure AI Foundry agent is configured with a custom function tool named `check_inventory`. During a Run, the model decides to call this tool. A developer observes that the Run enters a status of `requires_action`. What must the developer's application do next to allow the Run to continue?

  • A. Delete the current Run and create a new one with the tool result included in the initial message
  • B. Add the tool output to the Thread as a new user message and then poll the Run status again
  • C. Submit the tool output using the submit_tool_outputs endpoint, referencing the tool call ID✓ Correct
  • D. Update the Agent definition to include the function result and then resume the Run
Explanation

Submitting tool outputs via the submit_tool_outputs endpoint is correct. When a Run reaches `requires_action` status, the application must call the submit tool outputs API, providing the tool call ID returned by the model and the result of executing the function. This is the designed handshake that allows the Run to proceed. Deleting and recreating the Run is incorrect because that would lose conversation context and is not the intended workflow. Adding the tool output as a new user message is incorrect; that would corrupt the conversation structure — tool outputs must be submitted through the dedicated tool output mechanism. Updating the Agent definition is incorrect; the Agent definition is for static configuration such as instructions and available tools, not for passing runtime function results.

4. Which statement MOST accurately describes the purpose of the `tool_resources` parameter when creating an Azure AI Foundry agent?

  • A. It specifies the Azure resource IDs of external services (such as Azure SQL or Cosmos DB) that the agent is permitted to connect to during a Run
  • B. It associates pre-created resources such as vector stores (for File Search) or code interpreter file IDs with specific tools enabled on the agent✓ Correct
  • C. It defines the maximum compute resources (CPU and memory) allocated to Code Interpreter sandboxes during a Run
  • D. It lists the managed identity permissions required for the agent to call custom function tools on behalf of the user
Explanation

The `tool_resources` parameter in the Foundry Agent Service create/update agent API is used to attach resource objects — specifically vector store IDs for the File Search tool and file IDs for the Code Interpreter tool — to the agent. This tells the service which pre-created indexes or files the tools should operate on. It does not specify Azure service resource IDs for connectivity (that is handled via connections in the project). It does not control compute allocation for Code Interpreter sandboxes (this is managed by the service). It does not define managed identity permissions for custom functions (those are governed by Azure RBAC and the function endpoint's own authorization).

5. You are configuring an Azure AI Foundry agent to answer questions about a 500-page internal policy document. Users need to ask free-form questions and receive cited answers. Which tool integration should you enable on the agent?

  • A. Code Interpreter, to parse the PDF and extract structured data
  • B. File Search, to perform vector-based retrieval over the uploaded document✓ Correct
  • C. A custom function tool, to call an external REST API that hosts the document
  • D. An OpenAPI tool, to expose the document as a queryable schema endpoint
Explanation

File Search is the correct choice. It enables the agent to perform semantic/vector-based retrieval over uploaded files (including PDFs), returning grounded, cited answers to free-form questions without manual chunking. Code Interpreter is designed for executing code and analyzing structured data—it is not optimized for semantic search over large prose documents. A custom function tool would require building and maintaining a separate retrieval service, adding unnecessary complexity. An OpenAPI tool integrates with external HTTP APIs using an OpenAPI schema; it does not provide built-in document retrieval semantics.

58 more questions in this domain

Practice the full bank with instant grading, flashcards, and a timed mock exam.

Start practicing free
Build AI agents — Free Developing AI Apps and Agents on Azure Practice Questions | DataCertPrep — Certification Prep