What is a vector database for?
A traditional database finds information when you know the exact word or value you are looking for. A vector database finds content that is close in meaning: a question about “holiday” also brings up the passage about “annual leave”. To do this, each piece of content is stored as an embedding, a vector of numbers.
It is the search component of RAG: it lets an assistant quickly find the relevant passages in a large volume of internal documents before it formulates its answer.
How a vector database works
- 1 Step 1 Chunking Documents are split into coherent passages (chunks), each with metadata: source, date, access rights.
- 2 Step 2 Vectorisation An embedding model turns each passage into a vector, stored together with its text and metadata.
- 3 Step 3 The query The user’s question is vectorised with the same model, so that it can be compared with the stored passages.
- 4 Step 4 Similarity search Using optimised indexes, the database returns the closest vectors, filtered according to the metadata.
Business use cases
- Customer support Find the right answer in the knowledge base, even when the customer phrases the question differently.
- Legal Spot similar clauses across a set of contracts, whatever their exact wording.
- Internal documentation Power a copilot that answers from procedures and manuals.
- E-commerce Recommend products similar to an item viewed, even when they are described in different words.
Vector or relational database?
| Vector database | Relational database | |
|---|---|---|
| Data stored | Vectors (embeddings), text and metadata | Structured tables of rows and columns |
| Type of search | By similarity of meaning | By exact values, filters and joins |
| Result | The closest content, ranked by score | The records that exactly match the criteria |
| Ideal for | Text, images, semantic search, RAG | Orders, invoices, stock, accounting |
The two often coexist: PostgreSQL, for example, can store and search vectors thanks to the pgvector extension.
Frequently asked questions
-
Common options include Pinecone, Qdrant, Weaviate, Milvus and Chroma, as well as extensions to existing databases such as pgvector for PostgreSQL. The choice depends on volume, preferred hosting and filtering needs.
-
It can, if each passage carries access-rights metadata and the search filters results according to the user’s profile. This filtering has to be designed from the outset: it is not automatic.
-
Yes. Modified passages must be vectorised again and the old ones deleted, ideally through automatic synchronisation with your document sources.
