Explore / Microsoft Azure AI Cloud Developer (AI-200) Exam Prep / Practice questions
Microsoft Azure AI Cloud Developer (AI-200) practice questions
10 questions from the bank behind this course's timed mock. Free to read and to answer, no account needed, and each has its answer and an explanation. They belong to Microsoft Azure AI Cloud Developer (AI-200) Exam Prep.
Answer them one at a time →Read lesson 1 free
Question 1
Priya passed AI-200 and holds Microsoft Certified: Azure AI Cloud Developer Associate. Her certification expires in four months. She wants to keep it active with the least cost and effort. What should she do?
- Take the free, online, unproctored renewal assessment on Microsoft Learn now, because she is inside the six-month renewal window
- Let the certification expire, then take the renewal assessment within six months after expiry
- Book and pay for AI-200 again through Pearson VUE before the expiry date
- Book a proctored renewal session at a Pearson VUE test centre
Show the answer
Answer: A. Take the free, online, unproctored renewal assessment on Microsoft Learn now, because she is inside the six-month renewal window
Associate certifications expire every year and are renewed with a free, unproctored online assessment on Microsoft Learn, taken in the six months before expiry. Retaking the paid exam would also work, but it costs money and takes far more effort than she needs to spend.
Question 2
You maintain a RAG API image that is built by an ACR task with the base image trigger enabled. The task has already run successfully once. The Dockerfile is multi-stage: the first stage is FROM python:3.12 AS builder and installs wheels, and the final stage is FROM contosoaiacr.azurecr.io/baseimages/python:3.12-slim and copies the wheels in. Microsoft patches python:3.12 on Docker Hub under the same tag. What happens?
- Nothing. ACR Tasks tracks only the final (runtime) stage's base image, so a patch to the builder-stage image does not trigger a rebuild.
- The task runs immediately, because ACR Tasks tracks every FROM line in the Dockerfile.
- The task fails, because the base image trigger doesn't support multi-stage Dockerfiles.
- The task runs within 10 to 60 minutes, because the builder stage's base image is on Docker Hub.
Show the answer
Answer: A. Nothing. ACR Tasks tracks only the final (runtime) stage's base image, so a patch to the builder-stage image does not trigger a rebuild.
In a multi-stage Dockerfile, ACR Tasks tracks only the final stage's base image, so patching the intermediate builder image starts no run. The 10 to 60 minute delay is how Docker Hub bases are checked, but only when that Docker Hub image is the tracked runtime base, which it is not here.
Question 3
A developer is deploying a Container Apps worker that reads from the Service Bus queue 'invoices'. The Service Bus connection string is already stored as a Container Apps secret named 'sb-invoices'. The scale rule must use this secret to authenticate. Which value should the developer pass to --scale-rule-auth?
- sb-invoices=connection
- connection=<SERVICE_BUS_CONNECTION_STRING>
- secretRef=sb-invoices
- connection=sb-invoices
Show the answer
Answer: D. connection=sb-invoices
The --scale-rule-auth format is triggerParameter=secretName, and the Service Bus scaler expects the trigger parameter 'connection', so the value is connection=sb-invoices. The reversed form 'sb-invoices=connection' puts the secret name where the trigger parameter belongs, so the mapping can't be resolved.
Question 4
A developer is tuning a Cosmos DB for NoSQL container that stores customer orders. The indexing policy includes `/*` and has two more entries: an excluded path `/customer/*` and an included path `/customer/email/?`. A support dashboard runs one query that filters on `c.customer.email` and another that filters on `c.customer.phone`. What happens to these two queries?
- The email filter uses the index, and the phone filter falls back to a scan because `/customer/phone` is covered by the exclusion.
- Both filters use the index because the root `/*` is included and that overrides every exclusion.
- The policy is rejected because a path can't be included under a node that is excluded.
- Both filters fall back to scans because `/customer/*` excludes everything under `customer`, including `email`.
Show the answer
Answer: A. The email filter uses the index, and the phone filter falls back to a scan because `/customer/phone` is covered by the exclusion.
When an included path and an excluded path conflict, the more precise one wins. `/customer/email/?` is deeper than `/customer/*`, so email stays indexed while phone stays excluded. The option saying both filters scan gets this rule backwards: the deeper inclusion beats the shallower exclusion.
Question 5
You run a change feed processor in .NET that pushes each changed product to an external search index. Sometimes the index API times out and the delegate throws an exception. The team sees some products sent to the index twice, and one malformed item keeps failing and holds up every change behind it in its range. What should you do?
- Add more compute instances than there are leases so that a spare instance can take over the failing batch
- Delete the lease document for the stuck range so that the processor skips the failing batch
- Write the checkpoint to the lease before calling the delegate so that each batch is delivered only once
- Make the indexing handler idempotent, and send a batch that keeps failing to an error store such as a queue or another container
Show the answer
Answer: D. Make the indexing handler idempotent, and send a batch that keeps failing to an error store such as a queue or another container
The checkpoint moves only after the delegate succeeds, so delivery is at least once. The handler therefore has to tolerate duplicates, and a batch that keeps failing should go to an error store so it stops blocking the range. Checkpointing before the delegate runs would lose changes whenever the delegate fails, and an instance beyond the lease count sits idle.
Question 6
You are an AI developer on a SaaS team. Chunk embeddings in the doc_chunks table were generated with your Azure OpenAI text-embedding-3-small deployment and are stored in a vector(1536) column. To improve quality, a teammate changed only the query path so that it calls a text-embedding-3-large deployment set to output 1536 dimensions. Queries still run without errors, but the retrieved chunks are now mostly irrelevant. What should you do?
- Use the same embedding deployment for queries and stored chunks: either revert the query path, or re-embed every stored chunk with the new deployment
- Raise hnsw.ef_search to 200 so the index considers more candidates before returning the top-k rows
- Rebuild the HNSW index with vector_ip_ops so the index matches the new model's output
- Change ORDER BY from <=> to <-> because vectors from the larger model must be compared with L2 distance
Show the answer
Answer: A. Use the same embedding deployment for queries and stored chunks: either revert the query path, or re-embed every stored chunk with the new deployment
Distances only mean something when the query and the stored chunks are embedded by the same model. Matching dimensions avoid an error but do not make the two vector spaces comparable. Raising ef_search only pulls more candidates from the same mismatched space, so relevance stays broken.
Question 7
You manage a Service Bus subscription named 'alerts' and have deleted its $Default rule. It now has three rules: R1 is a correlation filter on Label 'doc.uploaded' with no action. R2 is the SQL filter `pages > 20` with no action. R3 is the SQL filter `docType = 'contract'` with the action `SET priority = 'high'`. A publisher sends one message with subject 'doc.uploaded' and the application properties docType='contract' and pages=30. How many copies of the message land in 'alerts'?
- Three copies, one for each matching rule
- Two copies, both carrying priority='high' because R3's action applies to the whole subscription
- One copy, because a subscription never stores more than one copy of a message
- Two copies: one for R1 and R2 together, and one from R3 carrying priority='high'
Show the answer
Answer: D. Two copies: one for R1 and R2 together, and one from R3 carrying priority='high'
Rules without actions are combined with OR, so R1 and R2 together produce a single copy. Every matching rule with an action produces its own copy, so R3 adds a second copy. Three copies is wrong because R1 and R2 do not each get a separate copy, and R3's SET changes only the copy that R3 produced.
Question 8
You are on call for an AI document pipeline. An Event Grid subscription has max delivery attempts set to 10 and dead-lettering to a blob container that exists. You watch the logs and see the 10th delivery attempt fail with a 500. Two minutes later the dead-letter container is still empty, and the storage account is healthy. What is the most likely explanation?
- A 500 response is never dead-lettered; only 400 and 413 responses are sent to the dead-letter location
- Dead-lettering is off by default and stays off until you also turn on a BlobCreated subscription on the container
- Event Grid checks the event TTL only at the next scheduled attempt, so the event stays in the retry queue until its 24-hour TTL runs out
- Event Grid waits about five minutes after the last delivery attempt before it writes the dead-letter blob, so the blob has not been written yet
Show the answer
Answer: D. Event Grid waits about five minutes after the last delivery attempt before it writes the dead-letter blob, so the blob has not been written yet
Event Grid holds a dead-lettered event for about five minutes after the last attempt before writing it, to save storage operations, so an empty container two minutes later is normal. The TTL distractor doesn't apply: the max-attempts limit has already been reached, and delivery stops at whichever limit comes first.
Question 9
Your team runs a nightly Python job in Azure that generates a new API key for a model endpoint. It stores the key with client.set_secret("openai-key", new_value) on an RBAC-enabled vault. The job's managed identity has the Key Vault Secrets User role at vault scope, and every run fails with a 403. The security team requires least privilege. Which role should you give the identity instead?
- Key Vault Contributor
- Key Vault Administrator
- Key Vault Secrets Officer
- Key Vault Reader
Show the answer
Answer: C. Key Vault Secrets Officer
Writing a secret is a data plane action, and Key Vault Secrets Officer allows any action on secrets except managing permissions, which is the smallest role that permits set_secret. Key Vault Administrator would also work, but it covers all data plane operations on keys, secrets and certificates, so it grants more than the job needs.
Question 10
You maintain a RAG service that uses the Azure Monitor OpenTelemetry Distro for Python. Every failed LLM call now shows two identical exception events on its span in Application Insights. The span must still be marked failed, and the TimeoutError must still reach the caller. What should you change? ```python with tracer.start_as_current_span("rag.llm") as span: try: reply = call_llm(q) except TimeoutError as ex: span.record_exception(ex) span.set_status(Status(StatusCode.ERROR, "LLM timeout")) raise ```
- Remove the span.set_status(...) call and keep record_exception and raise.
- Remove the raise statement so the exception no longer escapes the with block.
- Pass record_exception=False to start_as_current_span() and keep the except block as it is.
- Open the span with kind=SpanKind.SERVER so the error is recorded once, in the requests table.
Show the answer
Answer: C. Pass record_exception=False to start_as_current_span() and keep the except block as it is.
With the default arguments, an exception that escapes the with block is recorded automatically, so the explicit record_exception call adds a second event. Turning off the automatic recording leaves one event, the explicit status still marks the span failed, and the raise still re-throws. Removing the raise would also leave one event, but the caller would no longer get the TimeoutError, which breaks a stated requirement.
The full timed mock
50 questions in 120 minutes, with a pass mark of 70%. Each paper is drawn from a bank of questions written for the mock alone, and these 10 are left out of it. Full access opens it, with every level of the course.
LevelUpWith is independent of the organisation that sets this exam. These questions were written for this course; they are not taken from the exam.