Courseiva
Data Management Services And Vector SearchmediumMultiple ChoiceObjective-mapped

AI-200 Data Management Services And Vector Search Practice Question

You are querying an Azure Cosmos DB for NoSQL container using vector search. You execute a query using the VectorDistance() system function. Which query structure is required to properly execute this vector search?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

SELECT TOP 10 c.id, VectorDistance(c.vectorProp, [0.1, 0.2]) AS score FROM c ORDER BY VectorDistance(c.vectorProp, [0.1, 0.2])

Vector search queries in Azure Cosmos DB for NoSQL require using the VectorDistance system function in the ORDER BY clause to sort by similarity and selecting the top results using TOP.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • SELECT TOP 10 c.id FROM c WHERE VectorDistance(c.vectorProp, [0.1, 0.2]) > 0.9

    Why it's wrong here

    VectorDistance should be used in the ORDER BY clause combined with TOP rather than a strict threshold comparison in the WHERE clause unless utilizing specific index filters.

  • JOIN vectorIndex ON c.id = vectorIndex.id

    Why it's wrong here

    Azure Cosmos DB does not require an explicit SQL JOIN for vector indexes; the system function evaluates directly against the document property.

  • SELECT TOP 10 c.id, VectorDistance(c.vectorProp, [0.1, 0.2]) AS score FROM c ORDER BY VectorDistance(c.vectorProp, [0.1, 0.2])

    Why this is correct

    Vector distance queries require selecting the function and ordering by it using TOP to retrieve the nearest neighbors.

  • GROUP BY VectorDistance(c.vectorProp, [0.1, 0.2])

    Why it's wrong here

    Vector search queries do not use GROUP BY clauses for similarity ranking.

About these practice questions

This AI-200 question is part of Courseiva's 503-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official Microsoft exam blueprint

This AI-200 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-200 exam.