Q7 Cosmos DB Domain 2 · 25–30% of exam

You're adding vector similarity search to a new Azure Cosmos DB for NoSQL container. What must you configure for the embedding property?

  1. A A vector embedding policy and a vector index in the indexing policy (correct answer)
  2. B A composite index on the embedding property
  3. C A unique key policy on the embedding property
  4. D A change feed processor that calculates distances

Shortcut: Cosmos DB vector search = vector embedding policy + vector index, queried with VectorDistance(). Composite indexes and unique keys don't support similarity search, and the change feed doesn't calculate distances.

The vector embedding policy declares the property's path, data type, dimensions and distance function, and a vector index such as DiskANN or quantizedFlat makes VectorDistance() queries fast and cheap. Composite indexes and unique keys don't support similarity search, and the change feed doesn't calculate distances.