AI-200 practice questions, page 7 of 7, with answer review and explanations.
Question 31
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?
Create B-tree indexes on frequently filtered metadata columns.
Store embeddings as JSON.
Increase embedding dimensionality.
Increase statement timeout.
Question 32
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?
Use offset pagination.
Enforce strong consistency.
Group by embedding value.
Limit the number of results.
Question 33
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?
Create a customer-managed key (CMK) and store the key in a new Azure Key Vault instance.
Create a data encryption key (DEK) by using the Azure Cosmos DB SDK and store the key in Azure Cosmos DB.
Create a Microsoft Entra ID managed identity and assign the identity to a new Azure Key Vault instance.
Create a new container to include an encryption policy with the JSON properties to be encrypted.
Question 34
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.
Configure a cache notification for key space events.
Delete related cache keys when the source data changes.