What Is a Vector Database?

A database optimised for storing and searching AI-generated embeddings.

A vector database is a type of database designed specifically for storing and searching vector embeddings, numerical representations of data (text, images, audio) generated by AI models. Where traditional databases find records by exact matching or range queries, a vector database finds records by similarity, returning the items most semantically related to a given query.

The concept of vector embeddings is central to understanding this. When you pass a piece of text through an embedding model, it converts that text into a list of numbers (a vector) that represents its meaning in high-dimensional space. Text with similar meaning ends up with similar vectors. A vector database stores these embeddings and enables fast 'nearest neighbour' search, finding the vectors most similar to a query vector.

This makes vector databases the core infrastructure component in RAG systems. When building a knowledge base that an LLM can search, you embed all your documents and store them in a vector database. When a user asks a question, you embed the question and search the database for the most relevant document chunks. Those chunks are then provided to the LLM as context.

Popular vector databases include Pinecone, Weaviate, and Qdrant. PostgreSQL with the pgvector extension also supports vector search, which is often the simplest approach for products already using PostgreSQL, keeping the infrastructure simple without sacrificing capability.

Key takeaway:Vector databases power the retrieval step in AI-powered search and RAG systems. They find meaning, not just matching strings.

Ready to build?

Let's ship your MVP in 2 weeks.

Fixed price, production-ready, no hidden costs.