Vector Databases

The same query answered two ways: brute-force scanning all 24 documents vs an IVF index that visits 9 — see exactly why approximate search is fast.

A vector database stores embeddings and answers "which stored items are most similar to this query?" Comparing the query against every stored vector works — but not at a billion vectors. Real systems build an index that narrows the search to a few promising regions.

This workspace embeds your query genuinely (bag-of-words over a keyword table), ranks by real cosine similarity, and lets you run the same search brute-force (all 24 chunks visited) or through an IVF-style index (4 clusters, probe the 2 nearest, ~10 chunks visited) — with a live "vectors compared" counter making the trade-off concrete.

Open the interactive Vector Databases workspace →