Vector Database
Aussi : Vector Store, Vector DB, Embedding Database, Similarity Search Database
A vector database stores data as high-dimensional numeric vectors (embeddings) and retrieves items by similarity rather than exact matches, powering semantic search and AI applications.
What it is
A vector database is a system designed to store, index, and query data represented as vectors: arrays of numbers (often hundreds or thousands of dimensions) called embeddings. These embeddings are produced by machine learning models that translate text, images, audio, or other content into a numeric form where similar items sit close together in vector space.
Unlike a traditional relational database that finds rows by exact values (for example, `WHERE country = 'France'`), a vector database answers questions like "find the items most similar in meaning to this one." It does this using nearest neighbor search based on distance metrics such as cosine similarity or Euclidean distance.
Why it matters
Most business data is unstructured: documents, support tickets, product descriptions, images. Keyword search misses meaning, for example a query for "laptop won't turn on" should match "computer fails to boot." Vector search captures semantic similarity, returning relevant results even when wording differs.
Vector databases are a core building block of modern AI systems, especially Retrieval Augmented Generation (RAG), where a large language model is grounded in your own data to reduce hallucinations and provide source-backed answers.
How it is used in practice
- Ingestion: Content is split into chunks and passed through an embedding model to create vectors.
- Indexing: Vectors are stored with an approximate nearest neighbor index (such as HNSW or IVF) for fast retrieval at scale.
- Querying: A user query is embedded into the same space, and the database returns the closest vectors plus their original content and metadata.
- Filtering: Metadata (date, author, category) narrows results alongside similarity.
Common applications include semantic search, recommendation engines, chatbots, deduplication, anomaly detection, and image search.
Concrete example
A finance team builds an internal assistant over thousands of regulatory PDFs. Each paragraph is embedded and stored. When an analyst asks "What are the capital requirements for small banks?", the question is embedded, the database returns the most relevant passages, and a language model drafts an answer citing those sources.
Trade-offs to consider
- Approximate search is fast but may slightly trade accuracy for speed.
- Embedding quality depends heavily on the chosen model.
- Costs grow with vector volume and dimensionality.