Vector Database

A database that stores information in a way that lets AI systems search by meaning rather than exact words.

Vector database, embedding database

Definition

A vector database is a specialised database that stores embeddings, numerical representations of text or data, and retrieves them based on meaning and similarity rather than exact matches.

What is it?

A vector database is a specialised database designed to store embeddings, numerical representations of text, documents, or other data, and to search across them quickly based on similarity. Where a conventional database retrieves records based on exact matches such as a client number or invoice date, a vector database retrieves the most semantically similar items: the document that most closely matches what you are looking for, even when the exact words differ.

Vector databases are the technical backbone of RAG systems and semantic search: they hold the knowledge store against which AI queries are run.

Why it matters for SMEs

For SMEs, a vector database becomes relevant as soon as you want AI to work with your own documents, contracts, client files, or internal knowledge rather than only with general training data.

  • Documents that do not fit neatly into a structured database, such as emails, reports, notes, and scanned contracts, become searchable by content and meaning, not just by file name or date.
  • An AI agent working against a vector database can give accurate answers based on your specific business knowledge, without that knowledge needing to be retrained into a model.
  • Expanding the same system with new documents is straightforward: add the content, generate embeddings, and the database is immediately ready for use.

The vector database is what makes RAG and semantic search practical: without a place to store and quickly search embeddings, the techniques remain theoretical.

How it works

A vector database operates in two phases: loading and retrieval. In the loading phase, documents are converted into embeddings; in the retrieval phase, a query is converted the same way and compared against the stored vectors.

  1. Documents are split into smaller chunks, each containing a coherent unit of text.
  2. Each chunk is converted into a numerical vector by an embedding model and stored in the database.
  3. When a query is submitted, it is also converted into a vector using the same model.
  4. The database calculates which stored vectors are closest to the query vector using a similarity measure.
  5. The most relevant chunks are returned to the AI system, which uses them to compose an answer.

Well-known vector databases include Pinecone, Weaviate, Qdrant, and pgvector (as a PostgreSQL extension). For smaller applications, a simple in-memory implementation may be sufficient; for larger production systems, a managed cloud service is more common.

Example in practice

Picture an accounting firm that wants staff to be able to ask questions about client contracts without searching manually. The firm loads all active contracts into a vector database: each contract is split into chunks and converted into embeddings. When a staff member asks "which clients have an annual indexation clause?" the system retrieves the most relevant contract passages from the vector database and passes them to a language model, which composes a clear overview. The staff member does not need to open any files; the answer is there in seconds.

Comparison and misconceptions

A conventional relational database such as PostgreSQL or MySQL searches on exact values: client number, date, amount. A vector database searches on semantic similarity: which document most closely matches this query. The two systems complement each other: use a relational database for structured transaction data and a vector database for unstructured documents and knowledge content.

Frequently asked questions

What is a vector database?
A vector database stores embeddings: numerical representations of text that capture semantic meaning. Unlike a regular database that searches for exact matches, a vector database searches by similarity in meaning. It is the storage layer behind RAG systems and semantic search.
Which vector database should you choose?
For smaller pilots, Chroma (local, free) is a good start. For production systems with higher volumes, Pinecone and Weaviate are popular. pgvector is the choice if you already use PostgreSQL and want to keep complexity low. Test on your use case before making a production decision.
Do you need a vector database for every AI application?
No. You need one when you want to search semantically through your own documents or when you want to build a RAG system. For applications where the model does not consult an external knowledge source, a vector database is not needed.
From insight to impact

Curious what AI
can do for your processes?

In a free intro call we look at where AI saves you the most time, and what a connected setup looks like.