A vector database stores vectors, usually embeddings of text, images or audio, and searches them by similarity rather than by exact values. Weaviate defines it as a data system designed to store, index and query vector embeddings. According to Weaviate and Pinecone, it adds the functions of any database to similarity search: inserting, updating and deleting data, filtering on metadata and controlling access.
A vector database stores embeddings and searches them by similarity. How it works, how it differs from an index or library, and when you don't need one.
History and development
The technique it relies on has these dates:
30 March 2016: Yu. A. Malkov and D. A. Yashunin publish HNSW on arXiv, a layered graph index for approximate nearest neighbour search.
28 February 2017: Jeff Johnson, Matthijs Douze and Hervé Jégou publish "Billion-scale similarity search with GPUs". In March, Facebook releases the Faiss library and writes that traditional databases queried with SQL are not adapted to these vectors.
20 April 2021: first release of pgvector, an extension that adds vector search to PostgreSQL.
28 August 2023: pgvector 0.5.0 adds the HNSW index type.
16 January 2024: the paper "The Faiss library" calls vector similarity search "a core functionality of vector databases".
30 October 2024: pgvector 0.8.0 adds iterative index scans, aimed at queries with filters.
How it works
On the write path, documents are split into chunks, an embedding model turns each chunk into a vector, and the database stores that vector with the text, or a reference to it, and its metadata. On the read path, the query goes through the same model and the database returns the k nearest vectors. Weaviate stresses that data and queries must use the same model and configuration, because only then are the vectors comparable.
Two paths through the same model
Flow according to Weaviate
Write path
Read path
Documents
split into chunks
Query
the same embedding model
with the same configuration
Vector + text or reference + metadata
stored in the database
the k nearest vectors
Orange: only with the same model are the vectors comparable.
Where do writing and querying have to match?
Comparing the query with every stored vector gives the exact answer, but the work grows with the number of vectors and their dimensions. That is why systems use approximate nearest neighbour (ANN) indexes. HNSW builds several layers of proximity graphs and starts each search at the top layer. IVF splits the vectors into lists and only scans the lists closest to the query; according to the pgvector documentation, it builds faster and uses less memory than HNSW but has a worse speed-recall trade-off. Quantization compresses the vectors to save memory, usually at some cost in precision.
Which distance metric fits (cosine, Euclidean distance or dot product) depends on the embedding model. How similarity is measured is covered in the entry on embeddings.
Metadata filters run before or after the vector search. According to Pinecone, pre-filtering narrows the search space, post-filtering considers all relevant results, and both can slow a query down. Weaviate, MongoDB and pgvector also combine vector search with keyword search (hybrid search), which helps with product names, error codes and acronyms.
Approximate search buys speed with recall: it can miss some of the true nearest neighbours. The pgvector documentation warns that once an approximate index is added, the same queries can return different results.
Types and variants
Weaviate sorts tools that offer vector search into three categories:
Type
What it is
When it fits
Purpose-built vector database
A system built to store and search vectors, with its own persistence, filtering, access control and scaling
Vector or hybrid search is central to the application
Vector-capable database
An existing database or search engine with vector data types and ANN indexes: PostgreSQL with pgvector, MongoDB, Elasticsearch
Vectors need to sit next to existing transactional data
Vector indexing library
Algorithms and data structures for neighbour search, without database functions
Prototypes, offline pipelines or teams that build their own storage layer
Source: Weaviate, "What Is a Vector Database?", section "Tool Landscape around Vector Databases"; examples in the second row from the pgvector, MongoDB and Elastic documentation (accessed 14.11.2026).
Faiss is one example of a library. Its project page describes it as a library for efficient similarity search and clustering of dense vectors, written in C++ with Python wrappers and developed primarily at Meta's Fundamental AI Research group; according to the repository, it searches sets of vectors of any size, including ones that may not fit in RAM. The authors' 2024 paper draws the line: Faiss is not a service, because its functions run inside the calling process, and it "is not a database", because it provides no concurrent write access, load balancing, sharding, transaction management or query optimization. The same paper says Milvus relies on Faiss as one of its core engines and Pinecone initially relied on it before rewriting its engine in Rust.
Databases can be run on in-house servers or bought as a managed service. Pinecone is offered as a managed service; Chroma, Milvus, Qdrant and Weaviate publish their code and also run a cloud version.
Examples
Uses described by Weaviate, Elastic and MongoDB in their documentation:
Retrieving document chunks for a language model in RAG.
Semantic search in a shop catalogue or a help centre.
Recommending products or content similar to what a person has already viewed.
Detecting duplicates and near-duplicates.
Searching images, audio or video by similarity.
Weaviate documents a support assistant that has to explain how to rotate an API key without interrupting an application. The product documentation is stored as small chunks, each with its vector and metadata such as product version and access level. Vector search finds chunks about changing credentials even when they use different wording, keyword search keeps exact matches for "API key", and a filter restricts results to the customer's product version and the documents they may see. Only the top-ranked chunks go to the language model, with instructions to answer from them and cite the source.
An example in the pgvector documentation shows what a filter does behind an approximate index. The HNSW search keeps a candidate list of 40 entries by default (the hnsw.ef_search setting), and the filter is applied afterwards. If the condition matches 10 % of rows, only 4 rows are left on average. Since version 0.8.0, iterative index scans keep reading the index until enough results are found.
Advantages and disadvantages
According to Weaviate, a separate vector database pays off when similarity search is central to the product and there are production requirements: frequent updates, metadata or permission filters, many concurrent users, low latency, high availability or large datasets.
A separate system may not be needed if the data is small and rarely changes, if search runs offline, or if the current database already meets the requirements. Elastic recommends exact, brute-force kNN without an approximate index for small datasets, and pgvector performs exact search until an index is created. With pgvector, vectors are stored with the rest of the data and keep PostgreSQL's ACID transactions and JOINs.
Weaviate sums up the trade-off: keeping vector search in the existing database simplifies operations and consistency, while a purpose-built system can offer deeper retrieval features or more predictable performance when vector search is the main workload.
How it differs from related concepts
System
Searches by
Typical query
Strength
Relational database
Exact values in columns
A customer's orders between two dates
Structured data, transactions, joins
Full-text search
Words that appear in the text
Documents containing "red fruit"
Exact terms: product names, codes, acronyms
Graph database
Relationships between nodes
People connected to a given person
Connections and patterns in networks
Vector database
Closeness between vectors
Red fruit, even if the text says "strawberries"
Synonyms, paraphrases, image search
Source: Weaviate, "What Is a Vector Database?", comparisons with relational and graph databases; MongoDB, "MongoDB Vector Search Overview", "red fruit" example; pgvector, PostgreSQL features (accessed 14.11.2026).
The line between vector and relational databases has moved, because PostgreSQL, MongoDB and Elasticsearch now search vectors too. According to Weaviate, a purpose-built system stands out through specialised indexing, filtering, multi-tenancy, compression and distributed scaling.
"Vector store" is, according to Weaviate, a broader term that AI frameworks use for the interface to any vector retrieval backend; "vector database" usually implies a complete system with persistence, filtering, security and scaling. Neither term is standardised.
Tools
Products and projects with vector search, in alphabetical order, not ranked.
Tool
Type, according to the vendor
Licence or model
Chroma
Search infrastructure for AI: vector, full-text and metadata search
Open source (Apache 2.0); also as a cloud service
Elasticsearch
Search engine with exact and approximate kNN search
Elastic License 2.0; source code also under AGPLv3 or SSPL
Faiss
Similarity search library (Meta)
Open source (MIT)
Milvus
Vector database
Open source (Apache 2.0); managed service on Zilliz Cloud
MongoDB Vector Search
Vector search inside MongoDB
MongoDB Atlas clusters and local deployments created with the Atlas CLI
pgvector
PostgreSQL extension
Open source (PostgreSQL-style licence)
Pinecone
Serverless vector database
Commercial managed service
Qdrant
Vector search engine and vector database
Open source (Apache 2.0); also as a cloud service
Weaviate
Vector database
Open source (BSD-3-Clause), enterprise features licensed separately; also as a cloud service
Source: each vendor's product pages, repositories and documentation (accessed 14.11.2026).
Criticism and limits
Recall figures published by vendors are their own. Weaviate writes that in its internal testing, 8-bit rotational quantization (RQ) retained roughly 98 to 99 % recall with up to 4x compression, and asks readers to measure it on their own data.
A similar text is not a correct answer. Weaviate concedes that a vector database does not by itself prevent a language model from hallucinating. Why embeddings handle negation poorly is explained in the entry on embeddings.
The categories overlap: Weaviate presents its own as tendencies, "not guarantees", with boundaries that are "increasingly blurred". Pinecone, which sells a vector database, argues that standalone indexes, naming FAISS, lack capabilities of any database and may need a full re-index to take in new data. The Faiss paper qualifies this: its API removes and updates vectors by id, but its HNSW index does not support removal or changes, and IVF and PQ indexes lose efficiency when the data distribution shifts significantly. Faiss also stores no metadata; it filters with a callback that receives each vector's id.
Switching embedding models means recomputing every vector. And when several tenants share one approximate index, pgvector notes that one tenant's vectors can affect recall and speed for the others.
How to apply it, step by step
Check whether the database you already use offers vector search.
Choose the embedding model and record the model and its configuration with the data.
Split documents into chunks and store each vector with its text and metadata.
Start with exact search while the collection is small, and add an approximate index when latency calls for it.
Measure recall on real questions by comparing approximate results with exact ones.
Plan how you will regenerate every vector before you switch models.
Best practices
Combine vector and keyword search where product names, codes or acronyms matter.
Use the distance metric the embedding model's provider recommends.
Isolate tenants with partitions or separate tables instead of sharing one approximate index.
Common mistakes
Mixing vectors from different models in the same index.
Filtering behind an approximate index without checking how many results remain.
Accepting a vendor's performance figure without measuring it on your own data.
Treating similarity between texts as proof that an answer is correct.
How this entry was made
This entry was written in November 2026 with the help of AI. The information comes from the HNSW and Faiss papers on arXiv, the 2017 Faiss announcement, the pgvector repository, and vendor documentation and product pages. It was reviewed before publication and contains no client data.
Manuel Riveiro RodriguezCEO & Digital Strategist
A technical audit covers this and everything else in one pass.
What is a vector database and what is it used for?
A database that stores vectors (embeddings) and returns the ones most similar to a query. It is used for semantic search, recommendations and for giving a language model context in RAG.
What is the difference between a vector database and a relational database?
A relational database looks up exact values in columns; a vector database searches by closeness between vectors and finds similar texts even when they use other words. PostgreSQL with pgvector does both.
Is FAISS a vector database?
No. Its authors' paper says so directly: Faiss "is not a database", because it provides no concurrent write access, sharding or transaction management. It is an index library that runs inside the application, and some vector databases use it as an engine.
What vector databases exist?
Among others, Chroma, Milvus, Pinecone, Qdrant and Weaviate as purpose-built systems, and Elasticsearch, MongoDB and PostgreSQL with pgvector as existing systems with vector search. The tools table lists type and licence.
Do you need a vector database for RAG?
Not always. Weaviate, which sells one, writes that small or static RAG applications can use an in-memory index or vector support in an existing database.