Skip to content
Search

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
  • A vector DB such as Pinecone is a DB specialized for storing and querying this embedding data in an optimized way
  • Vector DBs make it possible to implement advanced AI capabilities such as semantic information retrieval and long-term memory
    • 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

  1. BM25 is a strong baseline for search
  2. Vector search is Approximate, not Exact
  3. Vector DBs don't store only embeddings
  4. The main use of vector DBs is ‘search’, not generative AI
  5. You have to specify the number of search results yourself
  6. There are many kinds of embeddings
  7. Benchmarks for choosing an embedding model
  8. Most models on MTEB are English-only
  9. History of embeddings: Static vs Contextual
  10. Difference between a sparse vector and a sparse embedding
  11. Many kinds of data besides text can be embedded
  12. Embedding dimensionality and storage cost
  13. The “Chat with your docs” tutorial is the hello world of generative AI
  14. Embedding models must be called repeatedly
  15. Vector similarity and actual relevance can differ
  16. Cosine similarity and cosine distance are different
  17. With normalized vectors, cosine similarity and dot product are identical
  18. The R in RAG is ‘retrieval’, not ‘vector search’
  19. Vector search is just one search tool
  20. Applying keyword/vector search appropriately
  21. What hybrid search means
  22. Filtering doesn't always increase speed
  23. Usefulness of a two-stage search pipeline
  24. Difference between vector search and reranking
  25. Difficulty of choosing the chunk size to embed
  26. Difference between vector indexing libraries and vector DBs
  27. RAG keeps evolving even as LLM contexts expand
  28. Vector quantization cuts 97% of the information while preserving search
  29. Vector search is not robust to typos
  30. Many metrics for evaluating search quality
  31. Practical examples of the Precision-Recall trade-off
  32. Metrics that account for the order of search results
  33. The influence of the tokenizer
  34. Out-of-domain and out-of-vocabulary are different
  35. The need for query optimization
  36. Paradigms after vector search
  37. 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

author Zer0 sitemap