Skip to main content

Challenge 01: Select the Right Azure AI Service

Estimated Time

45 min | Cost: ~$0.50 | Domain: Plan & Manage AI Solutions (20-25%)

Exam skills covered

  • Select the appropriate Azure AI service for a generative AI solution
  • Select the appropriate Azure AI service for a computer vision solution
  • Select the appropriate Azure AI service for a natural language processing solution
  • Select the appropriate Azure AI service for a speech solution
  • Select the appropriate Azure AI service for a document intelligence solution
  • Select the appropriate Azure AI service for a knowledge mining solution

Overview

Azure AI services provide a broad portfolio of cognitive capabilities through pre-built APIs and customizable models. Choosing the right service is critical—using Azure OpenAI for simple text extraction when Document Intelligence exists, or using Computer Vision for tasks better suited to GPT-4o multimodal, leads to unnecessary cost and complexity.

This challenge walks you through the Azure AI service taxonomy, helps you build a mental decision tree, and verifies your ability to programmatically discover and validate available services in a subscription. You'll compare multi-service resources (which provide a single endpoint for multiple capabilities) against single-service resources (which offer service-specific features and isolation).

Understanding the tradeoffs between service types—pricing tiers, regional availability, feature sets, and SLA differences—is essential for the AI-102 exam and real-world architecture decisions.

Architecture

You'll create both a multi-service Azure AI resource and individual single-service resources, then programmatically enumerate their capabilities and compare their endpoints.

Challenge 01 topology

Prerequisites

  • Azure subscription with Azure AI services access
  • Azure CLI 2.50+ installed
  • Python 3.9+ with pip or .NET 8 SDK
  • azure-identity and azure-mgmt-cognitiveservices Python packages (or equivalent NuGet)

Implementation

Task 1: Create a Multi-Service Azure AI Resource

from azure.identity import DefaultAzureCredential
from azure.mgmt.cognitiveservices import CognitiveServicesManagementClient
from azure.mgmt.cognitiveservices.models import Account, Sku, AccountProperties

credential = DefaultAzureCredential()
subscription_id = "YOUR_SUBSCRIPTION_ID"
client = CognitiveServicesManagementClient(credential, subscription_id)

# Create a multi-service resource
account = client.accounts.begin_create(
resource_group_name="rg-ai102-challenge01",
account_name="ai-multiservice-01",
account=Account(
sku=Sku(name="S0"),
kind="AIServices",
location="eastus",
properties=AccountProperties()
)
).result()

print(f"Created: {account.name}")
print(f"Endpoint: {account.properties.endpoint}")
print(f"Kind: {account.kind}")

Task 2: List Available AI Service Kinds

# List all available cognitive service kinds in the subscription
kinds = client.resource_skus.list()
service_kinds = set()
for sku in kinds:
service_kinds.add(sku.kind)

print("Available Azure AI service kinds:")
for kind in sorted(service_kinds):
print(f" - {kind}")

# Key kinds for AI-102:
# CognitiveServices (multi-service), OpenAI, ComputerVision,
# TextAnalytics, SpeechServices, FormRecognizer, ContentSafety

Task 3: Create Single-Service Resources and Compare

# Create individual service resources for comparison
services = [
{"name": "ai-vision-01", "kind": "ComputerVision", "sku": "S1"},
{"name": "ai-language-01", "kind": "TextAnalytics", "sku": "S"},
{"name": "ai-speech-01", "kind": "SpeechServices", "sku": "S0"},
]

for svc in services:
result = client.accounts.begin_create(
resource_group_name="rg-ai102-challenge01",
account_name=svc["name"],
account=Account(
sku=Sku(name=svc["sku"]),
kind=svc["kind"],
location="eastus",
properties=AccountProperties()
)
).result()
print(f"Created {svc['kind']}: {result.properties.endpoint}")

# Compare: multi-service has ONE endpoint for all
# Single-service has dedicated endpoints with service-specific features
multi = client.accounts.get("rg-ai102-challenge01", "ai-multiservice-01")
print(f"\nMulti-service endpoint: {multi.properties.endpoint}")
print("Supports: Vision, Language, Speech, Decision (single key)")

Expected Output

Created: ai-multiservice-01
Endpoint: https://eastus.api.cognitive.microsoft.com/
Kind: CognitiveServices

Available Azure AI service kinds:
- CognitiveServices
- ComputerVision
- ContentSafety
- FormRecognizer
- OpenAI
- SpeechServices
- TextAnalytics
...

Created ComputerVision: https://eastus.api.cognitive.microsoft.com/
Created TextAnalytics: https://eastus.api.cognitive.microsoft.com/
Created SpeechServices: https://eastus.cognitiveservices.azure.com/

Multi-service endpoint: https://eastus.api.cognitive.microsoft.com/
Supports: Vision, Language, Speech, Decision (single key)

Break & fix

ScenarioSymptomRoot CauseFix
Wrong kind specifiedInvalidParameterValue errorUsing deprecated kind name (e.g., "Face" vs "CognitiveServices")Check az cognitiveservices account list-skus for valid kinds
Region not availableLocationNotAvailable errorService not available in chosen regionUse az account list-locations and check service availability matrix
SKU mismatchSkuNotAvailableRequested SKU not offered for that kindMatch SKU to service kind (e.g., TextAnalytics uses "S" not "S0")
Quota exceededQuotaExceededToo many resources of same kind in subscriptionDelete unused resources or request quota increase

Knowledge Check

1. You need to use a single endpoint and key to access Computer Vision, Language, and Speech capabilities. Which resource kind should you create?

2. Which Azure AI service should you use to extract structured data from invoices and receipts?

3. What is a key limitation of multi-service Azure AI resources compared to single-service resources?

4. You need to implement real-time speech translation for a conference application. Which service should you select?

5. Which scenario requires Azure OpenAI Service rather than Azure AI Language?

Cleanup

az group delete --name rg-ai102-challenge01 --yes --no-wait

Learn More