A vector database stores and indexes high-dimensional embedding vectors, enabling fast similarity search across millions of records. Unlike a traditional database optimized for exact matches, a vector DB retrieves the nearest semantic neighbors to a query vector — finding the most relevant documents even when they share no keywords with the query.
Vector databases are the retrieval layer in most RAG systems. When a user asks a question, their query is embedded and matched against pre-indexed document embeddings, retrieving the most relevant chunks to include in the LLM prompt. Popular options include Pinecone, Weaviate, Qdrant, pgvector (Postgres extension), and Cloudflare Vectorize.