Watch documents become vectors in 2D space. Run semantic queries and see nearest neighbors retrieved by cosine similarity, no keyword matching required.
Sign in to save progress
Each document is embedded as a point in vector space. Similar topics cluster together. Hover a dot to read its text.
Select a query to see it land in vector space. Lines show similarity to each document: the top 3 nearest are highlighted.
Click a query above to see the nearest neighbors retrieved from the vector index.
Query: “AI and neural nets”. See how each approach handles it.
1 result. Misses semantically related docs.
3 results. Understands meaning, not just words.
Three stages from document to retrieval result.
Hierarchical Navigable Small World: O(log n) search
Choose the right tool for your use case.
| Database | Open Source | Managed | Best For |
|---|---|---|---|
| Pinecone | No | Yes | Production SaaS |
| Weaviate | Yes | Yes | Multi-modal |
| Qdrant | Yes | Yes | High performance |
| pgvector | Yes | No | Existing Postgres |
| Chroma | Yes | No | Local dev |
Key Insight
At 1M documents with 1536-dim vectors (OpenAI ada-002), you need approximately ~6 GB RAM just to store the index. Vector databases use specialized indexing (HNSW) to search millions of vectors in milliseconds; traditional SQL would require a full table scan, making it orders of magnitude slower.
Up Next
Before you can store documents in a vector database, you need to split them into meaningful chunks. See fixed-size, recursive, and semantic chunking applied side by side.
Explore Chunking Strategies