Microsoft certification · Exam AI-103

AI-103 Mock Exam Page 2

Developing AI Apps and Agents on Azure

Free AI-103 mock exam questions 11–20, each with the answer and an explanation.

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

Free AI-103 questions

11–20 of 28 free
Question 11
You have a Microsoft Foundry project that contains an agent.
The agent uses tools to retrieve internal content and call external APIs. The agent is configured to let the model decide when to call the tools.
You need to publish the agent for a compliance workflow. The solution must meet the following requirements
• Each workflow run must include a retrieval step before generating a response.
• Tool calls must authenticate by using the published agent’s own identity.
• Tool access must use an identity isolated from other project resources.
• Tool access must support audit tracing.
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 agent configuration in Microsoft Foundry for compliance workflows, focusing on tool invocation control, authentication, and identity isolation for security and auditing.

✅ Correct Option:
Set tool_choice to: required
Setting tool_choice to required forces the model to call tools (e.g., retrieval) in every run before generating a response. This ensures the retrieval step always occurs first, meeting the compliance workflow requirement.

✅ Correct Option:
Using a distinct agent identity bound to the client application
This option uses an isolated identity for the published agent. It authenticates tool calls with the agent’s own identity, keeps access separate from other project resources, and supports audit tracing.

❌ Incorrect Option:
Set tool_choice to: auto
auto lets the model decide when to call tools. This does not guarantee a retrieval step in every workflow run, violating the compliance requirement.

❌ Incorrect Option:
Set tool_choice to: none
none disables tool calling entirely. The agent cannot retrieve internal content or call external APIs as needed.

❌ Incorrect Option:
Storing API keys in prompts
This is insecure and does not provide proper identity-based authentication, isolation, or audit tracing for published agents.

❌ Incorrect Option:
Using the shared project agent identity
The shared identity is not isolated from other project resources. It fails the requirement for a distinct, isolated identity with strong audit support.

🔧 Reference:
→ Microsoft Learn - What are tools in Foundry Agent Service? – Covers tool_choice options and authentication methods.

→ Microsoft Learn - Agent tools overview for Foundry Agent Service – Explains distinct agent identities for isolation and auditing in published agents.
Question 12 Choose 2
You have a Microsoft Foundry project that contains a prompt agent used by a customer support web app. The agent is invoked from a Python service that does NOT run in the Foundry portal. You need to implement end-to-end tracing to capture latency breakdowns and exceptions across agent runs. Which two components can you use? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.
Show answerHide answer

Correct answer: B, C OpenTelemetry Application Insights

Explanation

Explanation:

This question checks how to enable end-to-end observability for a Foundry agent used from an external Python service. The goal is to capture traces, latency breakdowns, and exceptions across agent runs, which requires both instrumentation and a monitoring backend.

B. OpenTelemetry
✔️ OpenTelemetry is the tracing standard used to instrument the Python service and capture distributed traces across the agent workflow. It records spans, timing, and exceptions, which makes it suitable for end-to-end visibility even when the app is running outside the Foundry portal.

C. Application Insights
✔️ Application Insights is the Azure monitoring service that receives and visualizes the telemetry. It helps analyze latency, exceptions, and request flow across runs, making it the correct backend for tracing and troubleshooting Foundry agent behavior.

A. a Log Analytics workspace
❌ A Log Analytics workspace can store logs and support querying, but it is not the primary component for instrumenting distributed traces from a Python service. The question asks for end-to-end tracing with latency breakdowns and exceptions, which is better handled through tracing instrumentation plus Application Insights.

D. the Azure Monitor Agent
❌ The Azure Monitor Agent is mainly used to collect machine and platform telemetry from Azure resources. It does not provide the application-level distributed tracing needed for a Python service invoking a Foundry agent.

E. Microsoft Sentinel
❌ Microsoft Sentinel is a security analytics and SIEM platform. It is useful for threat detection and incident response, but it does not provide the tracing pipeline needed to capture latency breakdowns and exceptions across agent runs.

🔧 Reference:
→ Microsoft Learn — Set Up Tracing for AI Agents in Microsoft Foundry — confirms tracing captures latency and exceptions for agent observability.

→ Microsoft Learn — Monitor AI Agents with Application Insights — confirms Application Insights is used for telemetry collection and end-to-end monitoring.
Question 13
You have a Microsoft Foundry project that contains a customer support agent grounded in internal documentation.
After a recent update, users report the following issues:
• Some answers are unsupported by retrieved documents.
• A small number of responses are flagged for policy violations.
You need to evaluate each issue.
Which observability signals should you use for each issue? To answer, drag the appropriate observability signals to the correct issues. Each observability signal 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 Azure AI Foundry's observability signals and which evaluators are appropriate for diagnosing specific issues in a RAG-based (Retrieval-Augmented Generation) customer support agent. The two distinct issues—unsupported answers and policy violations—map to two different evaluator categories: quality/performance and risk/safety.

✔️ Correct Options

Unsupported responses: Groundedness evaluation metrics.
Groundedness measures how consistent the generated response is with respect to the retrieved context . When answers are unsupported by retrieved documents, this indicates a groundedness issue—the model is fabricating or hallucinating content not found in the source material. This is a quality and performance evaluator designed specifically for RAG scenarios .

Policy violations: Risk and safety metrics.
Risk and safety evaluators assess potential risks associated with AI-generated content, including harmful or inappropriate content . This category includes evaluators for hate and unfairness, sexual content, violent content, and self-harm-related content that detect policy violations . These metrics measure whether content violates safety thresholds and Responsible AI principles.

❌ Incorrect Options

Latency breakdown traces.
Traces are used for operational observability—debugging complex agent behaviors, identifying performance bottlenecks, and understanding multi-step reasoning chains . Latency breakdown does not evaluate content quality or safety.

Token usage analytics.
Token usage is an operational metric for monitoring consumption and cost . It does not assess whether responses are grounded in retrieved documents or whether content violates safety policies.

🔧 Reference
→ Microsoft Learn: Evaluation and monitoring metrics for generative AI
Confirms that risk and safety evaluators identify harmful/inappropriate content, while groundedness evaluators measure response alignment with context.

→ Microsoft Learn: Understand observability - Training
Defines groundedness as measuring consistency with retrieved context and risk/safety evaluators as assessing harmful content risks.
Question 14 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 documents.
Does this meet the goal?
Show answerHide answer

Correct answer: B No

Explanation

Explanation:

This question tests security controls for multimodal AI systems and protection against indirect prompt injection attacks. The issue involves hidden instructions embedded inside uploaded images. The selected control must specifically protect image-based content rather than document-only content.

🟢 Correct Option:

B. No
A prompt shield for documents is designed to detect and mitigate indirect prompt injection attacks originating from document-based content such as PDFs, text files, or similar sources. The scenario specifically involves unsafe images with hidden instructions embedded in them. Since the threat originates from image uploads and extracted image text, a document-only shield does not adequately address the stated risk or fully satisfy the control requirement.

🔴 Incorrect options:

A. Yes
This option is incorrect because document prompt shields focus on document content rather than image-based inputs. The scenario requires controls against hidden instructions embedded within uploaded images. Applying a document-focused protection mechanism leaves the image attack vector insufficiently addressed and does not fully mitigate the risk.

🔧 Reference:
⇒ Microsoft Prompt Shields documentation
Confirms that prompt shields are intended to mitigate prompt injection and indirect attacks for specific content sources.

⇒ Microsoft Azure AI multimodal safety guidance
Confirms security considerations for multimodal systems handling images and other input types.
Question 15
You need to recommend a plan to create a customer support agent by using the Microsoft Foundry Agent Service. The agent must meet the following requirements:
• Retain user preferences across multiple conversations.
• Enable users to provide contextual grounding by directly uploading documents during a chat.
Which Foundry capability should you recommend for each requirement? 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 ability to configure capabilities for agents within the Microsoft Foundry Agent Service. Specifically, it evaluates your understanding of long-term state management using persistent memory stores alongside runtime document ingestion tools to support contextual grounding and personalization.

✅ Box 1: Agent memory that uses persistent storage:
The Microsoft Foundry Agent Service provides a managed long-term memory capability designed to maintain user context over separate interactions. Using agent memory backed by a persistent storage layer allows the system to securely recall specific user preferences and history across distinct communication sessions, delivering a highly personalized and continuous customer support experience.

❌ Box 1: Conversation history:
Conversation history only maintains context and chat states within the boundaries of a single active thread or session. Once a session ends or a new conversation starts, this data is typically flushed or isolated, making it insufficient for long-term user preference retention.

❌ Box 1: Orchestration-managed session context:
Orchestration-managed session context tracks ephemeral workflow variables and state transitions during a running execution sequence. It does not persist indefinitely across multiple user login sessions or independent conversation threads, rendering it useless for durable preference tracking.

✅ Box 2: File search tool:
The File search tool allows users to dynamically upload unstructured documents, such as PDFs or text files, directly into an active chat thread. The agent service automatically processes, chunks, and indexes these uploaded files at runtime, enabling the agent to extract relevant information and provide immediate contextual grounding.

❌ Box 2: Azure AI Search tool:
The Azure AI Search tool is intended for querying static, pre-existing, large-scale enterprise data indexes that are configured at the infrastructure level. It does not provide the specific capability for end users to dynamically upload individual files during an ongoing live chat session.

❌ Box 2: Code interpreter tool:
The Code interpreter tool provides a secure sandboxed runtime environment where the agent can write and execute code to solve complex mathematical problems or process tabular datasets. It does not act as a retrieval tool for indexing or searching uploaded reference documents.

🔧 Reference:
→ Microsoft Learn: What are tools in Foundry Agent Service? confirms that persistent memory stores maintain user context, preferences, and long-term continuity across separate conversations.

→ Microsoft Learn: Agent tools overview for Foundry Agent Service confirms that the file search tool handles runtime user document uploads for contextual grounding.
Question 16
You have a Microsoft Foundry project that contains an agent.
The agent accepts user-uploaded screenshots and uses a multimodal chat model.
Some screenshots contain potentially malicious embedded text.
You need to prevent a prompt injection attack and ensure that third-party content is treated as lower trust.
How should you configure prompt shields for document attacks? 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 knowledge of configuring Prompt Shields for document attacks in Azure AI Foundry. The scenario involves user-uploaded screenshots that may contain potentially malicious embedded text. The goal is twofold: prevent a prompt injection attack and ensure third-party content is treated as lower trust. Configuring the shield action to "block" actively prevents detected attacks, while enabling "Spotlighting" provides the additional layer of treating third-party content with lower trust.

✔️ Correct Options

Prompt shields action: Set action to block.
The "block" action configures the guardrail to actively prevent the model from processing requests where a document attack is detected . This directly addresses the requirement to "prevent a prompt injection attack" by stopping malicious instructions embedded in uploaded screenshots from being executed.

Additional mitigation: Enable Spotlighting.
Spotlighting is specifically designed to "provide enhanced protection against indirect attacks" by tagging input documents with special formatting that indicates "lower trust to the model" . It transforms document content using base-64 encoding so the model treats it as less trustworthy than direct user and system prompts, directly meeting the requirement to ensure third-party content is treated as lower trust .

❌ Incorrect Options

Disable the shield.
Disabling the shield would completely remove protection against document attacks, leaving the agent vulnerable to malicious instructions embedded in uploaded screenshots.

Set action to annotate.
The "annotate" action only flags and logs detected attacks without actually blocking them . This does not meet the requirement to "prevent" prompt injection attacks—it would only notify without stopping the threat.

Create a custom blocklist.
Blocklists are designed to match prohibited text strings and cannot detect the varied and complex patterns used in prompt injection attacks, making them ineffective for this specific requirement.

Use optical character recognition (OCR) to extract the text from the images first.
OCR would extract visible text but does not provide protection against malicious instructions embedded in that text—the extracted text would still contain the attack payload that needs to be detected and blocked.

🔧 Reference
→ Prompt Shields in Microsoft Foundry - Microsoft Learn
Confirms document attack detection, the block action, and Spotlighting as an additional mitigation that tags third-party content with lower trust using base-64 encoding.

→ Document embedding in prompts - Microsoft Learn
Explains how to tag documents for detection and describes the relationship between Prompt Shields and document content.
Question 17 Choose 1
You have a Microsoft Foundry project that contains an agent.
You need to process mixed-format documents that contain scanned text, tables, and multicolumn layouts. The extracted content
must preserve the document structure and be converted into the Markdown format for downstream reasoning.
What should you configure first?
Show answerHide answer

Correct answer: A an Azure Content Understanding in Foundry Tools analyzer

Explanation

Explanation:

This question tests your knowledge of how to orchestrate complex document processing workflows in Microsoft Foundry. It evaluates your ability to select the right tool for layout preservation, text extraction, and structure-retaining Markdown conversion from mixed-format files.

✅ A. an Azure Content Understanding in Foundry Tools analyzer:
Azure Content Understanding in Foundry Tools is explicitly engineered to handle unstructured, mixed-format content such as tables, scanned text, and complex multicolumn layouts. Its RAG and content extraction analyzers (like prebuilt-documentSearch) parse layout structures and output cleanly formatted Markdown representations natively, providing reliable inputs for downstream reasoning agents.

❌ B. a generative chat completion request:
A standard generative chat completion request is designed to process textual prompt sequences or small conversational turns. It cannot directly handle native unstructured file parsing, optical character recognition (OCR), or automatic document layout structural rendering without extensive external processing pipelines.

❌ C. an Azure Language in Foundry Tools text analysis model deployment:
Azure AI Language text analysis deployments excel at high-level natural language tasks such as sentiment assessment, Named Entity Recognition (NER), and PII masking. They are not built to ingest scanned files, reconstruct mixed formatting boundaries, or format complex structural elements like tables into Markdown.

❌ D. an Azure OpenAI Responses API call that uses a multimodal model:
While a multimodal model can analyze text and images simultaneously, passing raw mixed-format documents via a basic API call requires significant manual prompting, formatting instructions, and token overhead. It does not provide the systematic, standardized document-parsing infrastructure offered by a dedicated Content Understanding analyzer.

🔧 Reference:
→ Microsoft Learn: Document analysis: Markdown representation - Foundry Tools confirms that Azure Content Understanding translates tables, layouts, and scanned content elements into structured Markdown for downstream reasoning.
Question 18
You have a Microsoft Foundry project that contains a deployed chat model.
You have a Python service that sends API requests to the model. The service is integrated with an automated validation system that compares generated outputs against approved response patterns.
Stakeholders report that small wording differences are causing validation mismatches. You need to update the request parameters to improve output stability. The solution must maximize reasoning quality.
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 tuning inference parameters for Claude models deployed in Microsoft Foundry to achieve consistent, high-quality outputs. Since automated validation is failing due to wording variance, you need to reduce randomness while keeping reasoning depth at its maximum.

✅ Correct Option: temperature=0
Temperature controls the randomness of token selection during generation, and setting it to 0 makes the model consistently choose the most probable next token, minimizing wording variation between runs. This directly addresses the validation mismatches caused by small differences in phrasing, since a value of 0 produces the most focused and repeatable output.

✅ Correct Option: output_config={"effort": "high"}
The effort parameter controls how many tokens Claude spends on reasoning and generating a response, and setting it to "high" ensures the model uses maximum effort, spending as many tokens as needed for the best possible outcome. Since the requirement explicitly asks to maximize reasoning quality, "high" is the only setting that satisfies this need without trading off depth for speed or cost.

❌ Incorrect Option: temperature=1 or temperature=2
Higher temperature values increase randomness and diversity in token selection, which produces more varied wording across identical prompts. This works directly against the goal of output stability and would worsen the validation mismatches described in the scenario.

❌ Incorrect Option: output_config={"effort": "low"}
Low effort instructs Claude to be more conservative with token usage, optimizing for speed and cost while accepting reduced reasoning depth. Since the requirement is to maximize reasoning quality, this setting fails to meet the stated goal.

❌ Incorrect Option: output_config={"effort": "medium"}
Medium effort offers a balanced tradeoff between quality and token efficiency, but it does not deliver the model's best possible reasoning performance. Because the scenario specifically calls for maximizing reasoning quality, only the "high" setting fully satisfies this requirement.

🔧 Reference:
→ Microsoft Learn: Deploy and use Claude models in Microsoft Foundry — confirms the temperature and output_config effort parameters used with client.messages.create for controlling output stability and reasoning depth.
Question 19 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 Microsoft Foundry project that contains an agent. The agent generates summaries from retrieved policy documents.
Users report that some responses omit required regulatory clauses, even when the clauses are present in the retrieved content.
You need to improve response completeness.
Solution: You add a reflection pass that regenerates the response if the required clauses are missing.
Does this meet the goal?
Show answerHide answer

Correct answer: A Yes

Explanation

Explanation:

This question tests response-quality improvement techniques in AI systems. The problem is not retrieval failure because the required clauses already exist in the retrieved content. The issue is incomplete generation, where important details are omitted from the final response.

🟢 Correct Option:

A. Yes
A reflection pass adds a secondary review step in which the generated response is evaluated against expected requirements. If required regulatory clauses are missing, the model can regenerate or revise the output to include omitted information. Because the retrieved content already contains the required clauses, reflection improves completeness by validating and correcting the generated response before it is returned to users.

🔴 Incorrect options:

B. No
This option is incorrect because the problem lies in response generation rather than content retrieval. Reflection mechanisms are specifically intended to review outputs and identify omissions or inconsistencies before delivering the final response, making them suitable for improving completeness.

🔧 Reference:
⇒ Azure AI Foundry – Prompt Engineering Techniques
Confirms that iterative and self-review techniques can improve response quality and completeness.

⇒ Azure AI Foundry – AI agent orchestration patterns
Confirms use of validation and reflection patterns for improving generated responses.
Question 20 Choose 1
You have a Microsoft Foundry project that contains a customer support agent. The agent calls an internal knowledge API tool before generating responses.
Users report the following issues:
• Some requests take more than 15 seconds to complete.
• Some responses are incorrect, even when the knowledge API returns the expected data.
You need to inspect individual agent runs to view the ordered sequence of large language model (LLM) calls, tool invocations, and timing information.
Which observability capability should you use?
Show answerHide answer

Correct answer: C tracing

Explanation

Explanation:

This question tests which observability feature lets you inspect a single agent run in detail. You need the ordered sequence of LLM calls, tool invocations, and timing information to diagnose latency and incorrect answers, so tracing is the right capability.

C. tracing
✔️ Tracing provides run-level visibility into the full execution path of an agent. It shows the sequence of model calls, tool calls, spans, and timing data, which helps you find where delays happen and why a response may be wrong even when a tool returns the expected data.

A. token usage
❌ Token usage only shows how many tokens were consumed. It does not show the ordered steps of a run, so it cannot help you inspect tool calls, model decisions, or timing breakdowns for a specific request.

B. safety metrics
❌ Safety metrics focus on content safety, policy violations, and harmful output detection. They are useful for governance, but they do not provide the detailed execution trace needed to troubleshoot latency or response quality.

D. monitoring
❌ Monitoring gives broader health and performance visibility across many runs. It is useful for trends and alerts, but it does not provide the detailed step-by-step breakdown of one agent execution that tracing offers.

🔧 Reference:
→ Microsoft Learn — Set up tracing in Microsoft Foundry — confirms tracing captures latency, exceptions, and detailed agent-run telemetry.

→ Microsoft Learn — Observability in generative AI — confirms tracing is used to inspect LLM calls, tool invocations, and run timing.
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