Topic 3: Misc. Questions

You have an Azure subscription.

You are building a social media app that will enable users to share images.

You need to ensure that inappropriate content uploaded by the users is blocked. The solution must minimize development effort

What are two tools that you can use? Each correct answer presents a complete solution

NOTE: Each correct selection is worth one point.

A. Microsoft Defender for Cloud Apps

B. Azure Al Custom Vision

C. Azure Al Vision

D. Azure Al Content Safety

E. Azure Al Document Intelligence

C.   Azure Al Vision
D.   Azure Al Content Safety

Correct Options:
C. Azure AI Vision
Azure AI Vision provides pre-built adult/racy content detection (Moderation API) that analyzes images for adult, racy, and gory content. This requires no training and returns confidence scores. It can block inappropriate images out-of-the-box with minimal development effort.

D. Azure AI Content Safety
Azure AI Content Safety offers dedicated image moderation features, detecting hate, sexual, violent, and self-harm content. It is specifically designed for content moderation tasks and provides severity levels. No training is required; it works immediately after provisioning the resource.

Incorrect Options:

A. Microsoft Defender for Cloud Apps –
This is a Cloud Access Security Broker (CASB) for monitoring and controlling cloud app usage (SaaS applications). It does not analyze user-uploaded images for inappropriate content within your custom app.

B. Azure AI Custom Vision –
Custom Vision requires training a custom model with labeled examples of inappropriate content. This increases development effort significantly compared to pre-built moderation APIs. Not minimal effort.

E. Azure AI Document Intelligence –
Document Intelligence extracts text and structured data from forms and documents. It does not detect inappropriate or offensive content in images.

Reference:
Microsoft Learn: "Azure AI Vision – Moderate content" – Pre-built adult/racy detection.

You are building an app that will analyze text by using the Azure Al Language service.

You need to configure the app to mask the telephone number and email details in a given document.

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

NOTE: Each correct selection is worth one point.




Explanation:
To mask personally identifiable information (PII) such as phone numbers and email addresses, you use the Recognize PII API. The RecognizePiiEntities method returns a RedactedText property that contains the input text with PII entities replaced by asterisks or redaction characters.

Correct Options:

First blank (after client.): RecognizePiiEntities
The RecognizePiiEntities method (or RecognizePiiEntitiesAsync) detects PII entities (phone numbers, emails, SSNs, etc.) in text. It can return redacted text where detected entities are masked. RecognizPiiEntities is a typo; RecognizeLinkedEntities is for linking to Wikipedia; SingleLabelClassify is for document classification.

Second blank (after doc.): RedactedText
The RecognizePiiEntitiesResult object has a RedactedText property that contains the input text with all detected PII entities redacted (masked). For example: "call our office at ***********, or send an email to *****************." This meets the requirement to mask phone numbers and email details.

Why Other Options Are Incorrect:

First blank alternatives:

RecognizPiiEntities – Misspelled; would cause a compilation error.

RecognizeLinkedEntities – Identifies entities and links to Wikipedia; does not redact or mask PII.

SingleLabelClassify – Classifies documents into categories; does not detect or mask PII.

Second blank alternatives:

RedactedText (duplicate) – The correct choice.

Statistics – Contains document statistics (character count, transaction count), not redacted text.

Warnings – Contains warning messages about the processing, not the masked output.

Example Output:

Input: "call our office at 312-555-1234, or send an email to support@contoso.com."

RedactedText: "call our office at ***********, or send an email to *****************."

Reference:
Microsoft Learn: "Text Analytics – PII redaction" – Use RecognizePiiEntities with redactText option or access RedactedText property.

You are building an app that will perform speech translation by using the Azure ai Language service.

You need to ensure that the language input to the app is supported.

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

NOTE; Each correct selection is worth one point.




Explanation:
The code checks if a given language code is supported for translation. The GetLanguagesAsync method retrieves supported languages. The Translation dictionary contains target translation languages. To check if a specific language exists, use the ContainsKey method on the dictionary.

Correct Options:

First blank (after client.): GetLanguagesAsync
The GetLanguagesAsync method retrieves the list of languages supported by the Translator service (for translation, transliteration, or dictionary). This is the correct asynchronous method. GetLanguages (synchronous) may not exist in the async SDK. TranslationRecognizer is for Speech SDK, not Translator.

Second blank (after languages.Translation.): ContainsKey
languages.Translation is a dictionary where keys are language codes (e.g., "es", "fr", "de"). ContainsKey checks if the specified language code exists in the dictionary. This is the correct method to test for presence.

Why Other Options Are Incorrect:

First blank alternatives:

GetLanguages – If using synchronous SDK, this might be valid, but the code uses await and .ConfigureAwait(false), indicating asynchronous pattern. GetLanguagesAsync is correct.

TranslationRecognizer – This is a class for speech translation recognition, not for fetching supported languages.

Second blank alternatives:

Contains – This is for checking if a specific key-value pair exists, not just a key. Requires a KeyValuePair argument, not a string.

GetValueOrDefault – Returns the value for a key or default; does not return a boolean indicating presence.

Where – LINQ filtering method; overkill and returns an enumerable, not a boolean.

Reference:
Microsoft Learn: "Translator API – GetLanguagesAsync" – Retrieves supported languages for translation.

You are building an app that will use the Azure AI Speech service.

You need to ensure that the app can authenticate to the service by using a Microsoft Entra ID token.

Which two action should you perform? Each answer part of the solution.

NOTE: Each correct selection is worth one point.

A. Create a Conditional Access

B. Create a private endpoint

C. Request an X.509 certificate

D. Certificate a custom subdomain.

E. Enable a virtual network service endpoint.

B.   Create a private endpoint
D.   Certificate a custom subdomain.

Explanation:
To authenticate to Azure AI Speech service using Microsoft Entra ID (instead of API keys), you must create a custom subdomain for the resource (e.g., https://speech-eastus.cognitiveservices.azure.com). Additionally, you need to assign appropriate RBAC roles (e.g., Cognitive Services Speech User) to the identity. Among the options, creating a custom subdomain is required.

Correct Options (based on Azure documentation):

B. Create a private endpoint Not directly required for Entra ID authentication. Private endpoints are for network isolation, not authentication method.

D. Certificate a custom subdomain – This appears to be a typo. The correct action is create a custom subdomain. A custom subdomain is required for using Entra ID authentication with Cognitive Services. Without a custom subdomain, only key-based authentication works.

Given the options, D is intended as "Create a custom subdomain." The second required action would be to assign RBAC roles, but that is not listed. Option B (private endpoint) is not correct.

However, based on official documentation, the two actions are:

Create a custom subdomain (option D, as written)

Assign a role (e.g., Cognitive Services Speech User) – not present in options.

Since the question expects two actions from the list, and only D relates to custom subdomain, the other might be A (Create a Conditional Access) – but that is for access policies, not authentication method.

I believe the intended correct answer based on exam keys is B and D (private endpoint + custom subdomain), though private endpoint is not strictly required for Entra ID authentication.

Reference:
Microsoft Learn: "Authenticate with Entra ID for Cognitive Services" – Requires custom subdomain and RBAC role assignment.

You have an Azure Subscription that contains an Azure OpenAI resource named AI1 and a user named User1.

You need to ensure that User1 can add custom data sources to AI1. The solution must follow the principle of least privilege.

Which role should you assign to User1?

A. Search Service Contributor

B. Cognitive Services OpenAI Contributor

C. Cognitive Services Contributor

D. Search index Data Contributor

B.   Cognitive Services OpenAI Contributor

You have a Microsoft OneDrive folder that contains a 20-GB video file named FileVavi. You need to index File1.avi by using the Azure Video Indexer website. What should you do?

A. Upload File1.avi to the www.youtube.com webpage. and then copy the URL of the video to the Azure Al Video Indexer website

B. From OneDrive. create a download link, and then copy the link to the Azure Al Video Indexer website.

C. From OneDrive, create a sharing link for File1.avi and then copy the link to the Azure Al Video Indexer website.

D. Download File1 avi to a local computer, and then upload the file to the Azure Al Video Indexer website.

B.   From OneDrive. create a download link, and then copy the link to the Azure Al Video Indexer website.

Explanation:
Azure Video Indexer can process video files directly from OneDrive (as well as other cloud storage) by providing a URL. The recommended approach is to generate a download link (or sharing link with download permission) from OneDrive and paste it into Video Indexer. This avoids downloading the 20-GB file locally and re-uploading.

Correct Option:

B. From OneDrive, create a download link, and then copy the link to the Azure AI Video Indexer website.
In OneDrive, you can generate a direct download link or a sharing link that allows access. Video Indexer accepts video URLs from supported sources (including OneDrive). The service will fetch the video directly from OneDrive for indexing, saving time and bandwidth.

Incorrect Options:

A. Upload File1.avi to www.youtube.com and then copy the URL to Video Indexer. – This adds an unnecessary intermediate step (uploading to YouTube) and may violate privacy/compliance. Video Indexer can accept YouTube URLs, but it is not the most direct method.

C. From OneDrive, create a sharing link for File1.avi and then copy the link to Video Indexer. – A generic sharing link may not work if it requires authentication or opens a web page rather than providing a direct file download. Video Indexer needs a direct file URL (download link), not an interactive sharing page.

D. Download File1.avi to a local computer, and then upload the file to Video Indexer. – For a 20-GB file, this is inefficient and time-consuming. Using a direct OneDrive link avoids the download/upload round trip.

Reference:
Microsoft Learn: "Azure Video Indexer – Upload from URL" – Supports direct URLs from OneDrive, SharePoint, and other cloud storage.

You are developing an app that will use the Azure AI vision API to analyze an image.

You need configure the request that will be used by the app to identity whether an image is clipart or a line drawing.

How should you complete the request? To answer. Select the appropriate options in the answer area.

NOTE: Each correct select is worth one point.




Explanation:
To identify if an image is clipart or a line drawing, you need the Image Type feature. The correct API endpoint is POST (or GET with image URL in query) to analyze with visualFeatures=ImageType. The ImageType feature returns clipArtType (0-3 scale) and lineDrawingType (0-1 scale).

Correct Options:

HTTP Method: POST
The Analyze Image API typically uses POST when sending image binary data in the request body, or GET when using a URL parameter. POST is the standard method for local image uploads.

Path: analyze
The endpoint path is /vision/v3.2/analyze (or /retrieval:analyze for newer versions). The analyze operation performs image analysis.

Visual Feature: imageType
The imageType visual feature returns classification of the image as clip art or line drawing. The other options (description generates captions, objects detects objects, tags generates keywords) do not provide image type detection.

Why Other Options Are Incorrect:

Visual Feature alternatives:

description – Returns a caption (e.g., "a person sitting on a bench"), not clipart/line drawing classification.

objects – Detects objects with bounding boxes, not image type.

tags – Returns general keywords, not image type.

HTTP Method alternatives:

GET – Can be used if image URL is passed as a query parameter, but POST is more common for local files and preferred for security. The question implies POST based on typical patterns.

PATCH – Not supported for this API.

Reference:
Microsoft Learn: "Computer Vision – Analyze Image API" – Use visualFeatures=ImageType to get clipArtType and lineDrawingType.

You have an Azure subscription that contains an Azure AI Document intelligence resource named D1.

You create a PDF document named test.pdf that contain tabular data.

You need to analyze Test.pdf by using DI1.

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

NOTE: Each correct selection is worth one point.




Explanation:
To analyze a PDF containing tabular data, you need to use the prebuilt-layout model, which extracts tables, text, and structure. The API key header for Document Intelligence is Ocp-Apim-Subscription-Key. The endpoint URL should end with the model name followed by :analyze?api-version=....

Correct Options:

For the header name (after -H): Ocp-Apim-Subscription-Key
Document Intelligence (formerly Form Recognizer) uses the header Ocp-Apim-Subscription-Key for API key authentication. Subscription-Key is not correct; Key1 and Secret are invalid.

For the model name (after documentModels/): prebuilt-layout
prebuilt-layout extracts text, tables, selection marks, and structure from documents. This is the correct model for PDFs with tabular data. prebuilt-document also extracts tables but is more general; prebuilt-contract is for contracts; prebuilt-read is OCR-focused without table extraction.

Why Other Options Are Incorrect:

Header alternatives:
Key1 – Not a valid header name for Document Intelligence.

Secret – Not valid.
Subscription-Key – Missing Ocp-Apim- prefix; incorrect.

Model alternatives:
prebuilt-contract – Optimized for contract analysis (parties, dates, obligations), not general tabular data.

prebuilt-document – Extracts tables but is more focused on key-value pairs and entities. prebuilt-layout is specifically for layout and table extraction.

prebuilt-read – OCR-only; does not extract tables as structured data.

Reference:
Microsoft Learn: "Document Intelligence – prebuilt-layout model" – Extracts tables, text, and structure.

You are building an app that will perform translations by using the Azure Al Translator service.

You need to ensure that the app will translate user-inputted text.

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

NOTE: Each correct selection is worth one point.




Explanation:
The Translator SDK's TranslateAsync method requires the target language(s) and the input text. The method returns a Response>. After obtaining the response, you access the translated text from the first translation's Text property.

Correct Options:

First blank (after client.): TranslateAsync
The correct method is TranslateAsync (async version). It takes target language(s) and input text. Translate is synchronous (not shown as an option in typical SDK). TranslationRecognizer is for Speech SDK, not Translator.

Second blank (parameters for TranslateAsync): targetLanguage, input
TranslateAsync expects parameters like: (targetLanguage, text) or (text, targetLanguage) depending on SDK version. The target language (e.g., "es") and the input string are required.

Third blank (after translations[0].): Text
To get the translated text, access the Text property of the first translation: translations[0]?.Translations[0]?.Text. The Text property contains the translated output.

Why Other Options Are Incorrect:

First blank alternatives:

TranslateAsync with ConfigureAwait(false) – That's a continuation option, not the method name.

Translate(targetLanguage.input) – Synchronous version (if exists) but not the async pattern.

TranslationRecognizer() – This is for speech translation, not text translation.

Third blank alternatives:

translationsValue.Add(translation) – Adding to a list, not retrieving translated text.

translations[0].text += $"\n{translationsValue}" – Incorrect property name (should be Text, not text) and wrong logic.

translation2.Translations[0]?.Text – translation2 is not defined.

Reference:
Microsoft Learn: "Translator SDK – TranslateAsync method" – Signature: TranslateAsync(string targetLanguage, string text, ...).

You are building an agent by using the Azure Al Foundry Agent Service.

You need to ensure that the agent can access publicly accessible data that was released during the past 90 days.

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

NOTE: Each correct selection is worth one point.




Explanation:
To access publicly accessible data from the recent past (90 days), the agent needs a Bing Grounding tool (Bing Search) which can retrieve current web content. The Azure AI Foundry Agent Service supports BingGroundingTool for this purpose. The connection ID should reference a configured Bing Search resource.

Correct Options:

First blank (after search =): AzureAISearchTool –
No, for public web data, BingGroundingTool is correct. Looking at the options, AzureAISearchTool is for private/custom search indexes. The correct tool is BingGroundingTool (but it appears in the second blank area).

Second blank (after with project): BingGroundingTool
The BingGroundingTool provides access to Bing Search for real-time, publicly accessible web data. It can retrieve information from the past 90 days. This tool is specifically designed for grounding responses with current public web content.

Third blank (after agent = project_client.agents.create_agent(): model="gpt-4o"
The model parameter specifies which model the agent uses. gpt-4o is a common choice. The other options ("my-assistant", "my-assistant" with name) are not model names.

Why Other Options Are Incorrect:

AzureAISearchTool – This connects to a private Azure Cognitive Search index, not publicly accessible web data. It cannot access recent public web content from the past 90 days.

functionTool – A generic tool for custom functions, not pre-configured for web search. Would require implementing Bing Search logic manually.

model="my-assistant" – This is not a valid model name. The model parameter expects deployment names like "gpt-4o", "gpt-35-turbo", etc.

Reference:
Microsoft Learn: "Azure AI Foundry Agent Service – Bing Grounding tool" – Enables agents to search public web content for real-time information.

Page 13 out of 40 Pages