Quick question: if you search your notes for "car repair," should a note titled "automobile maintenance" show up?

Of course it should — it is exactly what you were looking for. But classic keyword search says no. It matches letters, not ideas, and "car" and "automobile" don't share a single letter sequence worth matching. This is the gap that vector databases were built to close: they let software search by meaning instead of exact words.

First ingredient: embeddings

An embedding is what you get when a machine learning model reads a piece of text and turns it into a long list of numbers, called a vector:

"car repair"  →  [0.12, -0.98, 0.33, 0.71, ...]  (hundreds of numbers)

Here is the magic part: the model is trained so that texts with similar meanings get numbers that are close together. Think of it like coordinates on a map. "Car repair" and "automobile maintenance" land in the same neighborhood; "banana bread recipe" ends up on the other side of town. Distance on this map means difference in meaning.

Tip: You don't need to understand how the model produces these numbers to use them — just like you can use GPS without knowing how satellites work. If you're curious about the models themselves, see What Is a Large Language Model?

Second ingredient: a place to search them

Once you have embeddings, you need somewhere to store them — and, crucially, a fast way to answer the question "which stored vectors are closest to this new one?" That is a vector database: a database specialized in storing vectors and finding nearest neighbors quickly, even among millions of them.

Why does that need a special database? Because comparing your query against every single stored vector, one by one, gets painfully slow at scale. Vector databases use clever structures that jump almost directly to the right neighborhood — trading a tiny bit of precision for enormous speed.

The search flow, start to finish

  1. Embed your documents: run each document (or chunk of one) through the embedding model.
  2. Store the vectors: save each vector in the vector database, linked to its original text.
  3. Embed the query: when a user searches, convert their query into a vector too — same model, same map.
  4. Find the closest vectors: ask the database for the nearest neighbors of the query vector.
  5. Return the matches: hand back the original texts those vectors point to — ranked by meaning, not spelling.

That is the entire trick. No step requires the query and the document to share a single word.

Where you'll actually meet one

RAG Semantic search Recommendations Similar images
  • RAG: the number one place beginners encounter vector search. Before an AI answers, the app retrieves the most relevant documents by meaning and hands them to the model. We break this down in What Is RAG?
  • Semantic search: search boxes that understand what you meant, not just what you typed.
  • Recommendations: "people who liked this also liked..." is nearest-neighbor search on taste.
  • Similar images: embeddings aren't just for text — images become vectors too, so "find photos like this one" is the same trick.

Does this replace my regular database?

No — and this trips people up, so let's be clear. A vector database is a complement, not a replacement. Your orders, users, and appointments still belong in a traditional database with real structure and guarantees. The vector database handles one specific job: similarity search over meanings.

Note: The line is blurring in a friendly way — many established SQL databases now bolt on vector search as a feature. You may end up doing meaning-based search inside the same database that holds your tables.

And that's really all a vector database is: a map of meanings plus a fast way to find the nearest points on it. Not so mysterious after all, right? For your next step, see the idea in action in What Is RAG? — and if you haven't picked your first traditional database yet, SQL vs NoSQL will point you the right way.