PromptForge
AI Glossary

Retrieval & data

Vector database

Also known as: vector store, vector db, pgvector

Definition

A vector database stores embeddings and finds the most similar ones to a query vector quickly. It is the retrieval layer of most RAG systems. Examples include Pinecone, Weaviate, Qdrant and pgvector.

Comparing a query against millions of vectors by brute force is too slow for interactive use. Vector databases use approximate nearest neighbour indexes (HNSW, IVF) that trade a small amount of recall for enormous speed gains.

Most also support metadata filtering, so you can restrict a semantic search to a date range, document type or access level. In production this is essential — it is how you enforce that a user only retrieves documents they are permitted to see.

For smaller corpora you may not need a dedicated system. pgvector inside an existing Postgres database handles hundreds of thousands of vectors comfortably and avoids operating another service.

Related terms

Put this into practice

Understanding the term is step one. Our free courses and tools let you actually use it.