miatz™
Verify a credentialLog inSit ChuunSit Chuun
  • Learners
  • Mentors
  • Business
CoursesApplied AIProgramResidencyPlaygroundsWar RoomsXookAtlasReadiness Check
miatz

The AI-era engineering institute. The machines got fast — we train the drivers. Real work, a daily loop that compounds, and a record that proves you can think.

Toggle theme
Explore
  • Courses
  • Applied AI
  • Program
  • Residency
  • Playgrounds
  • War Rooms
  • Xook
  • Atlas
  • Readiness Check
  • Tokenizer Lab
  • Chunking Lab
  • Prompt Anatomy
  • Calibration Lab
  • All playgrounds →
Learn
  • Courses
  • The Method
  • The Residency
  • Chuun · Entrance Examination
  • Manifesto
  • The Itz'at credential
  • Verified engineers
  • Playground Catalog
  • AI Use-Case Atlas
  • AI Readiness Check
  • Guides
  • Glossary
  • Compare approaches
  • Blog
  • What's New
For teams
  • For Students
  • For Mentors
  • For Business
  • Classroom migration
  • Miatz Index
  • API reference
  • Sit Chuun
  • Log in
Company
  • About
  • Experts
  • Why it's free
  • Pricing
  • FAQ
  • Contact
  • Privacy Policy
  • Terms of Service
  • Your data & privacy requests
  • Grievance redressal
  • Security & disclosure
  • Subprocessors
  • Data Processing Agreement
Take miatz with you

The Android app is live. iOS is on the way.

Available on AndroidGet it on Google Play
Not yet on iPhoneiOS — use the web app

Miatz Private Limited

Registered office:
C-101, Lotus Tower, Arge Urban Bloom, 30/A, 4th Main, 2nd Stage, Yeswanthpur, Bengaluru, Karnataka 560022, India
CIN:
U62013KA2026PTC226418
GSTIN:
29AAVCM3922D1Z6
Phone:
+91 82802 73456
Email:
hello@miatz.com
Website:
miatz.com
Grievance Officer:
Aishwarya · aishwarya@miatz.com · replies within 30 days
© 2026 miatz · Miatz Private Limited · Built in Bangalore·PrivacyTerms

miatz™, Itz'at™, Tuukul™, T'aan™, Kanan™, Xook™ and Chuun™ are trademarks of Miatz Private Limited (registrations in progress) · what the names mean

miatz
Glossary

HNSW Index

HNSW is a graph-based approximate nearest-neighbor index that finds near-matches in roughly logarithmic time by searching multiple layers of shortcuts.

HNSW (Hierarchical Navigable Small World) is a graph-based approximate nearest-neighbor algorithm that organizes vectors into multiple layers of a navigable graph, so a search can hop toward the right neighborhood in roughly logarithmic time instead of scanning every vector.

It is the index most vector databases reach for by default, because it hits a rare sweet spot: high recall, low latency, and reasonable memory use, without the accuracy cliffs that plague simpler ANN methods.

How it works

HNSW builds several stacked graphs. The top layer is sparse, holding a small number of vectors connected to their nearest neighbors as long-range "highways." Each layer below is progressively denser, and the bottom layer contains every vector, densely interconnected with its true nearest neighbors. A search starts at the top layer's entry point, greedily walks toward the query vector using the sparse long-range edges, then drops down a layer once it stops improving, repeating until it reaches the bottom layer and does a fine-grained local search.

The construction and search behavior are tuned by two parameters: M, the number of edges each node keeps (typically 16-64 — more edges means better recall at the cost of memory), and ef_search, how many candidates the search keeps in its frontier at query time (higher means slower but more accurate). Both are the practical dials that trade recall against speed on a live system.

Why it matters

Brute-force nearest-neighbor search is exact but scales linearly with collection size — untenable once a collection reaches millions of vectors and needs sub-100-millisecond responses. HNSW's layered structure turns that linear scan into something close to logarithmic: the number of comparisons grows with the log of the collection size rather than the collection size itself, which is the only reason semantic search over tens of millions of documents can respond in real time. The cost is that HNSW is approximate — it can miss the true nearest neighbor occasionally in exchange for that speed, which is why recall@k, not just latency, has to be measured and tuned, not assumed.

A worked example

A collection of 1,000,000 vectors has log2(1,000,000) ≈ 19.9 — the theoretical depth HNSW's layers are built around. In practice, a query run with ef_search = 100 visits on the order of a few thousand candidate nodes to find its answer, versus 1,000,000 vector comparisons for a brute-force scan over the same collection — roughly a 10,000x reduction in comparisons for that ef_search setting, typically landing recall@10 in the mid-90s to high-90s percent range depending on how M and ef_search are tuned. Push ef_search higher and recall creeps closer to exact search's 100 percent, at the cost of visiting more nodes and adding latency back.

How miatz teaches it

Learners build a miniature HNSW graph by hand on paper — a dozen points, two layers — before ever running the real algorithm, walking a greedy search themselves so the "hop through highways, then search locally" behavior is felt rather than just read as an equation. Only then do they benchmark a real HNSW index against brute force on a full-size corpus.

Related terms

Vector Database Cosine Similarity Semantic Search Recall@k

Learn this in a course

AIE-202 · RAG Foundations

Learn it by doing it.

Miatz turns definitions into judgment — the free founding cohort trains you on exactly these concepts, hands-on.

Join free More definitions