veda.ng
Back to Glossary

Vector Database

A vector database is a database optimized for storing and searching high-dimensional numerical vectors, which are how AI models represent the meaning of text, images, and other data. When an embedding model processes a piece of text, it converts it into a vector, an array of hundreds or thousands of numbers that encodes its semantic meaning. Similar meanings produce similar vectors. A vector database stores these vectors and allows you to search for the most semantically similar ones. This is the core mechanism behind retrieval-augmented generation. You convert your knowledge base into vectors, store them in a vector database, and when a user asks a question, you convert the question into a vector, find the most similar vectors in the database, and pass those relevant documents to the LLM. Popular vector databases include Pinecone, Weaviate, Chroma, and pgvector for Postgres. Traditional databases search for exact matches or range queries. Vector databases search for approximate nearest neighbors in high-dimensional space, requiring specialized indexing algorithms like HNSW and FAISS to remain fast at scale.