A vector database stores data as lists of numbers that capture its meaning, then finds the items whose numbers sit closest to your search. That is how you can search thousands of photos for 'cats in loaf position' when no photo was ever labelled that way.
The limit of exact matches
A normal database is great for exact facts. Ask for every photo where the cat's name is 'Mochi' or the colour is 'orange', and it answers instantly:
SELECT file FROM photos
WHERE colour = 'orange';That works because 'orange' was saved as a value. 'Loaf position' usually wasn't. You could add a pose column and tag every photo by hand, but that is slow, people describe the same pose differently ('loaf', 'bread cat', 'tucked in'), and it only covers the questions someone thought of in advance. A text search such as LIKE '%loaf%' doesn't help either: it finds the word, not the idea.
What you want is to search by meaning. That is the job a vector database does.
Vectors: meaning as numbers
A vector is just a list of numbers, such as [0.12, -0.83, 0.41, ...]. To turn a photo or a sentence into one, you run it through an embedding model: a machine learning model trained so that things with similar meaning get similar numbers. The vector it produces is called an embedding.
Wondering how this was made? How we make these