# Vector database

> A vector database is a database that stores numeric vectors representing content such as text, images or audio and quickly finds the records closest in meaning to a query. It searches by semantic similarity rather than keyword match. The retrieval layer of a RAG-based knowledge assistant is usually a vector database.

URL: https://corrplus.net/glossary/vector-database/
Updated: 2026-10-22
Corrplus Team

**Definition:** A vector database is a database that stores numeric vectors representing content such as text, images or audio and quickly finds the records closest in meaning to a query.

## How does a vector database work?

Each piece of content is turned into an array of hundreds or thousands of numbers by an [embedding](/glossary/embedding/) model. Content with similar meaning ends up with vectors close to each other. When a question arrives, it is embedded too, and the database finds the nearest vectors. Comparing every vector one by one would be slow across millions of records, so approximate nearest neighbour (ANN) indexes such as HNSW are used. Records also carry fields such as date, document type or access rights, which act as filters during search.

## When should you use one?

For question answering over company documents with [RAG](/glossary/rag/), finding similar support tickets or products, recommendation systems and duplicate detection. Options include pgvector (PostgreSQL and Supabase), Qdrant, Weaviate, Milvus and Pinecone.

## What to watch for

Vectors are derived from the original text, so vectors of documents containing personal data should be treated as personal data too, and the text chunks stored alongside them must be protected. You can host the database in an EU region or in a data centre in Türkiye if GDPR or [KVKK](/glossary/kvkk/), Türkiye's data protection law, calls for it. For non-English content, retrieval quality depends most on the choice of embedding model.

## Frequently asked questions

### Do I need a separate vector database?

Often not. If you already run PostgreSQL, the pgvector extension is enough for many mid-sized projects and keeps data in one place. For very large volumes or specialised filtering, a dedicated option such as Qdrant may be worth it.

### Does a vector database replace keyword search?

Not entirely. For exact matches such as product codes or invoice numbers, keyword search is better. Hybrid search that combines both usually gives the best results.
