Microsoft certification · Exam AI-103

AI-103 Mock Exam

Developing AI Apps and Agents on Azure

Find out if you're ready for AI-103. Take the free timed mock exam and get your score in minutes, or study the free AI-103 questions below with answers and explanations.

20 questions · 40 minutes · free, no sign-up

Free AI-103 questions

1–10 of 28 free
Question 1 Choose 1
You need to recommend a solution to support the planned changes and technical requirements for Agent1 to use the product information stored in storage1. What should you include in the recommendation?
Show answerHide answer

Correct answer: A Azure Al Search

Explanation

Explanation:

This question evaluates how to enable an Azure AI agent to retrieve proprietary product data from Azure Storage for grounded responses. It focuses on knowledge integration and retrieval patterns in agentic solutions.

βœ… Correct Option:

A. Azure AI Search
Include Azure AI Search to index content from storage1. It supports hybrid/vector search, connects directly to Blob Storage as a data source, and integrates with Foundry agents via tools or knowledge bases. This enables efficient, relevant retrieval of product information for Agent1 in RAG or agent workflows.

❌ Incorrect options:

B. Azure Translator in Foundry Tools
This service translates text between languages. It offers no capabilities for indexing, searching, or retrieving data from storage.

C. Azure Document Intelligence in Foundry Tools
This tool extracts text and structure from documents during preprocessing. It does not handle search or agent retrieval of stored product data.

D. Grounding with Bing Search
This grounds agents with public web results. It cannot access private data in storage1 and is limited to external internet content.

πŸ”§ Reference:
β†’ Microsoft Learn - File search tool for agents
Confirms Azure AI Search with storage for agent knowledge retrieval.
Question 2
You need to ensure that Agent1Dev Team can access Agent1. The solution must meet the security and compliance requirements. How should you complete the Python code? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Show answerHide answer

Explanation



Explanation:

This question tests your understanding of authenticating with the Azure AI Foundry SDK and retrieving an existing agent. The solution must meet security and compliance requirements, which means using Microsoft Entra ID (formerly Azure AD) authentication. It also tests knowledge of the correct method to retrieve an agent by name from the AgentsOperations class.

βœ”οΈ Credential: DefaultAzureCredential()
DefaultAzureCredential is the recommended authentication method for Azure SDK clients as it supports Microsoft Entra ID, meeting security and compliance requirements. It attempts multiple credential sources (environment variables, Azure CLI, managed identity) automatically, making it suitable for development and production environments without hardcoding keys.

❌ Credential: AzureKeyCredential()
This uses an API key for authentication, which does not meet the security and compliance requirements for agent access as the question states Entra ID is needed. The Azure AI Projects SDK expects a TokenCredential type, making AzureKeyCredential incompatible with the AIProjectClient constructor.

❌ Credential: None
Passing None as the credential parameter will cause the SDK to fail to authenticate. The AIProjectClient requires a valid TokenCredential object such as DefaultAzureCredential to establish a connection to the Azure AI Foundry project endpoint.

❌ Credential: The dictionary/map syntax
The dictionary format shown in the second image is syntactically invalid for credential assignment. The credential parameter expects a single TokenCredential object directly, not a dictionary or map containing credential objects.

βœ”οΈ Agent retrieval method: get
The get method of the AgentsOperations class retrieves an existing agent by its name, which is exactly what the code needs to do with myAgent = "Agent1". It takes agent_name as a required parameter and returns AgentDetails containing the agent's properties.

❌ Agent retrieval method: get_version
The get_version method requires both agent_name and agent_version parameters to retrieve a specific version of an agent. Since the code does not specify a version number and the requirement is simply to access Agent1, this method is inappropriate for the scenario.

❌ Agent retrieval method: create_version
The create_version method is used to create a new agent or a new version of an existing agent, not to retrieve an existing one. Using this would either create a duplicate agent or fail if the agent already exists, which does not satisfy the requirement to access Agent1.

πŸ”§ Reference:
β†’ AgentsOperations.get method - Learn Microsoft: This reference confirms get retrieves the agent by name and get_version requires an additional version parameter.
Question 3 Choose 1
You have a Microsoft Foundry project that generates product marketing images from text prompts. After publishing several images, the legal team at your company identifies a competitor's logo on a sign in the background of an image. You need to remove only the logo, while preserving the rest of the image. What should you do?
Show answerHide answer

Correct answer: C Apply a mask-based inpainting edit to the part of the image that contains the logo.

Explanation

Explanation:

This question tests knowledge of image editing capabilities in Microsoft Foundry and generative AI workflows. The requirement is to remove a specific object from an already generated image while preserving all remaining content. This scenario requires targeted editing rather than regenerating or changing the entire image.

🟒 Correct Option:

C. Apply a mask-based inpainting edit to the part of the image that contains the logo.
Mask-based inpainting allows specific regions of an image to be selected and modified while leaving the rest unchanged. By masking only the area containing the competitor’s logo, the AI model regenerates that section without affecting surrounding elements. This approach preserves the overall composition, background, and image quality while removing the unwanted content.

πŸ”΄ Incorrect options:

A. Increase the prompt guidance strength.
Prompt guidance strength controls how strongly a generated image follows the original prompt. Increasing it may influence future image generation but does not selectively remove an existing logo from a published image.

B. Modify the original prompt to exclude brand names.
Updating the prompt may reduce the chance of brand-related content in future generations. However, it does not edit the already created image and cannot guarantee preservation of all existing visual elements.

D. Rerun the prompt by using a different random seed.
Changing the random seed generates a different image variation. The newly created image could change multiple elements, including layout and background details, making it unsuitable when only one specific object needs removal.

πŸ”§ Reference:
β†’ Microsoft Learn β€” Azure AI Foundry: Azure OpenAI image generation models
Confirms inpainting can edit selected areas while preserving the rest of the image.
Question 4
You have a Microsoft Foundry project that contains an internal Q&A agent.
Users report the following issues when they ask the agent questions:
β€’ An increase in the following response: β€œNo relevant information found”
β€’ Periodic HTTP 429 rate limit exceeded errors during peak hours
You need to identify whether each issue is caused by model unavailability, resource limits, or inference failures.
What should you do? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

Show answerHide answer

Explanation



Explanation:

This question tests the candidate's proficiency in configuring monitoring, logging, and troubleshooting frameworks for internal Q&A generative agents deployed within Microsoft Azure AI Foundry. It evaluates how to capture model-level performance data and request-level telemetry to diagnose inference failures, fallback behaviors, and rate-limiting blocks.

βœ… Correct Option:

Metrics to enable: Model Availability Rate and Provisioned Utilization
The Model Availability Rate and Provisioned Utilization metrics are essential to isolate resource limits and server availability anomalies. Model Availability Rate tracks internal server-side errors, while Provisioned Utilization explicitly monitors baseline capacities for Provisioned Throughput Units (PTU). When utilization hits or exceeds 100%, requests are actively throttled, producing the HTTP 429 errors encountered during peak load hours.

Diagnostic log to collect: trace
The trace diagnostic log category is used to track deep operational telemetry, chat contexts, and detailed execution blocks for Custom Question Answering (Q&A) agents. Collecting trace telemetry records the individual knowledge base lookups and threshold calculations, helping pinpoint why context generation fallback rules trigger the "No relevant information found" inference failures.

❌ Incorrect options:

Only Tokens Cache Match Rate
This option is incorrect because the Token Cache Match Rate solely reflects the percentage of incoming prompt tokens that successfully utilize existing context caches. While beneficial for fine-tuning prompt billing efficiency and reducing latency behaviors, it cannot capture server availability drops or diagnose HTTP 429 rate limits.

Only Total Requests filtered to status code 200
This option is incorrect because filtering metrics strictly to successful HTTP 200 statuses completely omits the HTTP 429 throttling errors. It provides zero visibility into failed operations, making it impossible to diagnose capacity overloads or resource saturation across peak production hours.

Time To Response and Total Tokens
This option is incorrect because Time To Response and Total Tokens measure transitional token counts and latency footprints. While helpful for basic performance monitoring, they lack the specific utilization profiles or error codes needed to distinguish infrastructure limits from functional backend model dropping behaviors.

AllMetrics
This option is incorrect under the Diagnostic Log dropdown because AllMetrics is a diagnostic platform category specifically designed for routing systemic multi-dimensional telemetry metrics into destination analytical data tables. It does not record the raw, request-level textual traces or agent pipeline telemetry needed for intent mapping analysis.

audit
This option is incorrect because the audit diagnostic log records administrative control plane actions, permission adjustments, policy compliance changes, and resource configuration alterations. It does not monitor data-plane chat executions or the run-time context filtering loops of the active AI model.

RequestResponse
This option is incorrect because while RequestResponse logs track basic API inbound metadata and HTTP status codes (such as HTTP 429 entries), it does not provide the deep execution paths or confidence telemetry that the specialized trace log delivers for diagnosing internal knowledge base fallbacks.

πŸ”§ Reference:
β†’ Microsoft Learn - Monitor Model Deployments in Microsoft Foundry Models confirms that Provisioned Utilization measures capacity thresholds where values $\ge$ 100% trigger HTTP 429 limits, while Model Availability Rate monitors service drop-offs.

β†’ Microsoft Learn - Enable diagnostic logging for Microsoft Foundry confirms that the Trace log category is required for deeper analytical workflows inside custom Q&A agent environments to troubleshoot inference fallbacks.
Question 5 Choose 1
You have a Microsoft Foundry project that contains an agent. The agent generates summaries from retrieved policy documents.
You need to improve response completeness. The solution must be implemented in the logic of the application code before responses are returned.
What should you do?
Show answerHide answer

Correct answer: B Add a reflection pass before the responses are returned.

Explanation

Explanation:

This question evaluates techniques to enhance the quality and completeness of agent-generated summaries from retrieved documents. It emphasizes implementing improvements directly in application code logic prior to final output.

βœ… Correct Option:

B. Add a reflection pass before the responses are returned.
Implement a reflection (or self-critique) step in the code where the agent reviews its initial summary against the retrieved policy documents. This pass checks for missing details, inaccuracies, or gaps, then refines the output. It directly improves completeness through iterative reasoning without changing core retrieval or model parameters.

❌ Incorrect options:

A. Decrease the value of the temperature parameter.
Lowering temperature makes responses more deterministic and focused. It reduces creativity but does not systematically ensure completeness of policy summaries.

C. Switch to Retrieval Augmented Generation (RAG).
The agent already uses retrieved documents. Switching to RAG addresses grounding but does not specifically target response completeness in post-generation logic.

D. Enable response streaming.
Streaming delivers output incrementally for better user experience. It has no impact on the final completeness or accuracy of the generated summaries.

πŸ”§ Reference:
β†’ Microsoft Learn - Study guide for Exam AI-103
Covers agentic patterns including multi-step reasoning and reflection for improved outputs.
Question 6
You have a Microsoft Foundry project that contains an agent used by the financial analysts at your company.
You need to optimize the agent workflow by providing additional data access and processing capabilities. The solution must meet the following requirements:
β€’ Ensure that the agent can perform calculations during conversations
β€’ Ensure that the agent can access up-to-date information from public websites.
β€’ Ensure that the agent can retrieve information from documents uploaded directly to the agent.
What should you use for each requirement? To answer, drag the appropriate tools to the correct requirements. Each tool may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.

Show answerHide answer

Explanation



Explanation:

This question tests your understanding of built-in tools in Microsoft Foundry Agent Service and how to match them to specific agent capabilities for data access and processing. It evaluates knowledge of grounding, computation, and document retrieval tools.

βœ… Correct Option:
Grounding with Bing Search
This tool enables the agent to query real-time public web data via Bing. It overcomes the model's knowledge cutoff by retrieving current information with citations and is the recommended method for web grounding in agents.

βœ… Correct Option:
Code interpreter
This tool allows the agent to write and execute Python code in a sandboxed environment. It is ideal for mathematical computations, data analysis, and dynamic calculations during ongoing conversations.

βœ… Correct Option:
File search
This tool uses vector search over uploaded files or documents. It enables the agent to retrieve relevant proprietary or user-uploaded content efficiently.

❌ Incorrect Option:
Computer use
This tool supports browser automation or GUI interactions. It is not suitable for calculations, web grounding, or direct document retrieval from uploads.

❌ Incorrect Option:
Microsoft Fabric
This connects to structured data sources or analytics workloads. It does not handle real-time web access, code execution, or vector-based search on uploaded documents.

πŸ”§ Reference:
β†’ Microsoft Learn - What are tools in Azure AI Foundry Agent Service – Confirms purposes of Code Interpreter, File Search, and Grounding with Bing Search.

β†’ Microsoft Learn - Agent tools overview for Foundry Agent Service – Details matching of tools to web grounding, code execution, and file retrieval.
Question 7 Choose 1
You are deploying a support agent that enables users to upload photos. You need to automatically classify uploaded images for harmful content. The solution must block content based on severity levels. What should you do?
Show answerHide answer

Correct answer: A Implement image moderation.

Explanation

Explanation:

This question tests your understanding of Azure AI Content Safety services for moderating user-generated content. The core requirement is to classify uploaded images for harmful visual content and enforce blocking actions based on severity thresholds, which is the primary function of image moderation.

βœ”οΈ Correct Option

A. Implement image moderation.
Azure AI Content Safety image moderation analyzes images for harmful categories (e.g., Violence, Sexual, Hate, Self-Harm) and returns a severity level from 0 (safe) to 6 (high). You can configure a threshold to automatically block images exceeding a specific severity score, fully meeting the requirement.

❌ Incorrect Options

B. Enable prompt shields.
Prompt shields are designed to detect and mitigate prompt injection attacks and jailbreak attempts in text inputs, not to classify or block harmful visual content in uploaded images.

C. Apply keyword scanning to optical character recognition (OCR) output by using Azure Vision in Foundry Tools.
This only scans text extracted from images for specific keywords. It ignores visual elements (e.g., violent scenes) and does not provide severity-based classification or blocking.

D. Use blocklists.
Blocklists are used for matching prohibited text strings to block content. They cannot detect visual harm categories in images or assign severity levels for dynamic content moderation.

πŸ”§ Reference
β†’ Azure AI Content Safety – QuickStart: Analyze image content
Confirms image moderation returns severity levels (0–6) for categories like violence and self-harm.

β†’ Azure AI Content Safety – Harm categories
Confirms severity scoring and category definitions for image and text moderation.
Question 8 Choose 1
Note: This section contains one or more sets of questions with the same scenario and problem. Each question presents a unique
solution to the problem. You must determine whether the solution meets the stated goals. More than one solution in the set might
solve the problem. It is also possible that none of the solutions in the set solve the problem. After you answer a question in this section, you will NOT be able to return. As a result, these questions do not appear on the Review
Screen.
You have a multimodal Al generative model that accepts image uploads and uses extracted image text to generate responses.
You discover that users can upload unsafe images and embed hidden instructions into images to manipulate the model.
You need to implement controls to mitigate the risk.
Solution: You configure a prompt shield for user prompts.
Does this meet the goal?
Show answerHide answer

Correct answer: B No

Explanation

Explanation:

This question tests your ability to identify appropriate security configurations to protect multimodal generative AI models. Specifically, it evaluates your understanding of the functional boundaries between direct user prompt protections and indirect prompt injection safeguards.

βœ… B. No:
The proposed solution does not meet the goal because configuring a prompt shield specifically for user prompts only mitigates direct jailbreak attacks initiated via text input. It completely overlooks indirect prompt injection threats where adversarial instructions are embedded within uploaded documents or images. To secure multimodal models against hidden data-driven exploits, developers must instead implement a prompt shield for indirect attacks.

❌ A. Yes:
Selecting this option is incorrect because a user prompt shield cannot analyze or detect malicious instructions hidden within external data sources like uploaded photos. Relying solely on a user prompt shield leaves the multimodal system highly vulnerable to cross-domain prompt injections and unauthorized model manipulation.

πŸ”§ Reference:
β†’ Microsoft Learn: Azure AI Content Safety Prompt Shields confirms that separate models handle user prompts and indirect document attacks to block exploits successfully.
Question 9 Choose 1
You have a Microsoft Foundry project named Project1 that contains the following:
β€’ An OpenAPI tool that calls an external API
β€’ A project connection named Connection1 that stores the API key of the external API
When an agent calls the OpenAPI tool, the API returns a 401 unauthorized error, and traces show that the API key header is NOT being sent.
You need to ensure that the OpenAPI tool automatically includes the API key from Connection1 on all requests.
What should you do?
Show answerHide answer

Correct answer: B Connect the tool to Connection1.

Explanation

Explanation:

This question tests your understanding of how OpenAPI tools in Microsoft Foundry authenticate with external APIs using project connections. The 401 error indicates the tool is not automatically including the API key header when calling the external API. For an OpenAPI tool to use an API key stored in a project connection, the tool must be explicitly connected to that connection.

βœ”οΈ Correct Option: B. Connect the tool to Connection1
To automatically include the API key from Connection1 in all requests, the OpenAPI tool must be configured to use that specific connection for authentication . When you connect the tool to the project connection containing the API key, Foundry automatically injects the key into the request header as defined in the OpenAPI specification's security scheme . This eliminates the need to manually add the header each time the tool is called.

❌ Incorrect option: A. Configure the tool to use the default connection of Project1
The default connection is typically used for Azure OpenAI or AI Services resources within the project, not for arbitrary external APIs accessed via OpenAPI tools . Even if a default connection existed, it would not automatically contain the specific API key required by your external API. You must explicitly connect the OpenAPI tool to the specific connection that stores its credentials.

❌ Incorrect option: C. Enable identity passthrough so that the tool uses the Microsoft Entra token of the caller
Identity passthrough uses managed identity (Microsoft Entra ID) authentication, which requires assigning proper roles to the target resource and specifying an audience value . The scenario explicitly states that Connection1 stores an API key for the external API. Using Entra token authentication would be a different authentication method altogether, not applicable when you already have an API key stored in a connection.

❌ Incorrect option: D. Add the API key header manually to the OpenAPI specification
The official guidance explicitly states to remove any parameter in the OpenAPI spec that needs the API key, because the API key is stored and passed through a connection . Adding the header manually in the spec would be redundant and not the correct approach. The specification should define the security scheme (securitySchemes) and reference it (security), but the actual key value is provided by the connected project connection at runtime .

πŸ”§ Reference:
β†’ The official Microsoft Learn documentation explains the process: Authenticate with API key. This confirms that after creating a project connection with the API key, you must connect the tool to that connection for automatic header injection, and that API key parameters should be removed from the OpenAPI spec.
Question 10
You have a Microsoft Foundry project that contains a deployed ticket-triage agent.
You discover that sometimes the agent responds without calling any tools, even when a tool is required.
You need to ensure that the agent calls a tool during execution.
How should you complete the Python code? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.

Show answerHide answer

Explanation



Explanation:

This question tests your understanding of controlling tool invocation behavior in Microsoft Foundry Agent Service. Since the agent sometimes skips tool calls even when needed, you must force deterministic tool usage during a run.

βœ… Correct Option: "tool_choice": "required"
"tool_choice" is the key that controls whether and how the model calls tools, and setting its value to "required" forces the model to call at least one tool on every run instead of leaving the decision to its own discretion. The tool_choice parameter is the most deterministic way of controlling which tool is called by the model, and setting it to required ensures consistent, predictable tool-calling behavior, directly resolving the reported issue.

❌ Incorrect Option: "auto"
This is the default behavior, letting the model decide on its own whether to call a tool based on context. Since this is exactly the setting causing the agent to inconsistently skip tools, it does not solve the problem described in the scenario.

❌ Incorrect Option: "response_format"
This key controls the structure or format of the model's output, such as enforcing JSON responses, not whether a tool is invoked during a run. It has no role in forcing tool calls, making it unsuitable here.

❌ Incorrect Option: "tools"
This key is used to define or list the tools available to the agent, not to force their usage during a specific run. Simply listing tools doesn't guarantee the model will actually call one.

❌ Incorrect Option: "type"
This is a generic structural key used within JSON objects to specify a category or kind, not a parameter that governs tool invocation behavior. It doesn't influence whether the model calls a tool.

πŸ”§ Reference:
β†’ Microsoft Learn: Tool best practices for Microsoft Foundry Agent Service β€” confirms that setting tool_choice to "required" is the recommended method for deterministic tool-calling control.
Full mock exam

Sit the AI-103 exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real AI-103 exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full AI-103 mock exam
  • 60questions per mock
  • 120 mintime limit
  • 95questions in the bank
  • Newmock on every attempt