trendingzones

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

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 →