Introduction to Vector Databases
What Is a Vector Database
A vector database stores embeddings: long lists of numbers that describe the meaning of text, images, audio or any data. Similar items end up close together in vector space, so a database can find "things like this" without matching exact keywords.
Vectors and Similarity
An embedding model turns a sentence into, say, 384 or 1536 numbers. The sentence "an elephant has a trunk" lands near another sentence about large animals, and far from one about cooking recipes. Distance between vectors measures similarity.
Why a Separate Database
Comparing every vector against every other vector is too slow at millions of rows. Vector databases combine approximate nearest neighbour (ANN) indexes, metadata storage and filtering into one system so lookups stay fast.
Common Use Cases
- Semantic search - Find content by meaning, not keywords.
- RAG assistants - Retrieve relevant document chunks for LLM answers.
- Recommendations - Find similar products, songs or videos.
- Duplicate detection - Group near-identical records.
How a Query Runs
Ask a question, embed it into a vector, search the index for the nearest neighbours, and return the top k. The database does the math so you never compare against every row.
Key Points
- Embeddings are numeric fingerprints of meaning.
- Similar vectors sit close together.
- ANN indexes keep search fast at scale.
- Vector databases power search, RAG and recommendations.