Vector Database
lastmod 2026-03-03created 2023-05-257 edits
About
- AI applications depend on Vector Embeddings
- Embeddings are generated by AI models and have a large number of attributes/features, which makes them hard to manage
- In AI and ML, these features represent the various dimensions of the data that are essential for understanding patterns, relationships, and underlying structure
- Generate vector embeddings of the content to index using an embedding model
- Insert the vector embeddings into the vector DB, including a reference to the original content the embedding was generated from
- When the application issues a query, it generates an embedding for the query with the same embedding model, then searches the DB with that embedding to find similar vector embeddings
- These embeddings are linked to the original content
Difference between Vector Index and Vector DB
- Vector indexes such as FAISS(Facebook AI Similarity Search) also improve vector embedding search, but they don't have DB features
- Vector DBs have several advantages
- Data management: easy insertion, deletion, and updating of data
- Metadata storage and filtering: can store metadata for each vector
- Scalability: provides distributed and parallel processing
- Supports real-time updates
- Backup and collection features (back up only selected indexes)
- Ecosystem integration: integrates with ETL(Spark), analytics tools(Tableau, Segment), visualization(Grafana), etc. Integration with AI tools(LangChain, LlamaIndex, ChatGPT Plugins)
- Data security and access permission management
How does a Vector DB work
- Algorithms: ANN, Random Projection, Product Quantization, Locality-sensitive hashing, Hierarchical Navigable Small World (HSNW)
- Similarity measurement
- Filtering
- Database operations
Summary
- Vector databases emerged as vector embeddings grew explosively in NLP, computer vision, and other AI applications
- Vector databases are purpose-built to solve the problems that arise when managing vector embeddings in production scenarios
- They offer significant advantages over traditional scalar-based databases and standalone vector indexes
Things learned from two years at a Vector DB company
- BM25 is a strong baseline for search
- Vector search is Approximate, not Exact
- Vector DBs don't store only embeddings
- The main use of vector DBs is ‘search’, not generative AI
- You have to specify the number of search results yourself
- There are many kinds of embeddings
- Benchmarks for choosing an embedding model
- Most models on MTEB are English-only
- History of embeddings: Static vs Contextual
- Difference between a sparse vector and a sparse embedding
- Many kinds of data besides text can be embedded
- Embedding dimensionality and storage cost
- The “Chat with your docs” tutorial is the hello world of generative AI
- Embedding models must be called repeatedly
- Vector similarity and actual relevance can differ
- Cosine similarity and cosine distance are different
- With normalized vectors, cosine similarity and dot product are identical
- The R in RAG is ‘retrieval’, not ‘vector search’
- Vector search is just one search tool
- Applying keyword/vector search appropriately
- What hybrid search means
- Filtering doesn't always increase speed
- Usefulness of a two-stage search pipeline
- Difference between vector search and reranking
- Difficulty of choosing the chunk size to embed
- Difference between vector indexing libraries and vector DBs
- RAG keeps evolving even as LLM contexts expand
- Vector quantization cuts 97% of the information while preserving search
- Vector search is not robust to typos
- Many metrics for evaluating search quality
- Practical examples of the Precision-Recall trade-off
- Metrics that account for the order of search results
- The influence of the tokenizer
- Out-of-domain and out-of-vocabulary are different
- The need for query optimization
- Paradigms after vector search
- Information retrieval is the ‘hottest’ field right now
See also
- Database
- VectorVFS - Uses the file system as a vector database
- MUVERA - Makes multi-vector search as fast as single-vector search
- zvec - Ultra-lightweight, ultra-fast in-process vector DB
Favorite site
Article
- Vector databases are the wrong abstraction | GeekNews - Worth reading
- [Original] Vector Databases Are the Wrong Abstraction
Pages that link here