DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
AI for Frontend Developers Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
medium
AI for Frontend Developers
A toy implementation ranks stored chunks by cosine similarity to a query vector and returns the top K. What does the vector database's ANN (approximate nearest neighbor) index, like HNSW, provide over this brute-force approach?
A
A fundamentally different similarity metric
B
The same underlying similarity math, but optimized to avoid a full linear scan across every stored vector at scale
C
It removes the need for embeddings entirely
D
It stores the text differently, with no relation to search speed
Check Answer