Vector Database
A database built to store embeddings and find the nearest neighbours of a query vector quickly, using approximate nearest-neighbour indexes.
Definition
A vector database stores embeddings, usually alongside the original text and some metadata, and answers one question efficiently: which stored vectors are closest to this query vector? Comparing a query with every row works for thousands of items but not for millions, so these systems build an approximate nearest-neighbour (ANN) index such as HNSW (a layered graph) or IVF (clusters) that narrows the search dramatically.
The category includes dedicated products (Milvus, Qdrant, Weaviate, Pinecone) and extensions to existing databases (pgvector for PostgreSQL, vector support in Elasticsearch, OpenSearch and others). All of them combine similarity search with metadata filtering, which is how you restrict results to one customer, one language or one permission group.
Example: a legal team stores 400,000 contract clauses as vectors. A query for "early termination without penalty" returns the twenty most similar clauses in milliseconds, filtered to the client's own contracts.
Why it matters for your business
- It is the retrieval engine behind RAG, semantic search and recommendations.
- The wrong choice shows up later as slow queries, weak filtering or an extra system to operate and secure.
- Keeping vectors next to your relational data (pgvector) simplifies permissions, backups and transactions.
- Index settings trade recall against speed and memory; they need measuring on your data, not defaults.
How Teksmobile uses it
We run a structured vector database selection before committing, and we build most knowledge bases on pgvector or Milvus. Both are part of our standard vector search practice, with managed options where the client prefers them.
Related terms
Part of the Teksmobile AI Glossary. Compare products in our vector database comparison.
Frequently asked questions
Do I need a dedicated vector database?
Often not. PostgreSQL with pgvector handles many workloads up to millions of vectors and keeps your data in one place. Dedicated systems such as Milvus, Qdrant, Weaviate or Pinecone earn their place at larger scale or with heavy filtering needs. Try our vector database chooser.
What does "approximate" mean in ANN search?
The index trades a small amount of recall for large speed gains. Instead of comparing the query with every stored vector, it explores a graph or clusters and returns results that are almost always the true nearest neighbours.
Can a vector database filter by metadata?
Yes, and this is essential in practice: restricting results by tenant, document type, date or permission. How well filtering combines with the index is a key selection criterion.