Which distance metric in Azure Cosmos DB vector search calculates the inner product of two vectors, measuring both magnitude and angle?
The dotproduct metric computes the inner product of two vectors, combining both magnitude and angle rather than angle alone. This satisfies the stem's requirement for a metric measuring both properties, distinguishing it from cosine, which normalises magnitudes away.
Why this answer
The dotproduct distance metric in Cosmos DB vector search computes the inner product of two vectors, which incorporates both magnitude and angle. It is commonly used when vector magnitudes carry meaning, such as in recommendation systems where popularity or confidence scores matter.
Exam trap
AI-200 often tests the confusion between cosine and dotproduct — the trap is forgetting that cosine ignores magnitude while dotproduct includes it, which changes ranking when vectors are not normalized.
How to eliminate wrong answers
Option B is wrong because cosine similarity measures only the angle between vectors, ignoring magnitude (it normalizes vectors to unit length). Option C is wrong because euclidean distance measures straight-line distance between vector endpoints, not inner product. Option D is wrong because manhattan distance sums absolute differences along each dimension, which is unrelated to inner product.