Microsoft certification · Exam AI-901

AI-901 Mock Exam

Microsoft Azure AI Fundamentals (Updated Version)

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

14 questions · 16 minutes · free, no sign-up

Free AI-901 questions

1–10 of 14 free
Question 1 Choose 1
You need to convert written customer notifications into natural-sounding spoken audio that can be played over a phone system.

Which Azure Speech in Foundry Tools capability should you use?
Show answerHide answer

Correct answer: B speech synthesis

Explanation

Explanation:
The question asks for converting written text into spoken audio for playback. This process is known as text-to-speech (TTS). In Azure AI Foundry (formerly Azure AI Services), the capability that handles this conversion is Speech Synthesis, which generates human-like natural voices from input text for scenarios like IVR systems or notifications.

Correct Option:

B. speech synthesis
Speech Synthesis (specifically the Text-to-Speech API) is designed exactly for this purpose. It takes plain text or SSML (Speech Synthesis Markup Language) as input and outputs audio streams (e.g., MP3, WAV) in natural-sounding voices. It supports multiple languages and voice styles, making it ideal for phone system notifications.

Incorrect Options:

A. speaker recognition –
This identifies or verifies a speaker based on their unique voice biometrics (who is speaking). It is irrelevant to converting text into audio.

C. speech recognition –
This is the opposite process: converting spoken audio into text (transcription). It does not generate audio from text.

D. speech translation –
This translates spoken audio from one language to another, optionally with text or speech output. It does not convert written text into audio without an input speech source.

Reference:
Microsoft Learn: "What is Text-to-Speech?" – Azure AI Speech service documentation. Specifically, the "Speech synthesis" section covers converting text to natural-sounding speech for applications.
Question 2 Choose 1
You are developing an application that extracts fields from PDFs by using Azure Content Understanding in Foundry Tools.

You need to use the Python SDK to submit a PDF for analysis and retrieve the extraction results.

What should you do?
Show answerHide answer

Correct answer: A Call begin_analyze(), and then call poller.result() to retrieve the results.

Explanation

Explanation:
The question asks for the correct method to submit a PDF for analysis using the Azure Content Understanding Python SDK and retrieve results. In Azure AI Foundry, long-running operations (like document analysis) are handled asynchronously. The SDK uses a polling pattern where begin_analyze() starts the operation and returns a poller object, which you then use to wait for and fetch the results.

Correct Option:

A. Call begin_analyze(), and then call poller.result() to retrieve the results.
This is the standard asynchronous pattern for Azure SDKs. begin_analyze() initiates the analysis job and returns a LROPoller (Long Running Operation Poller). Calling poller.result() blocks until the analysis completes and returns the extracted fields. This ensures proper handling of large documents and avoids timeouts.

Incorrect Options:

B. Submit the PDF to an analyzer and read the results from the request headers –
This is incorrect because analysis results are not returned in HTTP headers. Headers contain metadata or status information, not the extracted content or field data.

C. Use optical character recognition (OCR) to extract text from the PDF and map the fields in the code –
This is a manual, low-level approach. Content Understanding automates field extraction using AI models, so you should use the SDK's analysis capabilities rather than handwriting OCR and field-mapping logic.

D. Call analyze() to return the extracted fields synchronously in the same request –
Content Understanding operations are typically long-running and asynchronous due to processing time. A synchronous analyze() method does not exist in the SDK for this purpose; the SDK enforces the async pattern via begin_analyze().

Reference:
Microsoft Learn: "Quickstart: Content Understanding" – Azure AI Foundry documentation. The Python SDK samples demonstrate using begin_analyze() with LROPoller for asynchronous document analysis. Also refer to Azure SDK pattern guidelines for long-running operations.
Question 3
You are developing an application that converts text into spoken audio and saves the synthesized audio to a file by using Azure Speech in Foundry Tools.

How should you complete the Python code? To answer, select the appropriate option in the answer area.

NOTE:Each correct selection is worth one point.

Show answerHide answer

Explanation

Explanation:
The question requires completing Python code to synthesize text to speech and save it as an audio file using Azure Speech SDK. The SpeechSynthesizer constructor needs a valid audio_config object for file output. The correct approach is to use speechsdk.audio.AudioOutputConfig(filename="output.wav") to create a configuration that directs the synthesized audio directly to a file, and then pass that as the audio_config parameter.

Why Other Approaches in the Code Snippet Are Incorrect:

AudioOutputConfig(stream) –
This is used when you want to write audio to an in-memory stream, not directly to a file. It requires additional handling to save the stream content to disk, making it unnecessary for simple file output.

AudioStreamFormat(wave_stream_format=AudioStreamWaveFormat.PCM) –
This specifies the format of an audio stream, but it is not a valid configuration object for file output. It is used only when working with custom stream implementations, not with AudioOutputConfig.

Passing AudioOutputConfig twice or mixing parameters incorrectly –
The constructor expects a single audio_config parameter. Duplicating or misplacing configuration objects will cause syntax errors or unexpected behavior.

Reference:
Microsoft Learn: "How to synthesize speech to a file" – Azure Speech SDK documentation. The correct pattern is to create an AudioOutputConfig using filename parameter and pass it to the SpeechSynthesizer constructor. Additional details are available in the "Audio input/output" section of the Speech SDK API reference.
Question 4
For each of the following statements, select Yes if the statement is true. Otherwise, select No.

NOTE: Each correct selection is worth one point.

Show answerHide answer

Explanation



Explanation:
This question tests your understanding of responsible AI principles, specifically accountability and transparency in AI systems. These are core pillars of Microsoft's responsible AI framework. Human oversight, proper team disclosure, and continuous monitoring are essential practices—not optional—for maintaining trust and compliance when deploying AI solutions.

Correct Options (Yes):

1. Human-in-the-loop practices provide accountability for AI-generated decisions.
Human oversight ensures that critical decisions are reviewed by people who can take responsibility for outcomes. This is a key accountability mechanism because AI systems are tools, not autonomous decision-makers. Human reviewers can catch errors, address edge cases, and ensure ethical compliance.

3. Disclosing the team that designed and deployed an AI system provides accountability for the system’s output.
Transparency about who built the system establishes clear ownership and responsibility. If something goes wrong, stakeholders know whom to contact. This is a fundamental transparency and accountability practice in responsible AI frameworks.

Incorrect Option (No):

2. Deploying an AI system to a production environment eliminates the need for ongoing monitoring.
This is false. Production deployment is the beginning of monitoring, not the end. AI models can drift over time due to data changes, degrade in performance, or produce biased outputs. Continuous monitoring, retraining, and evaluation are critical to maintain accuracy, fairness, and safety throughout the system's lifecycle.

Reference:
Microsoft Learn: "Responsible AI principles" – Microsoft's framework emphasizes accountability, transparency, and reliability. Human oversight and ongoing monitoring are explicitly called out as essential practices. Also refer to the "Governance and accountability" and "Monitor AI systems" modules in AI-901 study materials.
Question 5 Choose 1
You are using the Azure Speech SDK to develop a Python application thatsupports real- time spoken conversations.

Which Azure speech class should you use to configure the connection to the Azure Speech service?
Show answerHide answer

Correct answer: C AuditOutputConfig

Explanation

Explanation:
The question asks which Azure Speech SDK class is used to configure the connection to the Azure Speech service. The connection is established using credentials like subscription keys and regions. In the Speech SDK, the SpeechConfig class handles this configuration. However, note that the provided options do not include SpeechConfig—instead, they list other classes. Among the given choices, none correctly matches the required class. If I must select from the provided list, none are correct, but I will explain why each is incorrect.

Correct Option:

None of the above (but if forced, no valid option exists).
The actual class to configure the connection is SpeechConfig, which is created using speechsdk.SpeechConfig(subscription=key, region=region). This class holds the subscription key, region, endpoint, and other connection-related settings. Without it, you cannot authenticate or communicate with the Azure Speech service.

Incorrect Options:

A. AudioConfig –
This class handles audio input/output configurations (e.g., microphone, file, or stream). It does not manage service connection settings like keys or regions. It is used alongside SpeechConfig, not as a replacement for it.

B. SpeechSynthesizer –
This class is responsible for performing text-to-speech synthesis once the connection is configured. It requires a SpeechConfig object to function but does not itself configure the connection to the service.

C. AuditOutputConfig –
This is a distractor option. There is no such class as AuditOutputConfig in the Azure Speech SDK. The correct term is AudioOutputConfig, but even that is for output settings, not service connection configuration.

Reference:
Microsoft Learn: "SpeechConfig class" – Azure Speech SDK API reference. The SpeechConfig class is explicitly documented as the entry point for configuring service credentials and endpoints. All other classes (AudioConfig, SpeechSynthesizer, SpeechRecognizer, etc.) depend on it. The question's options contain an error, as none match the required class.
Question 6 Choose 1
You need to create an AI agent in Microsoft Foundry that follows a specific role and behavior when responding to users.

What should you configure?
Show answerHide answer

Correct answer: B system instructions

Explanation

Explanation:
The question asks which configuration controls an AI agent's role and behavior when responding to users. In Microsoft Foundry (and Azure OpenAI), the system message (also called system instructions) is the primary mechanism for defining the assistant's personality, constraints, expertise, and overall response style. This is a foundational concept for customizing AI agents.

Correct Option:

B. system instructions
System instructions (or system prompt) set the contextual guidelines for the AI model throughout the conversation. They define the agent's persona, tone, scope of knowledge, and specific rules to follow (e.g., "You are a helpful customer support agent for a bank"). This directly controls the role and behavior you want the AI to exhibit in every response.

Incorrect Options:

A. tokens per minute (TPM) –
This is a rate-limiting or capacity metric that controls how many tokens the model can process per minute. It affects performance and cost, not the behavior, personality, or response style of the AI agent.

C. temperature –
This parameter controls the randomness/creativity of responses. Higher values (e.g., 0.8) produce more diverse outputs, while lower values (e.g., 0.2) make responses more deterministic. It influences how the AI says something, but does not define its core role or behavior guidelines.

D. max completion tokens –
This parameter sets a hard limit on the maximum length (in tokens) of the AI's response. It prevents overly long outputs but does not influence what the AI says, its role, or its behavioral constraints.

Reference:
Microsoft Learn: "System message" – Azure OpenAI Service documentation. The system prompt is explicitly described as the way to guide the model's behavior, set context, and define the assistant's persona. Additional references: "Create a custom AI agent" in Microsoft Foundry documentation.
Question 7
Select the answer that correctly completes the sentence.

Show answerHide answer

Explanation



Explanation:
The question asks which Microsoft responsible AI principle is exemplified when human reviewers oversee AI-generated decisions and remain responsible for the final output. This directly relates to assigning ownership and responsibility for AI system outcomes. Microsoft's responsible AI framework defines accountability as ensuring that humans are ultimately responsible for AI decisions, with proper oversight mechanisms in place.

Explanation of Correct Answer:

Accountability –
This principle requires that AI systems are designed and operated by people who take responsibility for their outcomes. Human-in-the-loop oversight, clear governance structures, and the ability to intervene or correct AI decisions are all manifestations of accountability. When human reviewers oversee and bear responsibility for final outputs, they ensure that accountability is maintained throughout the AI lifecycle.

Incorrect Options:

Fairness –
This principle focuses on ensuring that AI systems treat all individuals equitably and do not exhibit bias or discrimination. While important, it does not directly relate to human oversight or responsibility for final decisions.

Privacy and Security –
This principle emphasizes protecting personal data, ensuring data is handled securely, and respecting user consent. It addresses data protection, not the responsibility structure for AI-generated decisions.

Transparency –
This principle involves making AI systems understandable and disclosing how they work, their limitations, and their intended use. It is about openness and clarity, not about human responsibility or oversight over final outputs.

Reference:
Microsoft Learn: "Accountability" – Microsoft Responsible AI principles documentation. The accountability principle explicitly states that "people should be accountable for AI systems and their outcomes" and emphasizes human oversight and responsible design. Also covered in the AI-901 module on Responsible AI.
Question 8
You have a Microsoft Foundry project named project1 that contains an Azure OpenAI resource named Resource1.

To Resource1, you deploy a gpt-4.1-mini model by using a model deployment named my- mini-gpt.

You need to connect to my-mini-gpt from an application.

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.

NOTE: Each correct selection is worth one point.

Show answerHide answer

Explanation



Explanation:
The question asks how to correctly complete the Python code to connect to a specific model deployment within an Azure OpenAI resource. When using the Azure OpenAI service, the endpoint URL must include the resource name (not the project name) and the deployment name is used as the model parameter in the API call. The model name itself (e.g., gpt-4.1-mini) is only used during deployment creation and is not directly referenced in the API call.

Explanation of Correct Values:

resource1 for the base_url –
The Azure OpenAI endpoint URL must contain the resource name (not the project name). The format is https://{resource-name}.openai.azure.com/openai/v1/. The project name (project1) is a Foundry-level organizational container and is not part of the API endpoint. Therefore, resource1 is the correct value here.

my-mini-gpt for the model parameter –
In Azure OpenAI, the model parameter in the API call must reference the deployment name, not the underlying model type. You deployed the model with the deployment name my-mini-gpt, so that is what you pass to the model parameter. The value gpt-4.1-mini is the base model name and is not used directly in API calls.

Why Other Values Are Incorrect:

project1 –
This is the Foundry project name, which is used for organizing resources and managing access within Foundry. It is not part of the Azure OpenAI endpoint URL. Using it would result in a connection error.

gpt-4.1-mini –
This is the base model type that was deployed. In Azure OpenAI, you call the deployment name (my-mini-gpt), not the base model name. Using the base model name would cause a "model not found" error because Azure OpenAI only recognizes deployment names in API calls.

Reference:
Microsoft Learn: "Azure OpenAI Service REST API reference" – The endpoint URL format is https://{resource-name}.openai.azure.com/openai/v1/ and the model parameter must reference the deployment name. Also covered in "Quickstart: Use Azure OpenAI with Python" and Foundry deployment documentation.
Question 9 Choose 2
What are two purposes of instructions when prompting a generative AI model? Each correct answer presents part of the solution.

NOTE: Each correct selection is worth one point.
Show answerHide answer

Correct answer: A, B defines constraints on the model's responsesdefines the agent's role and behavior

Explanation

Explanation:
This question asks about the purposes of instructions (specifically system instructions or prompts) when working with generative AI models. Instructions are the primary way developers guide model behavior, set boundaries, and define the assistant's persona. They are part of the input sent to the model and directly influence what the model generates, not infrastructure or performance settings.

Correct Options:

A. defines constraints on the model's responses
Instructions can explicitly limit what the model can or cannot say. For example, you can instruct the model to "only respond with JSON" or "do not provide medical advice." These constraints ensure the output adheres to safety, format, and content guidelines, making the AI's behavior predictable and controlled.

B. defines the agent's role and behavior
This is the primary purpose of system instructions. You can define the AI's persona, tone, expertise, and overall approach (e.g., "You are a friendly customer support agent"). This shapes how the model interprets and responds to user queries, ensuring it behaves consistently with the desired use case.

Incorrect Options:

C. defines the Azure region where inference occurs
The Azure region is determined by the resource configuration and endpoint URL, not by the prompt or instructions. This is an infrastructure setting managed during resource creation, not something you control through text-based instructions to the model.

D. selects which model to use
The model or deployment is selected via the API call's model parameter (e.g., specifying the deployment name). Instructions do not influence which model version or deployment is invoked; this is a separate configuration in the API request.

E. defines the tokens per minute (TPM) allocation for the model
TPM is a rate-limiting and capacity setting configured at the Azure resource or deployment level. It controls throughput and cost, not the content or behavior of responses. Instructions have no role in defining TPM allocation.

Reference:
Microsoft Learn: "System prompts" and "Prompt engineering techniques" – Azure OpenAI Service documentation. System instructions are explicitly described as a way to define the model's role, behavior, and constraints. Infrastructure and performance settings like region, model selection, and TPM are managed separately through the Azure portal, SDK, or API parameters.
Question 10
Select the answer that correctly completes the sentence.

Show answerHide answer

Explanation



Explanation:
The question asks about the nature of analysis when content is submitted to Azure Content Understanding in Foundry Tools. Content Understanding processes documents, images, and other files to extract structured fields and insights. Since this involves AI model processing that can take variable amounts of time depending on document size and complexity, the analysis is performed asynchronously using a polling pattern to retrieve results.

Explanation of Correct Answer:

asynchronous –
Azure Content Understanding uses a long-running, asynchronous operation pattern. When you submit content, the service returns a job ID or poller object immediately, and you must check the status or call poller.result() to retrieve the final extracted fields once processing completes. This design accommodates variable processing times and prevents timeout issues for larger or more complex documents.

Incorrect Options:

synchronous –
This would mean the API call blocks until the result is ready and returns it in the same HTTP response. Content Understanding does not work this way because processing times can be unpredictable; synchronous calls would risk timeouts and poor user experience for large documents.

returned only as unstructured plain text –
This is incorrect. Content Understanding extracts structured fields (e.g., key-value pairs, tables, forms) based on the schema you define. It goes far beyond returning plain text, providing organized, queryable data.

limited to optical character recognition (OCR)-only processing –
This is false. While Content Understanding does use OCR to read text, it also applies AI models for field extraction, classification, and semantic understanding. It is not limited to OCR; it provides intelligent document processing capabilities.

Reference:
Microsoft Learn: "Content Understanding overview" – Azure AI Foundry documentation. The service uses asynchronous APIs with the begin_analyze() pattern and LROPoller for result retrieval. Also refer to the SDK reference for document analysis, which explicitly describes the long-running operation model.
Full mock exam

Sit the AI-901 exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real AI-901 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-901 mock exam
  • 40questions per mock
  • 45 mintime limit
  • 49questions in the bank
  • Newmock on every attempt