DP-420 · Sample questions
10 real questions from the CertifyDeck DP-420 bank, spread across the domains of the official Microsoft Certified: Azure Cosmos DB AI Developer Associate skills outline, with the correct answer and a full explanation of why the other options are wrong. They are original questions written from the public syllabus, not exam dumps, and they are the same style you will find in the practice tests and mock exams.
Correct answer: C. Filter each array in a subquery, as in JOIN (SELECT VALUE t FROM t IN c.tags WHERE t.name = 'vegan').
A JOIN builds the cross product of all array elements of each matching item before the WHERE clause runs; multi-value subqueries push each predicate next to its array, so far fewer tuples are produced and the RU charge drops. Changing the page size only changes how results are returned, not how many tuples the engine evaluates. Sorting does not reduce the cross product, and user-defined functions add runtime cost and cannot use the index.
Correct answer: B. The PartitionedMetrics list from Diagnostics.GetQueryMetrics(), grouped by PartitionKeyRangeId
ServerSideCumulativeMetrics exposes PartitionedMetrics, a per-physical-partition list with an identifier and request charge, and grouping it by PartitionKeyRangeId across round trips shows whether one partition is causing the problem. CumulativeMetrics is tempting, but it aggregates over all partitions, so a single slow partition disappears in the total. The summed RequestCharge has the same problem, and index metrics describe index usage, not per-partition cost.
Correct answer: B. A fleet whose fleetspace has a throughput pool for the accounts
Fleet pools share RU/s at the fleetspace level across accounts even when they span different subscriptions and resource groups, and each resource keeps its dedicated RU/s while drawing extra RU/s from the pool when it exceeds them. Raising each container's autoscale maximum would also absorb spikes, but it increases provisioned RU/s per account, which the stem rules out; a shared throughput database only shares RU/s within one database of one account, and priority-based execution adds no capacity.
Correct answer: A. IfNoneMatchEtag set to the cached ETag
The If-None-Match ETag condition, exposed as IfNoneMatchEtag, is the option most commonly used to detect changes to a resource: the service evaluates the cached value against the item's current _etag, which changes on every update. IfMatchEtag is the condition for protecting writes against concurrent changes, a session token is for session consistency and isn't an ETag, and a weaker consistency level doesn't tell the service which version the client already has.
Correct answer: C. Create a new container with the three key paths and copy the data into it.
Hierarchical partition keys must be set when a container is created and can't be added to an existing container, so you create a new container with the desired paths and move the data with a container copy job, or with the change feed for a live migration, then point the application to it. Redeploying the template or switching the partition kind would be an in-place change that isn't supported, and large partition keys only affect key length.
Correct answer: D. Store comments as items with articleId; embed only the latest few.
The documented pattern keeps a small recentComments array in the post and stores each comment as its own item that references the post identifier, so the page is one read while comments grow freely. Embedding all comments, or even an ever-growing array of ids, makes the item grow without bound, which the documentation says to avoid. Storing no comments in the article would need a second request for the three latest comments on every page view.
Correct answer: A. Metadata with operationType delete, the item's id and partition key, and timeToLiveExpired set to true
A delete record in all versions and deletes mode contains only metadata: operationType delete, lsn, crts, previousImageLSN, timeToLiveExpired (true when the delete came from TTL expiration), and the id and partition key of the deleted item. Receiving the previous version of deleted or updated items isn't currently available, so the plan to archive full content from the delete record won't work. TTL deletes are captured, although they appear when the item is purged rather than immediately at expiry.
Correct answer: A. Add WHERE c.tenantId = @tenantId and keep the same ORDER BY RANK clause.
A hybrid query accepts a WHERE clause next to ORDER BY RANK RRF, as in the documented memory retrieval query filtered by thread, and filtering on the partition key lets the engine prune the partitions of other tenants. Adding another FullTextScore inside RRF only changes the ranking and still lets other tenants' tickets in. The weights array sets the importance of each scoring function, not of tenants, and FullTextContains on the content looks for the tenant id inside the ticket text.
Correct answer: D. Generate embeddings with fewer dimensions and set that value in the vector policy.
The performance guide says to start with the model's default dimension and, if cost or latency is a concern and recall is already high, reduce the dimensions, because lower dimensions give a smaller storage footprint and lower insert and search RU cost. More dimensions and a higher searchListSizeMultiplier both raise cost. A flat index is the most expensive option at scale, and bool_expr true forces a brute-force search that costs more than an indexed one.
Correct answer: C. Store one item per turn with a ttl of 604800 seconds.
TTL applies at item granularity and counts from the item's last modification, so with one thread per item TTL can only expire the whole thread, and every new message resets the timer; the agent memory guidance lists this as a limitation of that model. Storing one item per turn lets each turn expire on its own while newer turns remain. A daily patch job could remove old messages, but it is manual deletion with extra RU cost rather than automatic expiry.
Answer each question before opening the explanation, and write down why you discarded the other options. On DP-420, most mistakes come from choosing an option that is technically possible but does not meet every requirement in the scenario.
These 10 questions are a taste of the format, not a diagnostic. To know which domains you fail, practice by domain for free and take a timed mock exam that mirrors the official weights and duration.
Start for free, no sign-up or card. Every question includes an explanation like the ones above, and the mock exam reproduces the official DP-420 format.