Memory & Storage

Vector Database

A database system optimized for storing and querying high-dimensional embedding vectors, enabling semantic similarity search at scale for RAG and agent memory systems.

Definition

A Vector Database is a database system purpose-built for storing high-dimensional numerical vectors (embeddings) alongside metadata, and executing approximate nearest neighbor (ANN) search efficiently at scale. Unlike traditional relational databases that query by exact value or range, vector databases query by semantic similarity: given a query vector, find the k most similar vectors in the database. This capability makes vector databases the foundational storage layer for RAG pipelines, semantic search systems, and long-term agent memory implementations.

Engineering Context

Vector databases are a core infrastructure component for RAG-based AI agents. They store embedding vectors alongside metadata and support approximate nearest neighbor (ANN) search to find semantically similar content. Key evaluation criteria for vector database selection: query latency at scale (milliseconds matter for agent loop performance), recall@k accuracy (the fraction of true nearest neighbors returned), hybrid search support (combining dense vector search with BM25 sparse keyword search often outperforms either alone), metadata filtering (filtering results by date, source, category before or after vector search), and self-hosting options for data privacy compliance. Major options include Pinecone (fully managed), Qdrant and Weaviate (self-hostable with cloud options), and pgvector (PostgreSQL extension for teams preferring a unified data platform).

Related Terms

Building production AI agents?

We design and implement deterministic AI agent systems for enterprise teams.

Start Assessment