Skip to content
LearningPathX
Learning PathsFree TestsExam InfoHow it worksNews
Sign inChoose a certification
  1. Home/
  2. Certifications/
  3. AI-300/
  4. AI-300 Learning Path/
  5. Study FAQs/
  6. How do HNSW and exhaustive nearest-neighbor search differ in Azure AI Search?

Study FAQ

How do HNSW and exhaustive nearest-neighbor search differ in Azure AI Search?

Exam · AI-300Knowledge domain · Optimize generative AI systems and model performanceUpdated Nov 25, 2026
Also asked as 2
  • When should I compare HNSW retrieval with exhaustive KNN in Azure AI Search?
  • What are the recall and resource tradeoffs between approximate HNSW and exhaustive vector search?

Answer

HNSW performs approximate nearest-neighbor retrieval, while exhaustive KNN scans the vector space to find the nearest neighbors under the configured metric. The choice trades retrieval efficiency, resource use and nearest-neighbor recall; it does not by itself establish task relevance.

HNSW uses a graph to narrow the search and supports efficient retrieval at scale. Exhaustive search is more computationally intensive and can provide an exact nearest-neighbor reference for evaluating approximate recall. Azure AI Search supports exhaustive querying on HNSW-indexed fields, but an exhaustive-only index lacks the graph needed for HNSW querying.

Even exact nearest neighbors can be irrelevant to the user's evidence need. Check whether the answer-bearing passage was indexed, represented with the matching embedding model, eligible for the query and retained for generation. Evaluate retrieval with reviewed query/evidence cases and operational constraints rather than selecting an algorithm from final-answer fluency alone.

Microsoft Learn

  • Relevance in vector search

Full explanation

AI-300: Designing Vector, Keyword, and Hybrid RAG Retrieval

Study guide · AI-300

Read the full explanation →
← Back to AI-300 FAQsView learning path →

Related questions

When should a RAG system use keyword, vector or hybrid retrieval? →How do I choose between SFT, DPO and RFT in Microsoft Foundry? →How do I compare RAG retrieval configurations fairly in an offline experiment? →How do Developer training and Developer serving differ for fine-tuned models? →Can I fine-tune any hosted embedding model for my domain? →What evidence justifies changing a RAG embedding model? →
LearningPathX

A focused path to certification, one clear step at a time.

© 2026 LearningPathX. All rights reserved.

Product

CertificationsLearning PathsFree TestsHow it worksNews

Company

SubscriptionHelp centerContact usPrivacyTerms

Follow us

Your privacy choices

We use analytics cookies to understand how LearningPathX is used and improve your learning experience. Analytics will only start after you accept.