← 🧭 Data Science

🧭 Vector Search

Nearest match:
Avg. retrieved score:
Pipeline stage: idle
FPS:
Drag — rotate · Scroll — zoom

🧭 Vector Databases and Embeddings: The Infrastructure Behind RAG

A 3D embedding space where document chunks cluster by topic; plotting a query vector among them and running nearest-neighbour search shows exactly how a vector database retrieves context for a RAG pipeline.

🔬 What It Demonstrates

Semantically similar text lands near each other in embedding space. A vector database ranks every stored embedding against the query using a similarity metric and returns the top-K closest matches, which are then stuffed into the LLM's context window.

🎮 How to Use

Pick a query topic and drift it toward a neighbouring one, choose cosine or Euclidean similarity, and adjust top-K and embedding spread. Press "Run retrieval" to watch the nearest documents stream up into the simulated LLM context.

💡 Did You Know?

At billion-vector scale, exact nearest-neighbour search is too slow — production vector databases use approximate methods like HNSW graphs or IVF indexes to trade a sliver of accuracy for millisecond-scale lookups.