Skip to main content

AI-200 Online Exam

Developing AI Cloud Solutions on Azure

96 questions available ยท Page 1 of 10

View study plans
Question 1 Single choice

The application knows a Cosmos DB item's ID and partition-key value and performs many point reads. Which client pattern is both efficient and secure?

  1. A

    Create a client with an account key for every read and supply only the item ID.

  2. B

    Reuse an identity-authenticated client with the item ID and partition key.

  3. C

    Run a cross-partition query for each read and discard continuation tokens.

  4. D

    Create a new identity-authenticated client per read and omit the partition key.

Show answer and explanation

Correct answer: B

Explanation

A point read is efficient when both the item ID and partition-key value are supplied, because the service can route directly to the owning logical partition without a cross-partition query. Reusing one identity-authenticated client avoids repeated client and connection setup while eliminating an embedded account key. This combines direct routing with credential-free authentication.

Question 2 Single choice

Generated answers are cached by embedding similarity. Tenants must remain isolated, and reuse is unsafe after source or model changes. Which policy should govern cache hits?

  1. A

    Require tenant scope, model compatibility, a threshold, and freshness controls.

  2. B

    Search all tenant vectors and reuse the nearest result regardless of its score.

  3. C

    Reuse any semantically similar prompt and retain entries indefinitely.

  4. D

    Set a time to live but omit tenant filters and model compatibility checks.

Show answer and explanation

Correct answer: A

Explanation

Tenant scope prevents one tenant's generated content from being reused for another. Model compatibility ensures cached embeddings and queries share a meaningful vector space, while a similarity threshold rejects weak matches. Freshness controls invalidate or expire entries after source or model changes, so proximity alone cannot authorize reuse of obsolete content.

Question 3 Single choice

A serverless workflow waits days for external approval, must survive process recycling, and then fans out work before aggregating the results. Which implementation is suitable?

  1. A

    Keep a normal function invocation blocked until approval arrives.

  2. B

    Store progress only in process memory and start parallel threads.

  3. C

    Use Durable Functions with external events and fan-out/fan-in.

  4. D

    Call external services directly from replaying orchestrator code and use a blocking timer.

Show answer and explanation

Correct answer: C

Explanation

Durable Functions persists orchestration progress, so a workflow can wait for an external approval event for days without holding one normal invocation or relying on process memory. After approval, fan-out can schedule parallel work and fan-in can await and aggregate the results. Persisted state also allows the orchestration to survive host recycling and resume.

Question 4 Single choice

A horizontal pod autoscaler increases the desired replica count, but new pods remain pending because no node has capacity. What change addresses the unmet constraint?

  1. A

    Raise the autoscaler's maximum replica count again.

  2. B

    Add a public Service for the pending pods.

  3. C

    Restart the pending pods until a node accepts them.

  4. D

    Autoscale node capacity as well as pod replicas.

Show answer and explanation

Correct answer: D

Explanation

The horizontal pod autoscaler has already requested additional replicas, so pod demand is being calculated correctly. The remaining constraint is node capacity: pending pods have nowhere to be scheduled. Autoscaling node capacity adds compute when scheduling demand exceeds available resources, while pod autoscaling continues to adjust the desired application replica count.

Question 5 Single choice

One logical request crosses HTTP services, a message broker, a function, and a database. The total latency is high, but component logs cannot be reliably joined. What should be implemented first?

  1. A

    Propagate trace context and compare correlated spans and dependency timing.

  2. B

    Compare unrelated timestamps and assume the entry service is the bottleneck.

  3. C

    Increase every client timeout and collect only top-level request duration.

  4. D

    Restart each component and inspect whichever log reports an error first.

Show answer and explanation

Correct answer: A

Explanation

Propagating trace context carries one logical request identity across HTTP calls, broker messages, the function, and database dependencies. Correlated spans then reconstruct the request path, while their timings reveal which operation contributes the latency. This must precede bottleneck diagnosis because unrelated component logs cannot establish a reliable causal timeline.

Question 6 Single choice

Multiple application instances perform database work that sometimes fails transiently. Some operations have side effects and several statements must commit atomically. Which approach is appropriate?

  1. A

    Open unbounded connections and retry every failed operation immediately.

  2. B

    Run each statement in a separate connection and retry all side effects.

  3. C

    Keep transactions open between requests and diagnose latency from client timeouts alone.

  4. D

    Use pooled connections, focused transactions, and safe transient retries.

Show answer and explanation

Correct answer: D

Explanation

A connection pool provides bounded, reusable database connections across application work. Focused transactions keep only the statements that must commit atomically within one short transaction. Retries should target transient failures and be safe for the operation, using idempotency or verified transaction outcomes where side effects could otherwise be repeated.

Question 7 Single choice

Burst traffic causes a function app to open more PostgreSQL connections than the database can safely accept. Which action protects the dependency as load increases?

  1. A

    Allow unrestricted platform scaling and remove connection limits.

  2. B

    Increase the function timeout and create a connection per invocation.

  3. C

    Select a hosting plan solely by its maximum instance count.

  4. D

    Limit function concurrency and reuse a bounded connection pool.

Show answer and explanation

Correct answer: D

Explanation

Limiting function concurrency bounds the number of invocations that can demand database connections at the same time. Reusing a bounded connection pool avoids opening a new connection for every invocation and caps the application's connection footprint. Together these controls protect PostgreSQL even when burst traffic causes the function platform to add instances.

Question 8 Single choice

Backend pods have ephemeral addresses, and only workloads inside the cluster should reach them through a stable name. What should expose the pods?

  1. A

    An internally scoped Kubernetes Service

  2. B

    A list of pod IP addresses stored by each client

  3. C

    A publicly reachable load-balancing Service

  4. D

    An external HTTP ingress endpoint

Show answer and explanation

Correct answer: A

Explanation

An internally scoped Kubernetes Service provides a stable virtual address and DNS name while selecting the current backend pods, even as individual pod addresses change. Keeping the Service internal limits reachability to cluster workloads. Client-maintained pod lists are unstable, while public load balancing or external ingress would expose more network surface than required.

Question 9 Single choice

A TLS certificate cannot be eliminated from a solution and needs centralized access control and rotation. Which integration is appropriate?

  1. A

    Store it as ordinary application text and restart consumers on a fixed schedule.

  2. B

    Use a Key Vault certificate with managed identity and version-aware rotation.

  3. C

    Store it as a Key Vault key and assume every consumer rotates automatically.

  4. D

    Store it as a Key Vault secret and grant all applications every vault operation.

Show answer and explanation

Correct answer: B

Explanation

A Key Vault certificate is the appropriate managed object for TLS certificate material and centralizes access control. Managed identity lets consumers authenticate without storing vault credentials. Version-aware rotation allows them to recognize and adopt a newer certificate version safely, rather than assuming that storing an object automatically updates every active consumer.

Question 10 Single choice

Source items and their embeddings change continuously. Similarity search must use one compatible embedding space, while downstream updates must be incremental and resumable without duplicate effects. Which design satisfies the requirement?

  1. A

    Mix vector dimensions and rescan the whole container after every change.

  2. B

    Use any distance function and checkpoint before applying downstream updates.

  3. C

    Align vector dimensions and metric; process the change feed idempotently with checkpoints.

  4. D

    Omit vector indexing and assume the change-feed processor guarantees exactly-once effects.

Show answer and explanation

Correct answer: C

Explanation

Matching vector dimensions and the distance metric keeps all embeddings in one compatible search space and makes similarity ranking meaningful. Processing the change feed applies only incremental source changes. Idempotent update logic prevents replayed changes from duplicating effects, while checkpoints provide a durable position from which processing can resume after interruption.