Vector Database
Definition
A database optimized for storing, indexing, and querying high-dimensional vector embeddings — numerical representations of text, images, or other data that capture semantic meaning. Vector databases enable similarity search: given a query vector, find the most similar stored vectors efficiently using algorithms like HNSW, IVF, or product quantization. In the agent context, vector databases power RAG systems (storing document embeddings for retrieval), memory systems (storing and recalling past interactions), and recommendation engines.
Builder Context
Choose your vector database based on your scale and operational requirements, not features — they all do similarity search. For < 100K vectors: pgvector in your existing Postgres is the simplest path. For 100K–10M: a managed service (Pinecone, Weaviate) reduces ops burden. For > 10M: you need to care about quantization, sharding, and hybrid search. The most common mistake is optimizing the vector DB when the real problem is embedding quality or chunking strategy. Always benchmark with your actual queries, not synthetic data.