Microsoft Azure AI Engineer Associate Practice Test (AI-102)
Use the form below to configure your Microsoft Azure AI Engineer Associate Practice Test (AI-102). The practice test can be configured to only include certain exam objectives and domains. You can choose between 5-100 questions and set a time limit.

Microsoft Azure AI Engineer Associate AI-102 Information
The Microsoft Certified: Azure AI Engineer Associate certification, earned by passing the AI‑102: Designing and Implementing a Microsoft Azure AI Solution exam, is designed for people who build, deploy, and manage AI solutions using Microsoft Azure. According to Microsoft the role of an Azure AI Engineer involves working across all phases: requirements definition, development, deployment, integration, maintenance, and tuning of AI solutions. To succeed you should have experience with programming (for example Python or C#), using REST APIs/SDKs, and working with Azure’s AI services.
Domains on Azure AI Engineer Exam
The AI-102 exam tests several key areas: planning and managing an Azure AI solution (about 15-20 % of the exam), implementing computer vision solutions (15-20 %), natural language processing solutions (30-35 %), knowledge mining/document intelligence (10-15 %), generative AI solutions (10-15 %), and content-moderation/decision-support solutions (10-15 %). It is important to review each area and gain hands-on practice with Azure AI services such as Azure AI Vision, Azure AI Language, Azure AI Search and Azure OpenAI.
Azure AI Engineer Practice Tests
One of the best ways to prepare for this exam is through practice tests. Practice tests let you experience sample questions that mimic the real exam style and format. They help you determine which topics you are strong in and which ones need more study. After taking a practice test you can review your incorrect answers and go back to the learning material or labs to fill those gaps. Many study guides recommend using practice exams multiple times as a key part of your preparation for AI-102.

Free Microsoft Azure AI Engineer Associate AI-102 Practice Test
- 20 Questions
- Unlimited
- Plan and manage an Azure AI solutionImplement generative AI solutionsImplement an agentic solutionImplement computer vision solutionsImplement natural language processing solutionsImplement knowledge mining and information extraction solutions
You are configuring an Azure AI Search indexer that imports data from an Azure SQL Database table containing a LastModifiedDate column of type datetime2. After the first full crawl, the indexer should process only those rows that were inserted or updated since the previous run, so that each incremental execution finishes quickly and minimizes database load. Which setting must you add to the indexer definition to meet this requirement?
Enable a SoftDeleteColumnDeletionDetectionPolicy on the LastModifiedDate column.
Set the indexer schedule interval to a short period, such as every five minutes.
Set the parameters.batchSize value to 1,000 documents per batch.
Configure a HighWaterMarkChangeDetectionPolicy that points to the LastModifiedDate column.
Answer Description
Incremental indexing is enabled by adding a HighWaterMarkChangeDetectionPolicy to the indexer. You specify the name of a monotonically increasing column (such as LastModifiedDate) and the indexer automatically stores the highest value it has seen. On the next run it requests only rows where the column value is greater than that stored watermark, thereby importing just new or updated data. Changing the schedule merely determines when runs occur, batchSize controls how many items are sent per batch, and a SoftDeleteColumnDeletionDetectionPolicy is used to detect deletions, not updates.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a HighWaterMarkChangeDetectionPolicy in Azure AI Search?
How does a HighWaterMarkChangeDetectionPolicy improve performance?
What is the difference between HighWaterMarkChangeDetectionPolicy and SoftDeleteColumnDeletionDetectionPolicy?
You are creating a custom question answering project in Azure AI Language. The FAQ must respond in either English or Spanish, depending on the language of the user's query. The knowledge base content for each language is already available. According to Azure AI Language design recommendations, which approach should you implement to build a maintainable multi-language solution?
Create an English project and a Spanish project, then have the client detect the query language and call the corresponding project endpoint.
Create a single project, import both English and Spanish knowledge sources, and rely on the service to auto-detect language at query time.
Create one English project and configure a custom Translator model so Spanish questions are translated to English before they are sent to the project.
Create one project in English, enable cross-language semantic search, and return the same answers for Spanish queries.
Answer Description
A custom question answering project is always linked to a single language locale. To provide answers in more than one language, you create a separate project for each language (for example, one project with locale en-us and another with locale es-es). At run time your client application detects the user's language or inspects the Accept-Language header, then routes the request to the endpoint of the matching project. Adding multiple languages to one project, translating queries on the fly, or relying on cross-language embedding are not supported ways to build a production multi-language knowledge base in Azure AI Language.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
How does language detection work when routing queries in a multi-language solution?
Why does each Azure AI Language project need to be linked to a single language locale?
What are the limitations of embedding multiple languages in one Azure AI Language project?
Your project in Azure AI Foundry must summarize support tickets containing up to 14 000 tokens and use Azure OpenAI function calling to write the summary to Cosmos DB. You are preparing the Deploy Model step in Foundry Studio. Which model should you select and deploy to satisfy these requirements while keeping cost as low as possible?
Deploy the gpt-35-turbo-16k chat completion model.
Deploy the text-embedding-ada-002 embeddings model.
Deploy the text-davinci-003 completions model.
Deploy the gpt-4-32k chat completion model.
Answer Description
The gpt-35-turbo-16k model offers a 16 000-token context window-enough for the 14 000-token inputs-and natively supports the Azure OpenAI function calling feature. It is significantly less expensive than any GPT-4 variant, making it the most cost-effective choice that still fulfils both the context-length and function-calling requirements.
GPT-4-32k also meets the technical requirements but costs considerably more. text-davinci-003 is a completions model with only a 4 000-token limit and no function-calling capability. text-embedding-ada-002 is an embeddings model, not a chat/completions model, so it cannot generate summaries or call functions.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the gpt-35-turbo-16k model specialize in?
How does Azure OpenAI function calling work in this use case?
Why can’t text-davinci-003 or text-embedding-ada-002 be used?
You are designing an autonomous drone inspection solution that must run entirely at a remote construction site without reliable internet connectivity. The drone needs to generate concise natural-language summaries of detected safety risks on an embedded single-GPU device. Within Azure AI Foundry you must choose a model whose weights you can download and run locally while keeping GPU memory requirements low. Which model should you deploy?
GPT-3.5-Turbo
GPT-4
DALL-E 3
Phi-2 language model
Answer Description
Phi-2 is a 2.7-billion-parameter open-weight language model published by Microsoft. Because the weights can be downloaded from the Azure AI model catalog, the model can be executed completely offline and even on a single consumer-class GPU, making it suitable for edge scenarios that lack network connectivity. GPT-4 and GPT-3.5-Turbo are only available as hosted Azure OpenAI endpoints, so they require cloud access and cannot be run locally. DALL-E 3 is an image generation model, not a text-generation model, and also relies on a hosted service.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is the Phi-2 language model suitable for offline use?
What are the key differences between Phi-2 and GPT-4 or GPT-3.5-Turbo?
What makes Phi-2 efficient for single-GPU devices?
You develop an Azure Function that calls the Azure AI Text Analytics sentiment analysis endpoint (v3.1) to process English product reviews. In addition to the overall document sentiment, you must retrieve the sentiment and confidence scores for each opinion about a product aspect (for example, battery or screen) that appears in the review. Which setting should you add to the request so that the service returns this extra granular information?
Add the query parameter opinionMining=true.
Specify stringIndexType=UnicodeCodePoint in the request body.
Add the query parameter showStats=true.
Add the query parameter includeOpinionMining=true.
Answer Description
Opinion mining is an optional extension of the Analyze Sentiment operation. You enable it by adding the query parameter "opinionMining=true" (or the same property in the SDK options). When this flag is present, the service extracts aspect-opinion pairs and returns sentiment and confidence scores for each pair in the response. Parameters such as "showStats" or "stringIndexType" control statistics and text index calculation but do not activate opinion mining, and "includeOpinionMining" is not a recognized parameter.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is opinion mining in Azure AI Text Analytics?
How do confidence scores work in sentiment analysis?
What is the purpose of `stringIndexType` in the Azure Text Analytics API?
Your company processes about 10 million Text Analytics transactions every month by using the S0 tier of Azure AI Language in a single production subscription. Management wants to lower the monthly bill without reducing throughput or changing the existing solution's architecture. Which action should you take to achieve the greatest cost savings for this predictable monthly workload?
Move the Azure AI Language resource to a region with lower pricing and disable public network access.
Switch the resource from the S0 tier to the F0 tier.
Purchase a monthly commitment tier for the Azure AI Language service.
Create an Azure budget on the resource group that contains the Azure AI Language resource.
Answer Description
The free F0 tier is limited to 5,000 text records per month, so it cannot support the current volume. Moving the resource to another region may offer minor price differences but does not provide the substantial discounts available for high-volume, predictable workloads. Disabling public network access is a security measure and has no impact on transaction billing. Creating an Azure budget helps monitor spending and sends alerts, but it does not inherently reduce charges. Purchasing a monthly commitment tier for Azure AI Language provides a significant discount compared to pay-as-you-go pricing for predictable usage volumes, making it the most effective way to lower costs without architectural changes.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a monthly commitment tier in Azure AI Language service?
Why can't the F0 tier handle 10 million transactions?
How does an Azure budget help manage costs for services like Azure AI Language?
You are developing an Azure Function written in Python that must send chat completion requests to a GPT-4 deployment named "chat-gpt4" in the Azure OpenAI resource "lit-openai". The security team prohibits storing service access keys in your source code, configuration files, or environment variables. You decide to use the system-assigned managed identity of the function for authentication. Which approach should you implement to meet the requirements?
Use the openai Python package and set openai.api_key to the managed identity's client ID while pointing openai.api_base to the Azure endpoint.
Add the managed identity to the Reader role on the resource group and create OpenAIClient with AzureKeyCredential initialized to an empty string.
Instantiate azure.ai.openai.OpenAIClient with DefaultAzureCredential, and assign the function's managed identity the Cognitive Services OpenAI User role on "lit-openai".
Retrieve the Azure OpenAI resource key from Azure Key Vault at startup and expose it as the OPENAI_API_KEY environment variable.
Answer Description
The Azure Function can acquire an Azure AD access token for Azure OpenAI through its system-assigned managed identity. When you instantiate OpenAIClient with an Azure AD token credential (for example, DefaultAzureCredential), the SDK handles token acquisition transparently. For the token to be accepted, the managed identity must be granted the Cognitive Services OpenAI User role on the Azure OpenAI resource. Passing the managed identity's object ID as an API key (or retrieving the key from Key Vault) would still rely on key-based authentication, which the security team disallows. Assigning the Reader role or using AzureKeyCredential does not enable token-based authentication.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is DefaultAzureCredential?
What is the Cognitive Services OpenAI User role and why is it necessary?
How does a managed identity work in Azure Functions?
You need to create a new agent by using the Azure CLI command az ai agent create against the Azure AI Foundry Agent Service. The agent must be immediately ready to process user messages after the command finishes. Which single property must you supply in the JSON specification so that the service can route prompts to the correct large language model?
modelinstructionsmanagedIdentitymemoryStore
Answer Description
When you create an agent with the Azure AI Foundry Agent Service you must identify which large language model the runtime will call. The CLI therefore requires that the JSON specification include an underlying chat model reference (for example, gpt-35-turbo or gpt-4o). Without the model element the creation request is rejected because the service cannot determine where to send user prompts. Properties such as an instruction set, a memory store, or an Azure AD-backed managed identity are optional at creation time and can be added or updated later.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the Azure AI Foundry Agent Service used for?
How do you specify a large language model when creating an agent?
What optional properties can be added to an agent later?
An accounts payable team has thousands of vendor invoices in PDF and JPEG formats. They need to automatically identify and extract the invoice number, vendor name, due date, and total amount as JSON so that they can push the data into an ERP system. They prefer a managed Azure service that requires minimal custom model training. Which Azure service should you recommend?
Azure AI Language service - Named Entity Recognition
Azure AI Document Intelligence (formerly Form Recognizer) pre-built Invoice model
Azure AI Vision Read OCR API
Azure Cognitive Search indexing pipeline with built-in OCR skill
Answer Description
Azure AI Document Intelligence is purpose-built to extract structured data such as key-value pairs, tables, and line items from forms and business documents, including invoices. It can return the identified fields as JSON with little or no custom model training through its pre-built Invoice model. The Read OCR capability in Azure AI Vision only returns raw text; you would still need custom logic to locate and label invoice fields. Named Entity Recognition in Azure AI Language works on already extracted plain text and is designed to find entities such as people or locations, not document-layout-based fields. Azure Cognitive Search focuses on indexing and searching content; while it can orchestrate enrichment skills, it is not the dedicated service for high-accuracy field extraction from invoices.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the Azure AI Document Intelligence pre-built Invoice model?
Why can't the Azure AI Vision Read OCR API be used for this task?
What is the difference between Azure AI Document Intelligence and Azure Cognitive Search?
You are developing an Azure Function that calls the Azure AI Vision (Computer Vision) v3.2 Analyze Image REST endpoint. For every uploaded photo, the function must return 1) bounding-box coordinates for each detected object and 2) a list of descriptive tags for the whole image, all in a single request. Which value should you provide for the visualFeatures query parameter to meet the requirement?
objects
categories,tags
objects,tags
description,objects
Answer Description
The Analyze Image endpoint lets you request multiple analysis operations at once by supplying a comma-separated list to the visualFeatures parameter. To receive both bounding boxes (object detection) and descriptive image tags in the same response, you must include both Objects and Tags in that list. Supplying only one of the feature names-or unrelated features such as Categories-will omit the other required data, and passing multiple values in separate requests defeats the requirement to use a single call.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the Azure AI Vision Analyze Image endpoint?
What does the 'visualFeatures' parameter do in Azure AI Vision Analyze Image API?
What is the difference between 'objects' and 'tags' in the Analyze Image API?
You have trained an object-detection project by using Custom Vision in Azure AI Vision. The model will be used on production-line cameras inside a factory network that has no reliable Internet connectivity. Inference must execute locally with less than 100 ms latency and without sending images to the cloud. Which deployment approach should you use?
Import the model into an Azure OpenAI resource and call it with chat completions from the production-line controllers.
Convert the model to ONNX and deploy it to a managed online endpoint in Azure Machine Learning.
Export the model and run it in the Azure AI Vision Docker container on an Azure Stack Edge or IoT Edge device within the factory.
Publish the model to the Custom Vision cloud prediction endpoint and invoke it from the factory over HTTPS.
Answer Description
Running the Custom Vision runtime container on an edge device keeps all inference on-premises, eliminates the need for constant Internet connectivity, and provides sub-second latency. Publishing to the cloud prediction endpoint or to an AML managed endpoint still requires outbound connectivity and adds network latency. Azure OpenAI cannot host vision models, so that option is not applicable.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is an Azure AI Vision Docker container?
What is an Azure Stack Edge or IoT Edge device?
Why is it important to use local inference for this scenario?
You deployed an Azure OpenAI resource that serves multiple internal applications. The security team needs a weekly report that shows how many user prompts or completions were blocked by the built-in content filters and which harmful content category was responsible for each block. You will build the report by querying Azure Monitor workbooks. In the Azure portal, which configuration step should you perform first to ensure the necessary data is collected?
Enable the Content Safety option in the Networking blade of the Azure OpenAI resource.
Assign an Azure Policy that audits requests containing blocked content for the resource group.
Create a diagnostic setting for the Azure OpenAI resource that sends the ContentFiltering log category to a Log Analytics workspace.
Configure a diagnostic setting in Azure Key Vault and link the Azure OpenAI resource to that setting.
Answer Description
Azure Monitor workbooks can only query data that has been sent to a Log Analytics workspace. An Azure OpenAI resource emits content-filter events through the ContentFiltering log category. By creating a diagnostic setting on the resource, selecting the ContentFiltering category, and routing the logs to a Log Analytics workspace, you persist every allow, block, or safe-complete decision together with its category and severity. Networking settings, Key Vault diagnostic settings, or Azure Policy assignments do not collect or store the required filter telemetry, so they will not populate the workbook.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the ContentFiltering log category in Azure OpenAI?
What is a Log Analytics workspace in Azure Monitor?
Why is a diagnostic setting needed for logging in Azure OpenAI?
Your team is building a voice-activated kiosk that must remain offline until the customer says "Hey Woodgrove". You trained the wake word in Speech Studio and downloaded the generated Woodgrove.table file. Using the Azure Speech SDK for C#, which implementation meets the requirement to detect the wake word locally without sending audio to the cloud?
Instantiate a KeywordRecognizer with an AudioConfig and supply a KeywordRecognitionModel created from Woodgrove.table.
Instantiate an IntentRecognizer, assign your Conversational Language Understanding project ID, and set the KeywordModelName property to Woodgrove.table.
Instantiate a SpeechRecognizer with AutoDetectSourceLanguage and load Woodgrove.table as a grammar file.
Instantiate a DialogServiceConnector in listen mode and set the Keyword to "Hey Woodgrove".
Answer Description
Keyword spotting is performed completely on the client device. In the Speech SDK you create a KeywordRecognitionModel from the .table file that Speech Studio produces for the custom wake word, and then pass that model to a KeywordRecognizer (or a SpeechRecognizer started with StartKeywordRecognitionAsync) so that audio is evaluated locally until the keyword is detected. The other options would either rely on cloud processing (IntentRecognizer, DialogServiceConnector) or use APIs that do not accept a keyword model (.table files cannot be loaded as grammars or language-detection resources). Therefore, only the combination of KeywordRecognizer and KeywordRecognitionModel satisfies the offline wake-word requirement.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a KeywordRecognitionModel in Azure Speech SDK?
What is the role of KeywordRecognizer in detecting wake words locally?
Why can’t IntentRecognizer or SpeechRecognizer be used for offline wake word detection?
You have deployed a custom Question Answering project to a language resource named lang-prod in the East US region. You want to query the knowledge base from a C# console app by using the Azure.AI.Language.QuestionAnswering client SDK. Which configuration values must you pass when constructing the QuestionAnsweringClient instance so that the application can successfully reach your published deployment?
The authoring key for the Language Studio workspace and the resource's region (East US)
The project name and the deployment name of the Question Answering model
The resource endpoint URI and an AzureKeyCredential built from the language resource key
The Azure subscription ID and the resource group name that contains lang-prod
Answer Description
The QuestionAnsweringClient constructor requires two parameters that allow the SDK to authenticate and route the request: the HTTPS endpoint URI of the Azure AI Language resource and an AzureKeyCredential that contains one of the resource keys. The project name and deployment name are supplied later when you call the client's QueryKnowledgeBaseAsync method, while the resource's region is implicit in the endpoint URL. The subscription ID and authoring key are not used by the runtime SDK.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is AzureKeyCredential, and how is it used?
What is the resource endpoint URI, and how do you find it for your Azure resources?
How do you use the QuestionAnsweringClient to query a knowledge base in C#?
You need to choose a model in Azure AI Foundry to generate 1024×1024 photorealistic images for marketing. The model must embed C2PA provenance metadata in each image and rely on Microsoft's built-in content-safety filters. Which catalog model meets all the requirements?
DALL-E 3 (Azure OpenAI)
Stable Diffusion XL 1.0
Llama 2-70B-Chat
GPT-4 Turbo 128k
Answer Description
DALL-E 3 offered through Azure OpenAI is the only catalog model that both embeds C2PA metadata in every generated image and is integrated with Microsoft's image content-safety filters. Stable Diffusion XL can reach the required resolution but lacks automatic C2PA credentials and does not use the built-in Azure OpenAI safety pipeline. GPT-4 Turbo and Llama 2-70B-Chat are text-only and cannot produce images.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is C2PA provenance metadata?
How do Microsoft's content-safety filters work in Azure AI?
What types of models are offered through Azure AI Foundry?
You published an Azure AI Foundry project that contains a prompt flow named "summarize_docs" and successfully validated it in the Foundry portal. You now want to invoke the flow from a Python application by using the Azure AI Foundry SDK with the following code snippet:
from azure.ai.foundry import FoundryClient
from azure.identity import DefaultAzureCredential
client = FoundryClient(
endpoint = os.environ["FOUNDRY_ENDPOINT"],
credential = DefaultAzureCredential()
)
flow = client.get_prompt_flow("summarize_docs")
result = flow.invoke({"input_text": content})
When the invoke call runs, it raises an HTTP 404 error that states that no online deployment exists for the flow.
In the Foundry portal, which action must you take before the code will work without modification?
Deploy the "summarize_docs" flow to an online endpoint.
Export the project as an Azure Resource Manager (ARM) template and redeploy it.
Promote the flow from the dev stage to the staging stage.
Regenerate the Foundry workspace primary access key.
Answer Description
The Azure AI Foundry SDK can invoke a prompt flow only after the flow is deployed as an online endpoint. Publishing or validating a flow makes it available for manual tests in the portal but does not provision the fully managed inference endpoint that the SDK targets. Selecting Deploy > Online in the portal (or calling the corresponding deploy_online method in the SDK) creates the endpoint and activates the REST and SDK surface so the invoke operation resolves. Other actions such as exporting the flow, promoting it to staging, or regenerating credentials do not create an endpoint and therefore would still result in a 404 error.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is an online endpoint in Azure AI Foundry?
How do you deploy a prompt flow as an online endpoint in Azure AI Foundry?
What is the purpose of the `DefaultAzureCredential` in the code snippet?
You need to build a content-understanding pipeline that ingests thousands of JPG images, PDF documents, and MP4 videos from a single Azure Blob Storage container. For every file the solution must extract spoken or written text, identify key topics, and store the results in one Azure AI Search index so users can search across all modalities. Which combination of Azure AI services minimizes custom code?
Azure AI Video Indexer only, configured to output insights to JSON
Azure AI Search indexer with an OCR + Key Phrase skillset for JPG/PDF files, plus Azure AI Video Indexer for MP4 files
Azure AI Document Intelligence prebuilt Read model for JPG and PDF files, plus Azure AI Speech to Text for MP4 files
Azure AI Vision Image Analysis for images and PDFs together with Azure AI Language service for topic detection
Answer Description
An Azure AI Search indexer can connect to the blob container and run a skillset that includes the built-in OCR skill (backed by Azure AI Vision) and the Key Phrase Extraction skill (backed by Azure AI Language). This automatically reads text in JPG and PDF files and generates topic keywords, then writes the enriched output to the target search index without additional code. Azure AI Video Indexer indexes MP4 files, producing speech-to-text transcripts, detected topics, and other insights. Its REST API or sample power-skill can export those insights directly into the same search index. Together, these two services satisfy all requirements while requiring minimal orchestration.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Azure AI Search Indexer?
How does Azure AI Video Indexer work for MP4 files?
What are Azure AI skillsets and how do they enhance processing?
You deploy a Python web API that queries an Azure OpenAI gpt-35-turbo deployment. You must capture the following for every completion request so that your operations team can investigate latency spikes and analyze prompt quality in Application Insights:
- total processing time on the Azure OpenAI side
- number of prompt and completion tokens used
- full prompt text and model response (truncated to 8 kB)
You plan to use OpenTelemetry-based distributed tracing, which is already configured to export spans to the same Application Insights instance that the rest of the web API uses.
Which single action should you perform in the Python project to ensure the required data is captured for each call to Azure OpenAI?
Add the azure-core-tracing-opentelemetry package and import its automatic patching helper at application startup.
Enable diagnostic logging on the Azure OpenAI resource and configure a Log Analytics workspace.
Install the opencensus-ext-azure package and configure the Azure exporter.
Add correlation ID headers manually to every request and write a custom middleware that records timings and headers.
Answer Description
The Azure SDKs emit OpenTelemetry spans only when a tracing implementation is attached. Installing and importing the azure-core-tracing-opentelemetry package automatically patches all Azure SDK client libraries-including azure-ai-openai-to create detailed spans for each service call. These spans include service-side latency (the value of the "request_process_time" response header), token usage (values in the "x-ms-usage-tokens-prompt" and "x-ms-usage-tokens-completion" headers), and the request/response bodies up to 8 kB. Because your project already initialises an OpenTelemetry exporter for Application Insights, adding this package is the only required step. Other options either capture only logs, require manual span creation, or send data to a different monitoring solution, so they do not meet the requirements.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is azure-core-tracing-opentelemetry?
How does OpenTelemetry-based distributed tracing work?
What kind of data does the Azure OpenAI SDK provide for monitoring?
You trained a custom speech-to-text model in Speech Studio for en-US and deployed it, receiving a deployment (endpoint) ID. A C# desktop app creates a SpeechConfig instance by calling SpeechConfig.FromSubscription(key, region) and then instantiates a SpeechRecognizer for real-time recognition. To make sure the app uses your custom model instead of the base model, which SDK property should you set before creating the SpeechRecognizer?
Append the deployment ID to the subscription key that SpeechConfig.FromSubscription uses.
Assign the deployment ID to the SpeechConfig.EndpointId property.
Attach a Recognized event handler that sets a DeploymentId property on each recognition result.
Set SpeechConfig.SpeechRecognitionLanguage to the deployment ID value.
Answer Description
The Speech SDK selects a custom speech-to-text model when the client specifies the model's endpoint ID. This is done by assigning the deployment (endpoint) ID to the SpeechConfig.EndpointId property and then passing that SpeechConfig object to the SpeechRecognizer constructor. Modifying SpeechRecognitionLanguage only chooses a base language; adding the ID to the subscription key or to event handlers has no effect on model selection, so those approaches will still route audio to the standard model.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the SpeechConfig.EndpointId property used for?
How does SpeechRecognizer interact with custom speech models?
Why doesn’t SpeechConfig.SpeechRecognitionLanguage choose a custom model?
Your company is containerizing a line-of-business application in Azure Kubernetes Service (AKS). The application must call an Azure AI Foundry Service endpoint at runtime, but security standards forbid embedding or storing access keys. All calls must be authenticated through Azure AD and credentials must rotate automatically. What should you configure to satisfy these requirements?
Generate an API key for the AI Foundry resource, store the key in Azure Key Vault, and inject it into the pods as an environment variable.
Enable the AI Foundry service firewall and allow traffic only from the AKS virtual network.
Create a shared access signature (SAS) token for the AI Foundry endpoint and distribute it to the application at deployment time.
Configure Azure AD workload identity by assigning a user-assigned managed identity to the AKS cluster and granting it the Cognitive Services User role on the Azure AI Foundry resource.
Answer Description
Using a user-assigned managed identity lets the AKS workload obtain an OAuth 2.0 access token from Azure AD without storing any secrets. After you assign the identity to the AKS cluster and grant it the Cognitive Services User role on the Azure AI Foundry resource, the application can request tokens and call the endpoint. Keys, SAS tokens, or IP firewalls do not meet the requirement to avoid static credentials or provide automatic rotation.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a user-assigned managed identity in Azure?
How does Azure AD OAuth 2.0 access tokens work with Azure services?
What is the Cognitive Services User role in Azure?
That's It!
Looks like that's it! You can go back and review your answers or click the button below to grade your test.