AI-102 Implement natural language processing solutions • Complete Question Bank
Complete AI-102 Implement natural language processing solutions question bank — all 0 questions with answers and detailed explanations.
Refer to the exhibit.
{
"version": "2.0",
"analysis": {
"entities": [
{
"category": "Person",
"text": "John Doe",
"offset": 0,
"length": 8,
"confidenceScore": 0.99
},
{
"category": "Person",
"text": "Jane Smith",
"offset": 20,
"length": 10,
"confidenceScore": 0.45
}
]
}
}Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag a concept onto its matching description — or click a concept then click the description.
Language Understanding Intelligent Service
Service to create a question and answer bot
Service to build custom image classifiers
Convert spoken language to text
Extract insights from text like key phrases
Refer to the exhibit.
```json
{
"analysisInput": {
"documents": [
{
"id": "1",
"text": "The quick brown fox jumps over the lazy dog.",
"language": "en"
}
]
},
"tasks": [
{
"taskName": "EntityRecognition",
"kind": "EntityRecognition",
"parameters": {
"modelVersion": "2022-10-01",
"stringIndexType": "TextElement_V8"
}
},
{
"taskName": "KeyPhraseExtraction",
"kind": "KeyPhraseExtraction",
"parameters": {
"modelVersion": "2024-01-01"
}
}
]
}
```Refer to the exhibit.
```json
{
"customModels": {
"entities": [
{
"category": "Product",
"subcategory": "Electronics",
"name": "Laptop"
},
{
"category": "Product",
"subcategory": "Electronics",
"name": "Smartphone"
}
],
"relations": [
{
"relationType": "InstanceOf",
"source": "Laptop",
"target": "Electronics"
},
{
"relationType": "InstanceOf",
"source": "Smartphone",
"target": "Electronics"
}
]
}
}
```Refer to the exhibit.
```json
{
"kind": "Conversation",
"analysisInput": {
"conversationItem": {
"id": "1",
"participantId": "user",
"text": "Book a flight from Seattle to New York on June 15th."
}
},
"parameters": {
"projectName": "FlightBooking",
"deploymentName": "production",
"stringIndexType": "TextElement_V8"
}
}
```{
"kind": "ExtractiveSummarization",
"parameters": {
"sentenceCount": 3,
"sortBy": "Offset"
},
"analysisInput": {
"documents": [
{
"id": "1",
"language": "en",
"text": "Azure AI Language provides natural language processing capabilities. It includes summarization, sentiment analysis, and entity recognition. These features enable developers to build intelligent applications."
}
]
}
}{
"kind": "ConversationalLanguageUnderstanding",
"parameters": {
"projectName": "SupportBot",
"deploymentName": "production",
"verbose": true
},
"analysisInput": {
"conversationItem": {
"id": "1",
"participantId": "user",
"text": "I want to cancel my order #12345"
}
}
}{
"kind": "EntityLinking",
"parameters": {
"modelVersion": "latest"
},
"analysisInput": {
"documents": [
{
"id": "1",
"language": "en",
"text": "Microsoft Azure provides AI services."
}
]
}
}{
"parameters": {
"projectName": "InvoiceExtractor",
"deploymentName": "production",
"api-version": "2023-04-01",
"body": {
"analysisInput": {
"documents": [
{"id": "1", "language": "en", "text": "Invoice #1234 dated 01/15/2023 for $500.00 from Acme Corp."}
]
},
"parameters": {
"modelVersion": "latest"
}
}
}
}{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.CognitiveServices/accounts",
"apiVersion": "2022-12-01",
"name": "myLanguageService",
"location": "[resourceGroup().location]",
"sku": {
"name": "S0"
},
"kind": "TextAnalytics",
"properties": {
"customSubDomainName": "mylanguageservice",
"networkAcls": {
"defaultAction": "Deny",
"virtualNetworkRules": [],
"ipRules": []
}
}
}
]
}{
"parameters": {
"api-version": "2023-04-01",
"body": {
"displayName": "MyConversationProject",
"projectName": "SupportBot",
"settings": {
"confidenceThreshold": 0.7
},
"multilingual": true,
"language": "en-us"
}
}
}Refer to the exhibit.
{
"kind": "Conversation",
"analysisInput": {
"conversationItem": {
"id": "1",
"text": "I need to book a flight to Seattle for next Monday.",
"modality": "text",
"language": "en"
}
},
"parameters": {
"projectName": "FlightBooking",
"deploymentName": "production"
}
}Refer to the exhibit.
$endpoint = "https://mytextanalytics.cognitiveservices.azure.com/"
$key = "myKey"
$headers = @{
"Ocp-Apim-Subscription-Key" = $key
"Content-Type" = "application/json"
}
$body = @{
"documents" = @(
@{
"id" = "1"
"text" = "The product is excellent and very useful."
"language" = "en"
}
)
} | ConvertTo-Json
$uri = "$endpoint/text/analytics/v3.1/sentiment"
$response = Invoke-RestMethod -Uri $uri -Method Post -Headers $headers -Body $bodyRefer to the exhibit.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"sku": {
"type": "string",
"defaultValue": "S"
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]"
}
},
"resources": [
{
"type": "Microsoft.CognitiveServices/accounts",
"apiVersion": "2023-05-01",
"name": "myLanguageService",
"location": "[parameters('location')]",
"sku": {
"name": "[parameters('sku')]"
},
"kind": "TextAnalytics",
"properties": {
"customSubDomainName": "mylanguageservice"
}
}
]
}Refer to the exhibit.
{
"displayName": "MyConversationApp",
"analysisInput": {
"conversationItem": {
"text": "Book a flight from Seattle to New York for tomorrow",
"id": "1",
"participantId": "user1"
}
},
"parameters": {
"projectName": "FlightBooking",
"deploymentName": "production"
},
"kind": "Conversation"
}Refer to the exhibit.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.CognitiveServices/accounts",
"apiVersion": "2023-05-01",
"name": "myLanguageService",
"location": "[resourceGroup().location]",
"sku": {
"name": "S"
},
"kind": "TextAnalytics",
"properties": {
"customSubDomainName": "mylanguageservice",
"networkAcls": {
"defaultAction": "Deny"
}
}
}
]
}Refer to the exhibit.
{
"analysisInput": {
"documents": [
{
"id": "1",
"text": "The quick brown fox jumps over the lazy dog. The dog was sleeping.",
"language": "en"
}
]
},
"tasks": [
{
"taskName": "ExtractKeyPhrases",
"kind": "KeyPhraseExtraction",
"parameters": {
"modelVersion": "latest"
}
},
{
"taskName": "AnalyzeSentiment",
"kind": "SentimentAnalysis",
"parameters": {
"modelVersion": "latest"
}
}
]
}Refer to the exhibit.
{
"apiVersion": "2024-01-01",
"type": "Microsoft.CognitiveServices/accounts",
"name": "myAIServices",
"location": "eastus",
"sku": {
"name": "S0"
},
"properties": {
"apiProperties": {
"statisticsEnabled": true
},
"networkAcls": {
"defaultAction": "Deny",
"ipRules": []
}
}
}Refer to the exhibit. $az = Get-AzResource -ResourceGroupName 'myRG' -ResourceType 'Microsoft.CognitiveServices/accounts' -Name 'myLangService' $az.Properties.apiProperties.textAnalytics.documentEndpoint = 'https://eastus.api.cognitive.microsoft.com/text/analytics/v3.1/entities/health/general' Set-AzResource -ResourceId $az.ResourceId -Properties $az.Properties -Force
Refer to the exhibit.
{
"displayName": "Support Bot",
"triggers": [
{
"triggerType": "Utterance",
"utterance": "I want to reset my password"
}
],
"actions": [
{
"actionType": "SendMessage",
"message": "Please visit the password reset page."
}
]
}{
"kind": "Conversation",
"analysisInput": {
"conversationItem": {
"id": "1",
"participantId": "user",
"text": "I want to book a flight from Seattle to Boston next Tuesday"
}
},
"parameters": {
"projectName": "FlightBooking",
"deploymentName": "production",
"stringIndexType": "TextElement_V8"
}
}{
"pipeline": {
"name": "text-analytics-pipeline",
"activities": [
{
"name": "AnalyzeSentiment",
"type": "CognitiveService",
"inputs": [{"name": "textColumn", "value": "@activity('GetData').output.text"}],
"outputs": [{"name": "sentimentResult", "value": ""}],
"linkedServiceName": "AzureAILanguageService"
}
]
}
}{
"parameters": {
"api-version": "2023-04-01",
"deployment-id": "myDeployment",
"document": {
"id": "1",
"language": "en",
"text": "The quick brown fox jumps over the lazy dog."
}
},
"endpoint": "https://mytextanalytics.cognitiveservices.azure.com/text/analytics/v3.1/entities/recognition/general"
}Refer to the exhibit. You have the following JSON policy from an Azure AI Language custom entity extraction project evaluation:
{
"evaluation": {
"entities": {
"ProductName": {
"precision": 0.92,
"recall": 0.65,
"f1": 0.76
},
"OrderNumber": {
"precision": 0.88,
"recall": 0.90,
"f1": 0.89
},
"Date": {
"precision": 0.95,
"recall": 0.85,
"f1": 0.90
}
}
}
}Refer to the exhibit. You have the following KQL query for monitoring Azure AI Language service usage: AzureDiagnostics | where ResourceProvider == "MICROSOFT.COGNITIVESERVICES" | where OperationName == "AnalyzeText" | where TimeGenerated > ago(7d) | summarize TotalCalls = count() by bin(TimeGenerated, 1d), StatusCode | render timechart
{
"apiVersion": "2023-04-01",
"kind": "TextAnalysis",
"properties": {
"displayName": "MyTextAnalytics",
"settings": {
"sentimentAnalysis": {
"opinionMining": true
},
"entityRecognition": {
"modelVersion": "latest"
},
"keyPhraseExtraction": {
"modelVersion": "latest"
},
"languageDetection": {
"modelVersion": "latest"
},
"piiRecognition": {
"domain": "phi",
"piiCategories": ["All"]
}
}
},
"location": "eastus"
}You are an AI engineer at a global e-commerce company. The company uses Azure AI Language to analyze product reviews in English, Spanish, and French. The current solution calls the sentiment analysis API for each review individually, resulting in high latency and cost. You need to design a new solution that processes reviews in batches, reduces the number of API calls, and still supports multiple languages. The solution must also extract key phrases and detect the language automatically. You have the following options:
Option A: Use the Azure AI Language synchronous API with the 'multi-language' parameter set to true. Send reviews one by one.
Option B: Use the Azure AI Language asynchronous batch API. Combine all reviews into a single batch request, but only for one language at a time.
Option C: Use the Azure AI Language asynchronous batch API. Send a single batch request with all reviews, setting the 'language' parameter to 'multi' to auto-detect language, and specify sentiment analysis, key phrase extraction, and language detection as tasks.
Option D: Use the Azure AI Translator service to translate all reviews to English, then use the Azure AI Language batch API for English-only sentiment and key phrase extraction.
You are an AI developer at a legal firm. The firm uses Azure AI Language to extract entities from legal documents. The current custom NER model is trained on a small dataset and has low accuracy for certain entity types like 'Statute' and 'Case Citation'. You need to improve the model's performance without increasing the labeling effort significantly. You have the following options:
Option A: Add more labeled examples for the underperforming entity types by manually labeling additional documents.
Option B: Use the prebuilt entity recognition model from Azure AI Language and map its outputs to custom entities.
Option C: Enable active learning in the custom NER project and review the suggested labels from the model.
Option D: Train a new model using the Azure Machine Learning automated ML (AutoML) for text classification.
You are a solution architect at a media company. The company uses Azure AI Speech to generate subtitles for videos. The current solution uses the batch transcription API and takes several hours to process a 1-hour video. The business requires near-real-time subtitles for live streaming events. You need to design a new solution that provides low-latency transcription. You have the following options:
Option A: Use the batch transcription API with a higher priority queue.
Option B: Use the Speech-to-text REST API for real-time streaming with the Speech SDK.
Option C: Use the Azure AI Language API to transcribe audio from a file.
Option D: Use Azure AI Video Indexer to generate subtitles.
{
"displayName": "CustomQuestionAnsweringProject",
"language": "en",
"description": "QnA for HR policies",
"qnaDocuments": [
{
"id": "doc1",
"source": "HR_Handbook.pdf",
"questions": [
{
"question": "What is the vacation policy?",
"answer": "Employees accrue 15 days per year."
}
]
}
]
}{
"documents": [
{
"id": "1",
"keyPhrases": ["Azure", "NLP", "services"],
"warnings": []
},
{
"id": "2",
"keyPhrases": ["Microsoft", "AI"],
"warnings": []
}
],
"errors": []
}{
"documents": [
{
"id": "1",
"entities": [
{
"text": "Seattle",
"type": "Location",
"subtype": null,
"offset": 14,
"length": 7,
"confidenceScore": 0.99
},
{
"text": "Microsoft",
"type": "Organization",
"subtype": null,
"offset": 30,
"length": 9,
"confidenceScore": 0.95
}
],
"warnings": []
}
],
"errors": []
}{
"error": {
"code": "403",
"message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription.",
"innererror": {
"code": "InvalidSubscriptionKey",
"message": "The provided subscription key is not valid for the Cognitive Services resource."
}
}
}