Vector Database
A vector database stores and searches vector representations so applications can retrieve items by similarity alongside metadata constraints.
Download Markdown (.md)Soroush’s Product Wiki · https://wiki.soroush.uk/topic/vector-database/
01What it means
A vector database manages vectors, their identifiers, and associated metadata, with operations for similarity search and data updates. Vector store is often used for the same role. The capability may live in a dedicated service, a search engine, or an extension to an existing database. It is retrieval infrastructure; semantic search is a use of that infrastructure, and an embedding model produces the representations.[1][2]
- Source itemsDocuments, products, media, or other retrievable records
- Embedding modelProduces vectors in a named representation space
- Vector + metadata storeIdentifiers, permissions, version, and useful filters
- Similarity indexExact or approximate nearest-neighbor search
- Query embeddingRepresentation compatible with the stored vectors
- Filtered candidatesRanked items for search, recommendation, or grounding
Updates, deletion, and model changes require re-indexing or re-embedding
Nearest vectors are not necessarily authoritative or relevant. Approximation, filtering, permissions, freshness, and embedding-version changes all affect retrieval quality.
02Why it matters
Infrastructure choices affect relevance, freshness, access control, operating cost, and migration effort. Product teams should evaluate the whole retrieval workflow rather than assume that a separate database is necessary whenever embeddings are used.
03When to use it
Use vector storage and search when similarity retrieval needs persistent data, filtering, updates, and predictable performance. Small collections may need only a simple exact search. An existing database with vector support may meet requirements without introducing another service.
04How it works
- Define retrieval tasks, data volume, update frequency, latency needs, and authorization boundaries.
- Choose compatible embedding representations and store each vector with a source identifier, model version, and useful metadata.
- Compare exact and approximate search on realistic queries, measuring retrieval recall as well as speed.
- Test filters, tenant isolation, deletion, and freshness under actual access rules and update patterns.
- Plan backups, monitoring, and re-embedding or index migration when representations change.
05A practical example
A B2B help center needs semantic retrieval across customer-specific manuals. The team compares a vector extension in its current database with a dedicated service. It tests restrictive account filters and frequent article updates before choosing the option that meets retrieval quality and operational needs at its current scale.
06Where it breaks
Nearest vectors are not necessarily authoritative or factually relevant. Approximate indexes can miss useful results, and restrictive filters may affect recall. Embedding changes can require reprocessing content. Vector retrieval alone provides neither document permissions nor a grounded answer.
Common mistakes
- Assuming a dedicated vector service is mandatory for retrieval-augmented generation.
- Comparing speed without checking recall under real filters.
- Mixing vectors from incompatible embedding models.
- Deleting source content while leaving searchable vectors or cached copies available.
07Sources
- pgvectorpgvector contributors · Official documentationpgvector
- Vector search in Azure AI SearchMicrosoft Learn · Official documentationVector search in Azure AI Search