Free AI-200 Exam Braindumps
Developing AI Cloud Solutions on Azure Questions 26–30 (page: 7)

Updated On: 22-Aug-2026

An application performs similarity search across 5 million embeddings stored in Azure Database for PostgreSQL with pgvector. Queries often filter by department before ranking by cosine distance.
P95 latency for vector similarity queries exceeds the SLA target. Monitoring shows sustained high CPU use during query execution.
You need to reduce P95 latency for filtered vector similarity queries.
What should you do?

  1. Create B-tree indexes on frequently filtered metadata columns.
  2. Store embeddings as JSON.
  3. Increase embedding dimensionality.
  4. Increase statement timeout.

Answer(s): A

Explanation:

Creating a B-tree index on the department column will help, but only if you use the correct indexing strategy, as a standard B-tree index alone is often ignored during vector searches.
When you run a query that filters by metadata before performing a vector similarity search, PostgreSQL must choose between filtering the rows first or searching the vector index first. In many cases, a standard B-tree index on the metadata column combined with an HNSW/IVFFlat index on the vector column results in pre-
filtering that defaults to a sequential scan, or post-filtering that returns fewer results than requested.


Reference:

https://learn.microsoft.com/en-us/azure/horizondb/ai/vector-search-pgvector



You store embeddings in a property named embedding in an Azure Cosmos DB for NoSQL container.
You must retrieve the five most similar documents to an input embedding.
You need to construct the similarity query.
What should you do?

  1. Use offset pagination.
  2. Enforce strong consistency.
  3. Group by embedding value.
  4. Limit the number of results.

Answer(s): D

Explanation:

To retrieve the five most similar documents from Azure Cosmos DB for NoSQL using vector search, you must limit the number of results.
When performing vector similarity searches using the VectorDistance() function, you must restrict the output size directly in the query.


Reference:

https://stemhash.com/semantic-search-with-llms/



You are developing a Java application to be deployed in Azure. The application stores sensitive data in Azure Cosmos DB.
You need to configure Always Encrypted to encrypt the sensitive data inside the application.
What should you do first?

  1. Create a customer-managed key (CMK) and store the key in a new Azure Key Vault instance.
  2. Create a data encryption key (DEK) by using the Azure Cosmos DB SDK and store the key in Azure
    Cosmos D
  3. Create a Microsoft Entra ID managed identity and assign the identity to a new Azure Key Vault instance.
  4. Create a new container to include an encryption policy with the JSON properties to be encrypted.

Answer(s): A

Explanation:

To configure Always Encrypted (client-side encryption) for your Java application using Azure Cosmos DB, you must first create a customer-managed key (CMK) and store it in a new Azure Key Vault instance


Reference:

https://lennilobel.wordpress.com/2022/08/20/configuring-client-side-encryption-aka-always-encrypted-in-azure-cosmos-db/



You are developing an AI search API that caches semantic search results in Redis.
Search results must remain cached for 10 minutes. If the underlying data changes, cached entries must NOT be returned.
You need to implement a cache-aside strategy to ensure data consistency.
Which two actions should you perform? Each correct answer presents part of the solution.
Note: Each correct selection is worth one point.

  1. Configure a cache notification for key space events.
  2. Delete related cache keys when the source data changes.
  3. Implement sliding expiration based on key access.
  4. Configure a 10-minute Time to Live on each key.

Answer(s): B,D

Explanation:

Delete keys on mutation. Implement an event-driven or database-hook system to purge related Redis keys the moment the source data updates.
Use absolute expiration. Set a strict, un-extendable Time-To-Live (TTL) of 10 minutes when writing to the cache, ensuring the data naturally expires even if a deletion event is missed.
Incorrect: [Not C] Implementing a sliding expiration is not a good step for this specific architecture because it violates the requirement that entries must not be returned if the underlying data changes.


Reference:

https://medium.com/real-world-net/net-caching-strategies-compared-redis-vs-memory-vs-hybrid-b8b8be1e708d



You store embeddings in Redis by using keys formatted as doc:(id). Some embeddings are accessed frequently. Others are rarely used.
You need to implement a caching strategy that keeps only frequently accessed embeddings in memory.
What should you use?

  1. volatile-ttl
  2. allkeys-lru
  3. EXPIRE command
  4. time-window expiration

Answer(s): B

Explanation:

To implement this strategy, you should use allkeys-lru combined with the EXPIRE command as a secondary fallback.
Primary Mechanism: Configure your Redis maxmemory-policy to allkeys-lru.
Secondary Mechanism: Apply the EXPIRE command to your keys as a safety net.
Why allkeys-lru is the Best Choice Memory Management: It automatically evicts the Least Recently Used (LRU) keys across your entire dataset when Redis hits its memory limit.
Frequent Access: It guarantees that frequently accessed embeddings stay in memory, regardless of when they were created.Prefix Independent: It scans all keys, making it perfect for your doc:(id) format


Reference:

https://rahulchowdhury.in/blog/redis-caching-patterns-every-mern-dev



Viewing page 7 of 27
Viewing questions 31 - 35 out of 174 questions


Post your Comments and Discuss Microsoft AI-200 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!