Definition
Vector Database
A vector database stores data as high-dimensional embeddings and retrieves items by similarity rather than exact match. Given a query vector, it returns the nearest stored vectors — the records most similar in meaning. Specialized indexes make this fast across millions of items, making vector databases the retrieval backbone of semantic search and AI applications.
Key takeaways
- A vector database stores data as high-dimensional embeddings and retrieves items by similarity, returning the records nearest in meaning to a query.
- Approximate nearest-neighbor indexes like HNSW keep similarity search fast across millions of items by trading a sliver of exactness for speed.
- It can be a standalone system or an extension on a general-purpose database, which keeps vectors alongside relational data and access controls.
- It is the retrieval backbone of semantic search and the context-fetching half of retrieval-augmented generation.
Traditional databases find rows by exact values or keyword matches. A vector database instead operates on embeddings: numeric vectors where geometric distance reflects semantic similarity. When you store text, images, or other content as vectors and then query with another vector, the database returns the nearest neighbors — the items closest in meaning, even with no shared words.
The hard problem is doing this quickly. Comparing a query against every stored vector is too slow at scale, so vector databases use approximate nearest-neighbor indexes — HNSW being a common one — that trade a sliver of exactness for orders-of-magnitude faster search. This is what keeps meaning-based retrieval interactive across large collections.
A vector database can be a standalone system or a capability bolted onto a general-purpose database through an extension, which lets teams keep vectors alongside their relational data, transactions, and access controls instead of syncing a separate store. Either way, it is the retrieval layer that powers semantic search and the context-fetching half of retrieval-augmented generation.
Planoda stores embeddings with HNSW indexes directly in PostgreSQL, so vector retrieval lives beside the relational data and is enforced inside the same tenant-scoped security boundary.
Related terms
- EmbeddingAn embedding is a numeric vector that represents a piece of content — text, image, or other data — as a point in high-dimensional space, positioned so that similar items land near each other. Produced by a model trained to capture meaning, embeddings let software compare content by semantic similarity rather than by matching exact words.
- Semantic SearchSemantic search finds results by meaning rather than exact keywords, using vector embeddings that place similar concepts near each other in mathematical space. A query for 'login broken' can surface an issue titled 'users can't authenticate' even with no shared words. It powers more relevant search and is the retrieval layer behind many AI features.
- Retrieval-Augmented Generation (RAG)Retrieval-augmented generation (RAG) grounds a language model's answers in your own data by retrieving the most relevant documents at query time and feeding them into the model's context before it responds. Instead of relying solely on what the model memorized in training, RAG lets it answer from current, authoritative, private sources — sharply reducing hallucination.
- RerankingReranking is a second-stage refinement in retrieval that reorders an initial set of candidate results by relevance to the query, using a more precise but costlier model. A fast first pass casts a wide net; the reranker then scores each candidate against the query directly, promoting the truly best matches to the top — sharply improving the quality of retrieval.
- Row-Level Security (RLS)Row-level security (RLS) is a database feature that restricts which rows a query can read or modify based on the current user or context. Instead of relying solely on application code to filter data, the database itself enforces access policies on every query — a strong defense for multi-tenant systems where one workspace's data must never leak to another.