AI-200 cheat sheet — every exam topic on one page
99 key facts across 4 exam domains — every topic on the AI-200 blueprint, with the exam pattern behind each. A condensed cheat sheet, distilled from the full AI-200 revision notes. Skim it the week of your exam.
Updated
Develop containerized solutions on Azure
24% of the examAI-200 Container Hosting: Azure Container Registry, ACR Tasks and App Service Containers
- Geo-replication, private endpoints, IP/VNet rules, the retention policy and dedicated data endpoints are Premium-only; artifact cache rules and tokens work in every tier.
- Deploy unique tags or digests; stable tags move with every push. write-enabled false makes a tag immutable and undeletable, delete-enabled false only blocks deletion, and az lock never protects images.
- az acr import is a server-side copy that keeps the digest; a cache rule (with a credential set for Docker Hub) is a pull-through cache.
- AcrPull pulls, AcrPush pushes and pulls, AcrDelete deletes. In rbac-abac mode those roles aren't honored; use Container Registry Repository roles with an ABAC condition to scope them.
- az acr build builds without local Docker (--platform, --no-push); az acr run --cmd ... /dev/null runs an image once; $Registry is the login server, $RegistryName the short name.
- Timer cron has five fields in UTC. Base image triggers need one prior run, a stable tag and the runtime stage; ACR bases trigger immediately, public ones within 10 to 60 minutes.
- In task YAML, when lists every prerequisite step and ["-"] runs in parallel; secrets come from a secrets block read by the task's own managed identity.
- App Service pulls with AcrPull plus acrUseManagedIdentityCreds; acrUserManagedIdentityID takes a client ID, keyVaultReferenceIdentity takes a resource ID, and vnetImagePullEnabled routes pulls through the VNet.
- App settings become environment variables; connection strings get type prefixes; slot settings stay with their slot; Key Vault references cache for 24 hours unless refreshed.
How the exam tests this
Questions on this topic are scenarios with one deciding requirement, such as no local Docker engine, keep the original digest, least privilege, no stored passwords, a Standard tier registry, without rebuilding the image, or without changing configuration. Many show a CLI command, a cron expression, a task YAML file or a Key Vault reference and ask which variant meets the requirement, so the near-twins matter: write-enabled versus delete-enabled, image versus repository scope, $Registry versus $RegistryName, client ID versus resource ID, vnetImagePullEnabled versus vnetRouteAllEnabled, and app settings versus connection strings.
AI-200 Container Apps and AKS: Revisions, KEDA Scaling, Manifests and Troubleshooting
- Apps in one Container Apps environment share the VNet, the log destination and Dapr; isolate test and production in separate environments. A custom VNet and internal accessibility are set only when the environment is created.
- Internal ingress means callable only from the same environment; in an internal environment, external ingress means callable from the VNet and peered networks but never the internet. Disable ingress for queue workers.
- Changes under properties.template (image, scale rules) create a revision; changes under properties.configuration (secrets, ingress, traffic, revision mode, registries) don't. Restart the revision after updating a secret, or use a versionless Key Vault URI.
- Weighted traffic needs multiple revision mode; rollback is a weight change; assign weights by revision name to stop new revisions taking traffic; labels give a stable URL that moves between revisions.
- KEDA computes ceil(metric / target) clamped to min and max replicas. With no rule the default HTTP rule applies, so a worker with ingress disabled never wakes up; minReplicas 1 removes cold starts but keeps billing.
- Scale-rule credentials: --scale-rule-identity for managed identity (Service Bus, Event Hubs, Queue Storage), or auth entries mapping triggerParameter to a Container Apps secretRef.
- A Deployment's selector must match its template labels; memory limits cause OOMKilled; env-var ConfigMaps never update in running pods, whole-volume mounts do, subPath mounts don't.
- Empty Service endpoints mean a selector mismatch; connection refused with endpoints means a wrong targetPort; an internal load balancer needs type LoadBalancer plus the azure-load-balancer-internal annotation.
- Startup probes protect slow starts, readiness gates traffic (put dependencies here), liveness restarts hung processes; rollout status gates pipelines, rollout undo rolls back.
- Pending: describe and events. CrashLoopBackOff: logs --previous. AKS tables: ContainerLogV2, KubeEvents, KubePodInventory. Container Apps: system vs console logs, ContainerAppHTTPLogs ResponseFlags UH, az containerapp exec for DNS.
How the exam tests this
Questions on this topic are scenarios with one deciding requirement: cost nothing while idle, no stored credentials, never reachable from the internet, a URL that stays the same across releases, roll back within seconds, least administrative effort. Many put a manifest, a scale-rule definition, a CLI command or a KQL query in the stem and ask what to change or which line or table completes it, so you need the real names of settings, commands and log tables rather than a general idea of them. Others describe a symptom on AKS or Container Apps and ask for the fix or the next diagnostic step. Every option is usually a real feature, so read for the constraint that rules each one out. Some items ask you to select two.
Develop AI solutions by using Azure data management services
28% of the examAI-200 Azure Cosmos DB for NoSQL: SDK Queries, RUs, Vector Search and Change Feed
- Keyless access = DefaultAzureCredential + a Cosmos DB data-plane role (Built-in Data Reader or Data Contributor); Azure RBAC roles like Contributor manage the account but don't authorise item reads or writes.
- A point read with id and partition key is the cheapest lookup (about 1 RU per 1 KB); queries should be parameterized and scoped with partition_key.
- populate_index_metrics=True returns x-ms-cosmos-index-utilization with used and recommended indexes; x-ms-request-charge only gives the cost.
- Include only queried paths and exclude /* to cut write RU, and always exclude vector paths from range indexing.
- Composite indexes must follow the ORDER BY path order, with directions matching exactly or fully reversed.
- Strong and Bounded Staleness read two replicas (about 2× read RU); Session gives read-your-writes from one replica, and clients can only relax the account default.
- Session consistency travels with the session token: forward it to another process to give that process read-your-writes.
- Vector settings (path, dataType, dimensions, distanceFunction) live in the vector embedding policy; existing entries can't be edited in place, so migrate models via a new path and full re-embed.
- flat ≤ 505 dimensions and exact; quantizedFlat ≤ 4,096 for about 50,000 or fewer vectors in scope; diskANN approximate for larger searches. Use TOP N and filter inside the query.
- Change feed delivery is at-least-once, ordered per partition key, latest version only and without deletes: build idempotent handlers and soft-delete with ttl.
How the exam tests this
Questions on this topic are short Azure scenarios with one deciding requirement: no keys allowed, lowest RU, read-your-writes for one user, near-exact recall, never skip a change, least custom code. Several put a Python SDK call, an indexing policy, a SQL query or a composite index definition in the stem and ask which line or change completes it, so you need the real parameter and function names (read_item, query_items with parameters and partition_key, populate_index_metrics, consistency_level, VectorDistance, FullTextScore, RRF, query_items_change_feed with continuation). Wrong options are real features that fail on that requirement, such as a control-plane role for a data operation, Bounded Staleness to save RU, diskANN when each search is small, a WHERE threshold instead of a ranking, or all versions and deletes mode on a periodic-backup account. Some items ask you to select two.
AI-200 Azure Database for PostgreSQL: Entra Connections, Schema Design, Data Types and Connection Pooling
- Entra sign-in: token for https://ossrdbms-aad.database.windows.net/.default as the password, user name = the identity's name, role created with pgaadauth_create_principal in the postgres database.
- Tokens are checked only at sign-in, so pools must fetch a fresh token for every new connection (callable kwargs in psycopg_pool 3.3+).
- psycopg 3: %s or %(name)s placeholders with separate parameters, Jsonb(...) for dicts, cursor.copy() for bulk loads.
- jsonb to filter and index flexible metadata; json only to keep the exact original text; timestamptz for instants; numeric(p,s) for exact amounts; GENERATED ALWAYS AS IDENTITY for database-only keys.
- PostgreSQL does not index foreign key columns; index the child column you join or cascade on.
- Retention by age: range-partition on the time column and drop old partitions; the primary key must include the partition key.
- B-tree: equality columns first, then the range/sort column; expression indexes for functions, partial indexes for small fixed subsets.
- GIN jsonb_path_ops for containment only (smaller); default jsonb_ops when key-exists operators are needed too; pg_trgm GIN for '%term%' after allow-listing it in azure.extensions.
- One small pool per process plus built-in PgBouncer on port 6432 (General Purpose or Memory Optimized only); in transaction mode use SET LOCAL and max_prepared_statements.
- Read replicas are asynchronous and readable; the HA standby is not. Route read-your-own-writes to the primary.
How the exam tests this
Expect scenario questions where a stated requirement (no stored password, smallest index, exact totals, no restart, no extra infrastructure, keep the pool) separates several workable PostgreSQL choices, and short Python or SQL snippets where you pick the missing argument, line or index definition. Items test the Entra token scope and role creation, token refresh in pools, psycopg parameters, Jsonb and COPY, data type and key choices, foreign key actions and child-column indexes, partitioning and its primary key rule, B-tree, GIN and trigram index forms, the built-in PgBouncer's port, tiers and transaction-mode limits, pool sizing across instances, and when to use a read replica. Vector columns and pgvector indexes belong to the next topic.
AI-200 Azure Database for PostgreSQL pgvector: HNSW, IVFFlat and DiskANN Indexes, Compute Sizing and RAG Vector Search
- HNSW: best speed-recall, slower and heavier build, no training (fine on an empty table). IVFFlat: fast, light build, trained on existing rows; DiskANN (pg_diskann) for billion-scale search on flexible server.
- IVFFlat lists = rows/1000 up to 1M rows, sqrt(rows) beyond; rebuild after large growth. ANALYZE does not retrain centroids.
- Operators and classes must match: <-> vector_l2_ops, <#> vector_ip_ops (negative inner product), <=> vector_cosine_ops.
- Index scans serve ORDER BY <raw operator> ascending with LIMIT; compute similarity scores in the select list, never sort by them.
- Recall without a rebuild: hnsw.ef_search (default 40) or ivfflat.probes (default 1); use SET LOCAL on pooled connections.
- Faster builds: raise maintenance_work_mem (watch the "no longer fits" notice) and max_parallel_maintenance_workers; load data first.
- Declare vector(n) to index; over 2,000 dimensions index embedding::halfvec(n) and repeat the same cast in the query.
- Burstable is not for production; Memory Optimized when the index must sit in RAM; Premium SSD v2 sets IOPS apart from size, but the compute size caps IOPS too.
- azure_openai.create_embeddings(deployment, text) returns real[]; cast it ::vector.
- RAG retrieval: WHERE filters with AND, ORDER BY embedding <=> query LIMIT k; fix short results with iterative scans, partial indexes or partitions, and match partial-index predicates exactly.
How the exam tests this
Expect scenario questions where a stated requirement (best recall, no rebuild, index before data exists, keep full-dimension embeddings, keep index quality, lowest cost, only one endpoint affected, return all k rows) separates several workable pgvector choices, plus short SQL snippets where you pick the operator, ORDER BY, cast or filter that lets the index serve the query. Items test HNSW versus IVFFlat versus DiskANN, IVFFlat lists and rebuilds, operator-class matching and the ascending-order rule, ef_search and probes and their scopes, build memory and parallel workers, dimension limits and halfvec expression indexes, compute tiers, Premium SSD versus Premium SSD v2 and compute IOPS caps, azure_ai embedding calls, and RAG retrieval with metadata, jsonb and distance-threshold filters, iterative scans, partial indexes and partitions. Connection pooling, schema design and general data types belong to the previous topic.
AI-200 Azure Managed Redis: Caching, Expiration, Invalidation and Vector Search
- Modules, including RediSearch for vector search, are chosen only when an instance is created; RediSearch needs the Enterprise or Non-clustered policy and isn't available on Flash Optimized.
- Cache-aside: read Redis, on a miss load from the database and SET with a TTL in the same call. Writers stay unchanged; write-through needs every writer to change.
- Invalidate by deleting the key after the database write commits; deleting first lets a concurrent reader re-cache the old value. Use UNLINK for very large keys.
- SET without KEEPTTL, GETSET and DEL clear a TTL; HSET, INCR and LPUSH keep it. TTL returns -1 for no expiry and -2 for a missing key.
- The default eviction policy is volatile-lru: only keys with a TTL can be evicted, so a TTL doubles as an eviction marker. AllKeysLRU makes every key a candidate.
- With the OSS clustering policy, multi-key commands and transactions need one hash slot; a shared {hash tag} keeps related keys together.
- Spread expirations with TTL jitter and let one caller rebuild a missing key with a SET NX EX lock.
- Hash vectors are raw bytes of DIM × TYPE (np.float32 then tobytes()); JSON vectors are arrays of DIM numbers. Mismatches show as indexing failures.
- FLAT is exact, HNSW approximate; raise EF_RUNTIME per query for more recall without a rebuild. FT.SEARCH returns 10 results unless LIMIT says otherwise, and lower distance means more similar.
- Semantic caches match on prompt meaning only: start with a strict distance_threshold, filter by tenant and version the cache by model and prompt template.
How the exam tests this
Questions on this topic are short Azure scenarios built around one deciding requirement, such as a freshness target, a code change that isn't allowed, an atomicity or exactness need, or a limit on configuration effort. Several show a redis-py call, an FT.CREATE field definition or an FT.SEARCH query and ask which argument or change completes or fixes it, so you need the real option and parameter names, the Entra token scope and how vectors are encoded for hash and JSON storage. The wrong options are genuine Redis or Azure features that work in other situations, so read each requirement before choosing. Some items ask you to select two.
Connect to and consume Azure services
24% of the examAI-200 Service Bus and Event Grid: Messaging and Event-Driven AI Solutions
- Service Bus stores work until a consumer settles it (days if needed); Event Grid pushes notifications and stops retrying after at most 24 hours. A Service Bus queue can be an Event Grid handler to get both.
- A queue gives each message to one receiver; a topic gives every subscription its own copy. Instances of one service share a queue or subscription; different services get their own subscriptions.
- Basic tier has queues only; topics, sessions and duplicate detection need Standard or Premium, and sessions and duplicate detection must be enabled when the entity is created.
- Use peek-lock and complete after the result is stored; abandon retries now, defer parks a received message, and AutoLockRenewer covers work longer than the lock duration (5 minutes at most).
- Messages reach the dead-letter subqueue after the maximum delivery count (default 10) or on expiry only when dead-lettering on expiration is on; read them with sub_queue=ServiceBusSubQueue.DEAD_LETTER and resubmit them yourself.
- Duplicate detection compares only message_id within the history window; subscription rules are ORed, and the $Default true filter must go before a narrower filter has any effect.
- Keyless access is ServiceBusClient(fully qualified namespace, DefaultAzureCredential()) plus a data role (Data Sender, Data Receiver) at the narrowest scope; Contributor gives no data access.
- A custom topic's input schema is fixed at creation and the delivery schema is per subscription; CloudEvents delivery to a webhook uses the OPTIONS / WebHook-Allowed-Origin handshake.
- Event Grid filters: values within one filter OR, separate filters AND, negated operators such as StringNotIn match a missing key (add IsNotNull); success is 200-204 within 30 seconds; delivery is at least once and unordered.
- Retries end at max attempts (1-30) or event TTL (1-1,440 minutes), whichever comes first; dead-letter only to a Blob container, off by default. Namespace topics pull CloudEvents and settle with acknowledge, release, reject or renew_locks.
How the exam tests this
Questions on this topic are short Azure scenarios with one or two deciding requirements, such as no message loss, processing by exactly one worker, per-customer order, no keys, least privilege, least development effort or a time limit on usefulness. Several show a Python azure-servicebus or azure-eventgrid call with a missing argument, or an advancedFilters JSON block, and ask which line completes it. Expect near-twin options: queue versus topic, abandon versus defer, scheduling versus deferral, data roles versus management roles, input versus delivery schema, values in one filter versus separate filters, attempts versus time-to-live, and release versus reject. Some items are troubleshooting: a symptom such as duplicates, MessageLockLostError, messages in the dead-letter queue or a failed webhook validation, and you pick the cause or fix. Multiple-response items ask for two actions that together meet the requirement.
AI-200 Azure Functions: Triggers, Bindings, Configuration and Deployment
- Python v2 apps have one func.FunctionApp in function_app.py; split code with func.Blueprint and app.register_functions. A failed top-level import leaves the app with no functions.
- Routes are relative to routePrefix (api by default, set in host.json); read path values from req.route_params; with an empty prefix, routes whose first segment is admin or runtime collide with the host's reserved paths.
- FUNCTION level accepts a function key or any host key; ADMIN needs the master key; system keys are for extension webhooks. Keys aren't enforced locally. Use App Service Authentication for user sign-in and platform CORS for browsers.
- Output bindings write after the function returns, so their errors can't be caught; use a module-scope SDK client when you must handle failures.
- Timer schedules are six-field NCRONTAB in UTC; Flex Consumption doesn't support WEBSITE_TIME_ZONE or TZ. One instance runs each occurrence, but every slot runs its own.
- Storage queue messages move to <queue>-poison after maxDequeueCount (default 5) attempts; concurrency per instance is batchSize + newBatchThreshold.
- Retry policies cover only Timer, Cosmos DB, Event Hubs and Kafka; Service Bus uses its max delivery count and dead-letter queue.
- Identity connections use <prefix>__fullyQualifiedNamespace, __serviceUri (or __blobServiceUri + __queueServiceUri for blob triggers), __accountEndpoint, or AzureWebJobsStorage__accountName, with data-plane roles.
- Flex Consumption: per-function scale groups, always ready per group outside the maximum instance count, Event Grid-only blob triggers, blob-container packages and no deployment slots.
- HTTP responses must return within 230 seconds on every plan whatever functionTimeout says; use the Durable async HTTP API or a queue for long work. Mark environment-specific settings as slot settings.
How the exam tests this
Questions on this topic are short Azure Functions scenarios with one deciding requirement, such as keeping one function app, keeping the Flex Consumption plan, no keys in settings, least privilege, no retry loop in code, or a release process built on slot swaps. Many show a Python v2 snippet (route decorators, func.Out, Cosmos DB input bindings, Durable client calls) or a host.json fragment and ask which value completes it; others ask which hosting plan, app setting, key or CLI command meets every stated constraint. Expect near-twin choices: route_params versus params, host versus function keys, retry policies versus built-in trigger retries, __serviceUri versus separate blob and queue URIs, and always ready versus prewarmed instances.
Secure, monitor, and troubleshoot Azure solutions
24% of the examAI-200 Azure Key Vault and App Configuration: Secret Retrieval, Rotation and Dynamic Settings
- get_secret(name) returns the latest version; pass version= only to pin. Property listings never include values.
- On an RBAC vault, Secrets User reads, Secrets Officer writes and rotates, Crypto Officer manages keys; Key Vault Contributor has no data access and access policies are ignored.
- set_secret always creates a new version; update_secret_properties changes tags, enabled and dates without one. Disabled versions are blocked, expired ones are still readable.
- Secrets rotate through code: SecretNearExpiry (30 days before exp, which must be set) triggers a function holding Secrets Officer that changes the source first, then the vault.
- Two-credential rotation regenerates the key the latest version doesn't hold, tracked with a CredentialId tag; regenerating a key revokes SAS tokens it signed.
- Keys rotate natively with a rotation policy (minimum 7 days); imported keys use a Notify action, which needs timeBeforeExpiry, a policy expiryTime and a key expiration date.
- Soft delete reserves the name for 7 to 90 days fixed at vault creation; recover to reuse it, purge to free it, and purge protection can never be turned off.
- App Configuration's load() reads unlabelled keys by default; later selectors win; refresh happens only when the app calls refresh(), and the sentinel is updated last.
- Key Vault references are resolved by the app's own identity via keyvault_credential; secret_refresh_interval picks up rotated secrets.
- Snapshots are immutable (only Key composition loads); feature flags need feature_flag_enabled, their own selectors and their own refresh switch.
How the exam tests this
Questions on this topic are short developer scenarios with one deciding requirement, such as least privilege, keeping old versions, no new version, no downtime, no custom code, no restart or nothing left behind. Several show Python SecretClient or azure-appconfiguration-provider code with a missing call or argument and ask which line completes it. Expect near-twin options: get_secret versus property listings, set_secret versus update_secret_properties, Secrets User versus Secrets Officer versus Key Vault Reader or Contributor, data-plane versus control-plane App Configuration roles, SecretNearExpiry versus SecretNewVersionCreated, rotation policies versus event-driven functions, Rotate versus Notify actions, recover versus purge, selector order, and settings refresh versus feature flag refresh. Troubleshooting items give a symptom (a 403, a conflict on create, a function that never runs, failures after each rotation, stale settings) and ask for the cause or fix. Some items are select-two.
AI-200 OpenTelemetry Tracing and KQL: Monitor and Troubleshoot Azure Solutions
- use_microsoft_opentelemetry(enable_azure_monitor=True) plus the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable is the production setup; never initialize two distros or re-instrument a bundled library.
- With local authentication disabled, telemetry needs azure_monitor_exporter_credential and the Monitoring Metrics Publisher role on the Application Insights resource itself.
- Cloud role name = service.namespace + '.' + service.name; OTEL_SERVICE_NAME overrides service.name in OTEL_RESOURCE_ATTRIBUTES, and service.instance.id is the role instance.
- SERVER and CONSUMER spans become requests; CLIENT, PRODUCER and INTERNAL (the default, InProc) become dependencies.
- start_as_current_span makes the span current and ends it on exit; span processors enrich every span in on_start, because on_end gets a read-only span.
- OperationId is the trace ID, ParentId is the direct parent's span ID; use inject/extract when no instrumentation carries traceparent.
- Escaping exceptions are recorded and set ERROR automatically; handled ones need record_exception plus set_status, and manual recording before a re-raise duplicates unless record_exception=False.
- The Python default sampler is rate-limited (traces per second); fixed_percentage takes a 0–1 ratio; metrics are never sampled and log sampling by trace is opt-in.
- Filter HTTP paths with OTEL_PYTHON_EXCLUDED_URLS, other spans with a TraceFlags.DEFAULT processor, and rows at ingestion with a workspace transformation DCR.
- In KQL, count sampled data with sum(ItemCount), remember join defaults to innerunique, and query platform metrics in AzureMetrics only after a diagnostic setting exports them.
How the exam tests this
Questions on this topic are developer scenarios built around Python services that use the Microsoft OpenTelemetry Distro, plus KQL against the workspace App* tables and AzureMetrics. Each stem carries a deciding requirement, such as a constraint on code changes, cost, identity or query accuracy. Several show a code or query snippet with a missing line, argument, operator or join condition. Expect near-twin options: span kinds and the table each lands in, start_as_current_span versus start_span and end_on_exit, on_start versus on_end, OTEL_SERVICE_NAME versus resource attributes, rate-limited versus fixed-percentage samplers and what their argument means, excluded URLs versus span processors versus transformation DCRs, counter versus up-down counter versus histogram versus observable gauge, has versus contains versus =~, count() versus sum(ItemCount), join kinds, Id versus ParentId versus OperationId, and AzureMetrics versus AppMetrics. Troubleshooting items describe a symptom (duplicates, missing info logs, a broken trace, a flat chart, rejected telemetry) and ask for the cause or fix. Some items are select-two.
Where these AI-200 facts came from
AI-200 cheat sheet: your questions
Source
Exam structure, domain weights and scoring on this page come from the official AI-200 exam guide.
- Microsoft AI-200 study guide — Microsoft Learn