Microsoft

AI-102 Free Practice Questions — Page 5

Question 33

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. Azure AI Document Intelligence
B. Microsoft Defender for Cloud Apps
C. Azure AI Content Safety
D. Azure AI Vision
E. Azure AI Custom Vision
Show Answer
Correct Answer: C, D
Explanation:
The requirement is to block inappropriate images with minimal development effort. Azure AI Content Safety provides ready-made image moderation models for detecting adult, violent, or offensive content without custom training. Azure AI Vision includes built-in adult/racy content detection for images. Both are turnkey services. Document Intelligence focuses on documents, Defender for Cloud Apps is for SaaS security, and Custom Vision requires model training, increasing development effort.

Question 34

You have an Azure subscription that contains an Azure AI Content Safety resource named CS1. You create a test image that contains a circle. You submit the test image to CS1 by using the curl command and the following command-line parameters. What should you expect as the output?

A. 0
B. 0.0
C. 7
D. 100
Show Answer
Correct Answer: A
Explanation:
Azure AI Content Safety image analysis returns an integer severity level when using the default EightSeverityLevels output. The scale ranges from 0 (non-offensive) to 7 (very high severity). A simple image containing only a circle has no unsafe content, so the expected severity output is 0.

Question 35

HOTSPOT - You have a chatbot that uses Azure OpenAI to generate responses. You need to upload company data by using Chat playground. The solution must ensure that the chatbot uses the data to answer user questions. How should you complete the code? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for AI-102 question 35
Show Answer
Correct Answer: ChatCompletion AzureCognitiveSearch
Explanation:
Chat playground with Azure OpenAI uses the ChatCompletion API to handle message-based conversations. To ground responses on uploaded company data, Azure Cognitive Search is used as the data source for retrieval-augmented generation.

Question 36

You have a custom Azure OpenAI model. You have the files shown in the following table. You need to prepare training data for the model by using the OpenAI CLI data preparation tool. Which files can you upload to the tool?

A. File1.tsv only
B. File2.xml only
C. File3.pdf only
D. File4.xlsx only
E. File1.tsv and File4.xslx only
F. File1.tsv, File2.xml and File4.xslx only
G. File1.tsv, File2.xml, File3.pdf and File4.xslx
Show Answer
Correct Answer: A
Explanation:
The OpenAI CLI data preparation tool supports CSV, TSV, JSON, JSONL, and XLSX formats, but only within upload size limits. XML and PDF are not supported. In the given scenario, File1.tsv is a supported format and within size limits. File4.xlsx exceeds the upload size limit (200 MB), so it cannot be uploaded. Therefore, only File1.tsv can be uploaded.

Question 38

HOTSPOT - You are building an app that will automatically translate speech from English to French, German, and Spanish by using Azure AI service. You need to define the output languages and configure the Azure AI Speech service. How should you complete the code? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for AI-102 question 38
Show Answer
Correct Answer: ["fr","de","es"] TranslationRecognizer
Explanation:
Azure Speech Translation requires ISO language codes for target languages. French, German, and Spanish are added as target languages, and speech translation uses a TranslationRecognizer (not intent, speaker, or synthesis).

Question 39

HOTSPOT - 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 identify 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 selection is worth one point.

Illustration for AI-102 question 39
Show Answer
Correct Answer: POST imageType
Explanation:
The Analyze Image API requires a POST request when submitting image data, and the visualFeatures parameter must include imageType to determine whether the image is clipart or a line drawing.

Question 40

You are developing a method that uses the Azure AI Vision client library. The method will perform optical character recognition (OCR) in images. The method has the following code. During testing, you discover that the call to the get_read_result method occurs before the read operation is complete. You need to prevent the get_read_result method from proceeding until the read operation is complete. Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

A. Remove the operation_id parameter.
B. Add code to verify the read_results.status value.
C. Add code to verify the status of the read_operation_location value.
D. Wrap the call to get_read_result within a loop that contains a delay.
Show Answer
Correct Answer: B, D
Explanation:
Azure AI Vision Read (OCR) operations are asynchronous. You must poll until the operation completes before retrieving results. Checking the read_results.status ensures the operation has reached a terminal state (e.g., succeeded), and wrapping get_read_result in a loop with a delay allows repeated polling until completion, preventing premature access to results.

Question 41

You are developing an app that will use the Speech and Language APIs. You need to provision resources for the app. The solution must ensure that each service is accessed by using a single endpoint and credential. Which type of resource should you create?

A. Azure AI Language
B. Azure AI Speech
C. Azure AI Services
D. Azure AI Content Safety
Show Answer
Correct Answer: C
Explanation:
The requirement is to use both Speech and Language APIs while accessing them through a single endpoint and a single set of credentials. An Azure AI Services resource (formerly Cognitive Services multi-service) provides one endpoint and key that can be used across multiple AI services, including Speech and Language. Creating individual Azure AI Speech or Azure AI Language resources would result in separate endpoints and credentials.

Question 43

You have an Azure subscription. You need to build an app that will compare documents for semantic similarity. The solution must meet the following requirements: • Return numeric vectors that represent the tokens of each document. • Minimize development effort. Which Azure OpenAI model should you use?

A. GPT-3.5
B. GPT-4
C. embeddings
D. DALL-E
Show Answer
Correct Answer: C
Explanation:
Document semantic similarity requires converting text into numeric vector representations (embeddings). Azure OpenAI embeddings models are specifically designed to generate dense vector embeddings for tokens and documents, making them ideal for similarity comparisons while minimizing development effort. GPT-3.5 and GPT-4 are generative models, and DALL-E is for image generation, so they do not meet the requirements.

Question 44

HOTSPOT - In Azure OpenAI Studio, you are prototyping a chatbot by using Chat playground. You need to configure the chatbot to meet the following requirements: • Reduce the repetition of words in conversations. • Reduce the randomness of each response. Which two parameters should you modify? To answer, select the appropriate parameters in the answer area. NOTE: Each correct answer is worth one point.

Illustration for AI-102 question 44
Show Answer
Correct Answer: Temperature Frequency penalty
Explanation:
Frequency penalty reduces repetition by lowering the likelihood of repeating the same tokens. Temperature controls randomness; lowering it makes responses more deterministic and less random.

$19

Get all 278 questions with detailed answers and explanations

  • Instant download HTML + PDF delivered the moment payment clears.
  • Secure Stripe checkout we never see or store your card details.
  • 7-day refund if files are defective see our refund policy.