What is a vector database and why use one for RAG?
A vector database stores embeddings and does fast nearest-neighbour search — finding the vectors closest to a query vector using approximate algorithms (e.g. HNSW) that scale to millions of items. You use one in RAG to retrieve the most semantically similar chunks quickly. Options include Pinecone, Weaviate, Qdrant, Milvus, and pgvector (Postgres). For small corpora a simple in-memory index suffices; a dedicated vector DB matters at scale and with metadata filtering.
📘 Learn this properly: Embeddings & Vectors, Explained Simply →