Drag the query star to any position and see the nearest neighbors update instantly
Spotify's 'Recommended for You' and Google's semantic search both work by finding the nearest neighbors of your query in a high-dimensional embedding space — the same algorithm you're exploring here.
Drag the star to explore how query position changes which documents are retrieved.
Top-3 Results (Euclidean)
python data science
Data Science Cluster
numpy arrays
Data Science Cluster
pandas dataframe
Data Science Cluster
Legend
Euclidean Distance — d(a, b) = √((ax−bx)² + (ay−by)²)
Measures the straight-line distance between two points. Sensitive to the absolute magnitude of coordinates. Good when vectors are normalized to the same scale.
Real RAG systems embed documents and queries into 768+ dimensions (e.g., OpenAI ada-002 uses 1536 dimensions). We show 2D here for visualization — the same nearest-neighbor search happens in high-dimensional space, accelerated by index structures like HNSW or FAISS.