AI & ML — INTRODUCTION
What Is a Vector Database? Search by Meaning, Explained
Search “affordable travel” on a normal website search bar and a document that only ever says “cheap flights” won’t show up — not one word matches. A vector database is the reason that same search works almost everywhere in AI products today.
The Quick Answer
A vector database stores embeddings — the numeric stand-ins for meaning covered in the previous article — and is built specifically to search them by closeness, not exact wording. Instead of scanning for matching keywords, it finds whichever stored items sit nearest to your search query once both are converted into the same numeric space.
What the Experts Say
Vendors who build these systems describe the shift plainly: ordinary databases were designed around exact keyword matches and structured rows and columns, never around the high-dimensional embeddings that modern AI applications actually produce. A vector database is purpose-built for that different job — comparing numeric closeness instead of comparing text. See Weaviate, “What Is a Vector Database?”.
How It Actually Works
- 1
It stores embeddings, not just text. Every document, image, or piece of content gets converted to an embedding before it’s stored, so the database has something numeric to actually compare later.
- 2
Search means finding the nearest neighbors. A search query gets embedded the exact same way, and the database finds whichever stored embeddings sit closest to it — this is why it’s often called "nearest neighbor" search.
- 3
It matches meaning, not exact words. A traditional database search for "affordable travel" only finds documents containing those literal words. A vector database can find "cheap flights" too, because both phrases land in nearly the same spot once embedded.
- 4
This is what makes AI systems feel like they "remember". When a chatbot pulls up a relevant document or an old conversation, it’s very often a vector database doing the retrieving behind the scenes.
Keyword Search vs. Meaning Search
Below is a tiny library of 5 documents. Try searching it two ways and see what each approach actually finds.
Build the Index
Here’s what’s actually happening underneath that search box. Every document gets embedded and placed on a map by meaning — the same idea as the word map from the Embeddings article, just with whole documents instead of single words.
Fun Fact
Spotify uses this same idea to power recommendations — songs, artists, and even listeners themselves are each converted into embeddings, so finding music you’ll probably like becomes the same nearest-neighbor search covered here, just searching through songs instead of documents.
Test Yourself
What does a vector database actually store and search?
Why can a vector database match "affordable travel" to a document that only says "cheap flights"?
Ready for the engineering side — how index types like HNSW and IVF actually compare, and how metadata filters combine with similarity search in production? Continue to the Intermediate level →