AI-200 Practice Exam #2 (30 questions)

This post is a part of the AI-200: Developing AI Cloud Solutions on Azure  Exam Prep Hub.


Section 1 — Develop Containerized Solutions on Azure

Questions 1–7


Question 1 — Scenario-Based: Azure Container Apps

A company has developed an AI inference service as a container image.

The application has the following requirements:

  • It must run continuously while requests are being processed.
  • It should scale horizontally when request volume increases.
  • The team does not want to manage Kubernetes control planes or nodes.
  • The application will eventually have multiple versions running during controlled releases.
  • The team wants to use container images stored in Azure Container Registry.

Which Azure service is the best hosting platform?

A. Azure Kubernetes Service
B. Azure Functions
C. Azure Container Apps
D. Azure Storage static website

Answer: C

Explanation

Azure Container Apps is designed for running containerized applications without requiring the development team to manage Kubernetes infrastructure directly. It supports container images, scaling, revisions, and environment configuration.

AKS would provide considerably more Kubernetes control, but it also introduces additional management responsibilities. Azure Functions is appropriate for serverless functions rather than a continuously running containerized service of this type.

The AI-200 objectives specifically include deploying containers to Container Apps, configuring environments, managing revisions, and implementing event-driven scaling with KEDA.


Question 2 — Azure Container Registry Tasks

A development team has a Dockerfile stored in a Git repository.

Whenever changes are committed to the repository, the team wants Azure to automatically build a new container image and push it to Azure Container Registry.

The team does not want to maintain a dedicated build server.

Which solution should you implement?

A. Configure an Azure Container Registry Task with a source-code trigger
B. Create an AKS CronJob that executes Docker
C. Configure an App Service deployment slot
D. Create an Azure Function with a timer trigger that builds the image

Answer: A

Explanation

Azure Container Registry Tasks can automate container image builds in Azure. They can be triggered by source-code changes and can build and push images to ACR.

The important distinction is that ACR Tasks are specifically designed for container image build automation. App Service slots and Azure Functions don’t provide the same purpose-built container build capability.

ACR Tasks are explicitly part of the AI-200 containerization objectives.


Question 3 — AKS Deployment Troubleshooting

You deploy an AI API to AKS using a Kubernetes deployment manifest.

The deployment reports that the pods have been created, but the application is inaccessible from outside the cluster.

You verify that:

  • The container image can be pulled.
  • The pods are running.
  • The application process is listening on the expected container port.

What should you investigate next?

A. The Azure Container Registry retention policy
B. The PostgreSQL connection pool
C. The Cosmos DB indexing policy
D. The Kubernetes Service and ingress/network configuration

Answer: D

Explanation

If the pods are running and the application is listening correctly, the next logical area is connectivity between the pods and external clients.

In AKS, this can involve the Kubernetes Service, ingress configuration, ports, selectors, networking, and related resources.

The AI-200 study guide specifically calls out monitoring and troubleshooting AKS and Container Apps by inspecting logs, events, and end-to-end connectivity.


Question 4 — Multiple Answers

An application is deployed to Azure Container Apps.

The application has two revisions:

  • Revision A — currently serving production traffic
  • Revision B — newly deployed version

The development team wants to validate Revision B before directing production traffic to it.

Which two capabilities are relevant?

A. Azure Container Registry Tasks
B. Container Apps revision management
C. Revision traffic management
D. Cosmos DB change feed

Answers: B, C

Explanation

Azure Container Apps supports revisions, allowing different versions of an application to coexist. Traffic can be managed between revisions, supporting controlled deployments and testing.

ACR Tasks handles container image builds and is not responsible for Container Apps traffic management.

Microsoft explicitly includes revision management in the AI-200 Container Apps objectives.


Question 5 — Container Apps Scaling

An AI application receives requests through an event-driven architecture.

Under normal conditions, there may be only a few messages waiting to be processed. During business events, thousands of messages may accumulate.

The application should automatically create additional container replicas when the message workload increases.

Which capability is most appropriate?

A. App Service deployment slots
B. ACR geo-replication
C. KEDA-based event-driven scaling
D. AKS node autoscaling only

Answer: C

Explanation

KEDA—Kubernetes Event-driven Autoscaling—allows Container Apps to scale based on external event sources and metrics.

This differs from simply scaling based on CPU or memory. A queue-length or other event-based workload is a classic use case for event-driven scaling.

The AI-200 study guide specifically identifies KEDA as the mechanism for event-driven scaling in Container Apps.


Question 6 — Multiple Answers

You are diagnosing a failing AKS deployment.

Which two sources should you inspect to help determine why the application is not behaving as expected?

A. Kubernetes/application logs
B. Kubernetes events
C. Azure App Configuration feature flags only
D. PostgreSQL vector indexes

Answers: A, B

Explanation

Application and container logs can reveal runtime failures, exceptions, and startup problems. Kubernetes events can reveal scheduling problems, image-pull failures, probe failures, container restarts, and other cluster-level conditions.

The AI-200 objectives explicitly include inspecting logs and events when troubleshooting AKS and Container Apps.


Question 7 — App Service Container Configuration

A containerized AI API runs on Azure App Service.

The application requires a configuration value named AI_ENDPOINT and a sensitive value named API_KEY.

The development team wants these values supplied to the container as environment variables rather than hard-coded into the image.

Which approach is most appropriate?

A. Configure App Service application settings/environment variables and use a secure secret-management approach for the sensitive value
B. Add both values directly to the Dockerfile
C. Store both values in the container image metadata
D. Put both values in the ACR repository name

Answer: A

Explanation

App Service can supply application configuration to a container through application settings/environment variables. Sensitive values should not be baked into the container image.

The AI-200 study guide specifically includes configuring App Service to supply environment variables and secrets.


Section 2 — Develop AI Solutions Using Azure Data Management Services

Questions 8–15


Question 8 — Cosmos DB Consistency and RU Consumption

An AI application uses Azure Cosmos DB for NoSQL.

The application does not require every read to immediately reflect the latest write. However, it performs a very large number of reads, and the development team wants to optimize the workload’s consistency/performance tradeoff.

Which Cosmos DB configuration area should they investigate?

A. Container Apps revision settings
B. Consistency level
C. Azure Functions trigger type
D. Event Grid retry policy

Answer: B

Explanation

Cosmos DB consistency levels determine the guarantees provided when reading data. Stronger consistency generally involves different performance and availability tradeoffs than weaker consistency levels.

The AI-200 study guide explicitly includes optimizing Cosmos DB query performance and RU consumption by using indexing policies and consistency levels.


Question 9 — Cosmos DB Query Optimization

A Cosmos DB query frequently filters documents using a property called departmentId.

The query is expensive and consumes more RUs than expected.

The development team discovers that the property is excluded from the container’s indexing policy.

What should they consider doing?

A. Increase the Service Bus lock duration
B. Create a KEDA scaler
C. Move the documents to Azure Managed Redis
D. Modify the indexing policy to appropriately index the property

Answer: D

Explanation

Cosmos DB indexing policies determine which paths are indexed and therefore influence query execution and RU consumption.

If a frequently filtered property isn’t appropriately indexed, changing the indexing policy may improve query performance and reduce unnecessary RU consumption.

Indexing policies are explicitly part of the AI-200 Cosmos DB objectives.


Question 10 — Cosmos DB Vector Search

An AI application stores the following document:

{
"id": "doc-1024",
"tenantId": "contoso",
"text": "Azure provides cloud-based AI services...",
"embedding": [ ... ]
}

The application receives a query embedding and needs to retrieve semantically similar documents.

Which capability should be implemented?

A. Cosmos DB vector similarity search
B. Cosmos DB change feed only
C. Azure Functions timer trigger
D. Service Bus topic filtering

Answer: A

Explanation

The embedding represents the semantic characteristics of the document. Vector similarity search compares the query embedding with stored embeddings to identify semantically similar content.

This is a core AI workload supported by Cosmos DB for NoSQL and is explicitly included in the AI-200 objectives.


Question 11 — Scenario-Based RAG

A RAG application stores documents for multiple customers in Azure Database for PostgreSQL.

Each vector record includes:

  • tenant_id
  • document_type
  • content
  • embedding

A user from tenant A asks a question.

The application must ensure that results from tenant B are never returned, even if tenant B contains documents that are more semantically similar.

Which approach should be used?

A. Increase vector dimensions
B. Perform vector similarity search with a metadata filter for tenant_id
C. Use Event Grid to filter documents
D. Store tenant IDs in Azure Key Vault

Answer: B

Explanation

The vector search provides semantic similarity, while the metadata filter constrains the candidate records to the correct tenant.

This is especially important in multi-tenant RAG architectures. Semantic similarity alone should not be treated as an authorization boundary.

The AI-200 study guide specifically includes RAG patterns using vector search with metadata filters.


Question 12 — PostgreSQL Performance

An application performs thousands of short database operations against Azure Database for PostgreSQL.

Performance testing shows that establishing a new database connection for every request introduces significant latency.

Which optimization should be considered?

A. Increase the number of Event Grid subscriptions
B. Use connection pooling or otherwise optimize connection reuse
C. Replace PostgreSQL with ACR
D. Store all database credentials in source code

Answer: B

Explanation

Creating and tearing down database connections repeatedly introduces overhead. Connection pooling allows connections to be reused across operations, improving throughput and reducing connection-establishment latency.

Connection optimization is explicitly listed in the current AI-200 study guide.


Question 13 — Azure Managed Redis

An AI application repeatedly retrieves the same expensive results from a backend data service.

The results can safely remain cached for five minutes.

After five minutes, the application should retrieve fresh data.

Which Azure Managed Redis capability is most directly applicable?

A. Change feed processing
B. PostgreSQL vector indexing
C. Service Bus dead-lettering
D. Key expiration/TTL

Answer: D

Explanation

Redis supports expiration/TTL semantics, allowing cached data to automatically expire after a specified period.

This is useful when data should remain cached temporarily but must eventually be refreshed.

The AI-200 objectives specifically include caching, expiration, and invalidation using Azure Managed Redis.


Question 14 — Multiple Answers

An AI application uses Azure Managed Redis.

Which two capabilities are directly relevant to AI workloads covered by AI-200?

A. Vector indexing for similarity search
B. Caching frequently accessed data
C. Kubernetes manifest deployment
D. Azure Function trigger execution

Answers: A, B

Explanation

Azure Managed Redis can be used for low-latency caching and supports vector storage/indexing capabilities for AI scenarios.

Kubernetes manifests belong to AKS, while Function triggers belong to Azure Functions.

The current AI-200 study guide specifically identifies Redis caching, expiration/invalidation, and vector indexing.


Question 15 — Matching: AI Data Services

Match each requirement to the best Azure technology.

RequirementTechnology
1. Detect newly inserted or modified Cosmos DB itemsA. Azure Managed Redis
2. Perform relational vector search using PostgreSQLB. Azure Cosmos DB change feed
3. Cache frequently accessed AI results with expirationC. Azure Database for PostgreSQL with pgvector
4. Perform low-latency vector operations in RedisD. Azure Managed Redis vector capabilities

Answers

  • 1 → B
  • 2 → C
  • 3 → A
  • 4 → D

Explanation

The Cosmos DB change feed is designed to detect item changes. PostgreSQL can use pgvector for vector workloads. Managed Redis provides low-latency caching and expiration as well as vector capabilities.

These capabilities map directly to the data-management objectives in the current AI-200 guide.


Section 3 — Connect to and Consume Azure Services

Questions 16–23


Question 16 — Service Bus vs. Event Grid

An AI application needs reliable asynchronous processing of individual work items.

Each work item represents a document that must be processed exactly as part of an application workflow. If processing fails, the message must remain available for retry or dead-letter handling.

Which service is the better fit?

A. Event Grid
B. Azure App Configuration
C. Azure Managed Redis
D. Azure Service Bus

Answer: D

Explanation

Azure Service Bus is designed for enterprise messaging and reliable asynchronous processing. It supports queues, topics, subscriptions, message handling, and dead-letter queues.

Event Grid is primarily an event-routing service for reactive architectures. When the requirement centers on reliable message processing and dead-letter handling, Service Bus is generally the better fit.

These capabilities are explicitly included in the AI-200 messaging objectives.


Question 17 — Service Bus Topic Architecture

An AI document-processing application publishes a single event whenever a document is processed.

Three independent applications need to react to the event:

  1. Billing
  2. Analytics
  3. Notification

Each application must independently receive the events.

Which Service Bus architecture should you use?

A. A topic with separate subscriptions
B. A single queue consumed by all applications
C. A Redis key with a five-minute expiration
D. A Function timer trigger

Answer: A

Explanation

A Service Bus topic allows a publisher to send messages once while multiple subscriptions independently receive messages.

This is appropriate when several consumers need their own copy/stream of messages.

Queues are more appropriate when competing consumers share work rather than when independent applications each need to receive the published message.

Topics and subscriptions are explicitly part of the AI-200 objectives.


Question 18 — Event Grid Filtering

A custom Event Grid topic receives events from several types of AI processing operations.

A downstream service should receive only events where:

eventType = "DocumentAnalysisCompleted"

What should you configure?

A. A Service Bus dead-letter queue
B. An App Service deployment slot
C. An Event Grid event subscription with filtering
D. A Cosmos DB indexing policy

Answer: C

Explanation

Event Grid subscriptions can use event filtering to restrict which events are delivered to a subscriber.

This allows a publisher to emit multiple event types while individual consumers receive only events relevant to them.

Event Grid filters, custom events, and retry behavior are explicitly listed in the AI-200 objectives.


Question 19 — Event Grid Retry Behavior

An Event Grid subscriber’s endpoint is temporarily unavailable.

The application should allow Event Grid to attempt delivery again rather than permanently losing the event immediately.

Which Event Grid capability should you configure?

A. Vector indexing
B. Event delivery retry policy
C. Container Apps revision
D. Cosmos DB consistency level

Answer: B

Explanation

Event Grid provides retry capabilities for event delivery. Retry configuration allows applications to tolerate temporary endpoint failures.

Retry behavior is distinct from Service Bus dead-lettering. Service Bus is designed around reliable messaging and message processing, while Event Grid provides event routing with retry and delivery semantics.

The AI-200 study guide explicitly identifies Event Grid retries as an exam objective.


Question 20 — Azure Functions Architecture

An AI backend must expose an HTTP endpoint:

POST /documents

The endpoint accepts a document and places a processing request onto a Service Bus queue.

The backend should be serverless.

Which Azure Functions design is most appropriate?

A. Timer-triggered function that polls the HTTP endpoint
B. Event Grid-triggered function with a Redis output
C. Cosmos DB change-feed function
D. HTTP-triggered function with a Service Bus output binding

Answer: D

Explanation

An HTTP trigger can expose the API endpoint. A Service Bus output binding can then send the processing message to a queue.

This design avoids unnecessary polling and allows the HTTP-facing function to remain lightweight while the actual document processing happens asynchronously.

The AI-200 objectives include serverless APIs, triggers, bindings, and function-app deployment.


Question 21 — Azure Functions Trigger vs. Binding

A developer creates an Azure Function that should execute whenever a new message arrives in a Service Bus queue.

Which component determines when the function executes?

A. Trigger
B. Output binding
C. Application setting
D. Deployment slot

Answer: A

Explanation

The trigger defines the event that causes the function to execute.

A binding provides a declarative connection between the function and another service or data source. The trigger is therefore the component responsible for initiating execution.

Triggers and bindings are explicitly included in the AI-200 Functions objectives.


Question 22 — Multiple Answers

A development team is choosing between Azure Service Bus and Event Grid for an AI backend.

Which two statements are correct?

A. Service Bus is appropriate for reliable message-based processing.
B. Event Grid is designed for event-driven routing and supports event filtering.
C. Event Grid replaces Azure Key Vault for secret storage.
D. Service Bus is primarily a container image registry.

Answers: A, B

Explanation

Service Bus provides messaging capabilities such as queues, topics, subscriptions, and dead-letter queues.

Event Grid provides event routing and supports capabilities such as custom events, filtering, and retries.

Neither service is a secret-management or container-registry service.


Question 23 — Fill in the Blank

Complete the statement:

In Azure Functions, a __________ defines the event or condition that causes a function to execute, while a binding provides a connection to input or output data.

Answer: trigger

Explanation

A Function trigger determines when the function executes. Bindings simplify access to external resources and can provide input or output data.

Understanding this distinction is fundamental to designing serverless AI backends with Azure Functions.


Section 4 — Secure, Monitor, and Troubleshoot Azure Solutions

Questions 24–30


Question 24 — Key Vault Secret Rotation

An AI application uses an API key stored in Azure Key Vault.

The security team requires the secret to be rotated periodically without requiring developers to modify application source code.

Which approach best addresses the requirement?

A. Implement secret rotation and have the application retrieve the current secret from Key Vault
B. Store a second copy of the secret in the Dockerfile
C. Put the secret in an Event Grid event
D. Store the secret as a PostgreSQL vector

Answer: A

Explanation

Key Vault is designed to securely store secrets and supports secret lifecycle management. Applications can retrieve the current value rather than embedding secrets in source code or container images.

The current AI-200 study guide specifically includes secret rotation and retrieval using Azure Key Vault.


Question 25 — Key Vault vs. App Configuration

An application has the following configuration:

  • MaxDocumentsPerRequest = 25
  • EnableSemanticSearch = true
  • DatabaseConnectionPassword = [secret]
  • AIServiceApiKey = [secret]

Which approach is most appropriate?

A. Store everything in Azure Container Registry
B. Store everything in Azure App Configuration
C. Store non-secret configuration in App Configuration and secrets in Key Vault
D. Store everything in Service Bus

Answer: C

Explanation

Azure App Configuration is designed for centralized application settings and configuration.

Azure Key Vault is designed for sensitive values such as passwords and API keys.

Separating ordinary configuration from secrets provides a more appropriate security and configuration-management architecture.

Both services are explicitly included in the AI-200 security objectives.


Question 26 — OpenTelemetry

A distributed AI application has this request path:

Client
API
Document service
PostgreSQL
AI inference service

Users report that some requests take 8–10 seconds.

The development team needs to determine which component contributes most of the latency for each individual request.

Which capability is most appropriate?

A. OpenTelemetry distributed tracing
B. ACR image replication
C. Cosmos DB change feed
D. Service Bus topic filtering

Answer: A

Explanation

Distributed tracing allows developers to follow a request through multiple services and identify where time is being spent.

OpenTelemetry provides standardized instrumentation for collecting telemetry across distributed applications.

The AI-200 study guide specifically identifies tracing distributed systems using OpenTelemetry SDKs.


Question 27 — KQL

You have an Azure Monitor Logs table called AppRequests.

You need to find the 10 slowest requests from the previous hour.

Which query is the best starting point?

A.

AppRequests
| summarize count()

B.

AppRequests
| where TimeGenerated > ago(1h)
| summarize avg(DurationMs)

C.

AppRequests
| project DurationMs

D.

AppRequests
| where TimeGenerated > ago(1h)
| top 10 by DurationMs desc

Answer: D

Explanation

The query needs to:

  1. Restrict records to the previous hour.
  2. Sort/select the highest-duration requests.
  3. Return only the top 10.

top 10 by DurationMs desc directly satisfies the requirement.

KQL is explicitly part of the AI-200 monitoring objectives for analyzing logs and metrics.


Question 28 — Multiple Answers

You instrument an AI application with OpenTelemetry.

Which two types of telemetry are particularly useful when diagnosing performance problems in a distributed application?

A. Container image tags
B. Traces
C. Metrics
D. ACR repository names

Answers: B, C

Explanation

Traces can show the path and timing of individual requests across distributed services.

Metrics can reveal aggregate measurements such as latency, request rates, error rates, or resource-related behavior.

Container image tags and ACR repository names are deployment metadata rather than the primary telemetry types used for distributed performance analysis.

OpenTelemetry and telemetry analysis are explicitly included in the AI-200 monitoring objectives.


Question 29 — KQL Scenario

An AI application has started returning HTTP 500 errors.

You want to determine whether the errors increased significantly during the last 30 minutes.

Which KQL query is the most useful starting point?

A.

AppRequests
| where TimeGenerated > ago(30m)
| summarize count() by bin(TimeGenerated, 5m), ResultCode

B.

AppRequests
| project TimeGenerated

C.

AppRequests
| summarize avg(DurationMs)

D.

AppRequests
| top 1 by TimeGenerated

Answer: A

Explanation

The query:

  • restricts data to the last 30 minutes,
  • groups data into five-minute intervals,
  • separates results by HTTP result code,
  • and counts the requests.

This allows the development team to observe whether HTTP 500 responses increased during particular time intervals.

The ability to write KQL queries to analyze logs and metrics is part of the current AI-200 study guide.


Question 30 — Scenario-Based Troubleshooting

An AI API is running in Azure Container Apps.

The application works correctly under light load. Under heavy load, however:

  • request latency increases significantly,
  • CPU usage remains relatively low,
  • the application receives work from a messaging system,
  • and the number of pending messages increases continuously.

The development team wants the application to automatically add replicas based on the workload rather than CPU utilization.

What should you implement?

A. KEDA event-driven scaling based on the messaging workload
B. A larger Azure Container Registry SKU
C. A stronger Cosmos DB consistency level
D. OpenTelemetry sampling alone

Answer: A

Explanation

The critical clue is that the workload is message-driven and the backlog is increasing while CPU utilization remains low.

CPU-based autoscaling would not necessarily respond appropriately. KEDA allows Container Apps to scale based on event-driven workload characteristics, such as the number of pending messages.

OpenTelemetry could help diagnose the latency, but instrumentation alone would not automatically add replicas.

KEDA-based event-driven scaling is explicitly identified in the AI-200 containerized-solutions objectives.


Go to the AI-200 Exam Prep Hub main page

Leave a comment