A vector database is a data store that holds texts, images or other content as embeddings — long numerical vectors that represent their meaning. It does not answer the question “Which document contains this word?” but “Which entries lie closest to this query?”. That makes it the store behind semantic search and behind many systems for retrieval-augmented generation.
What does a vector database store?
Each entry has three parts: the vector, the original text or a reference to it, and metadata such as file name, date or language. Before texts go into the database, they are split into sections (chunking) and translated into vectors by an embedding model.
OpenAI documents what this looks like in practice for its vector stores: every file added is automatically chunked, embedded and indexed. By default, the chunks are 800 tokens long with a 400-token overlap (OpenAI documentation, as of October 2026). The metadata later serves as a filter, for example for a particular department or time period.
How does search in a vector database work?
The query is translated into a vector with the same embedding model. The database then looks for the nearest neighbours: the stored vectors with the smallest distance or the highest similarity, measured for example by cosine similarity. The result is a list of the most similar sections with their similarity scores.
An exact search compares the query with every single vector. With millions of entries, that takes too long. Vector databases therefore usually rely on approximate nearest neighbour search (ANN): an index checks only part of the vectors and accepts that it will occasionally miss a close neighbour.
A widely used ANN method is HNSW (Hierarchical Navigable Small World), a multi-layer graph that Yu. A. Malkov and D. A. Yashunin presented in March 2016. The search moves from coarse to fine layers and gradually homes in on the most similar vectors.
Which types of vector database exist?
The systems fall into three groups. The list is not a ranking.
| Group | Example | Characteristic |
|---|---|---|
| Extension of an existing database | pgvector for PostgreSQL | vectors sit alongside the other data |
| Standalone vector database | Pinecone | built specifically for vector search |
| Built into AI platforms | OpenAI vector stores | chunking and embedding run automatically |
pgvector describes itself as open-source vector similarity search for Postgres. According to the project page, it supports exact and approximate nearest neighbour search, the index types HNSW and IVFFlat, and distance measures including Euclidean distance, inner product and cosine distance.
Why does a vector database matter for AI visibility?
In a vector database, it is not the page that competes but the section. Scott Stouffer explained at SEO Week 2026 that AI systems break pages into chunks, map them into vector space and retrieve them by semantic similarity rather than by evaluating the whole page. A small passage can therefore outperform an entire page (iPullRank, May 2026).
Care is needed when applying this to web search. Kai Spriestersbach points out that the documented chunking defaults come from enterprise RAG products, not from Google web search (AFAIK, August 2026). For its AI features, Google describes retrieval through the core ranking systems of Search; its guide does not mention a vector database (Google Search Central, July 2026).
What does this mean for your website?
An embedding condenses the meaning of a whole section into one vector. If a section covers two topics, its vector lies between the two — and therefore further from each individual question. Write one topic per paragraph (semantic chunking) and lead with the key statement.
Name things consistently. Products, services and technical terms should carry the same name on every page, so that the sections land in vector space where questions about them are asked. A vector database cannot replace indexing: in web search, only what has been found beforehand enters the comparison (initial retrieval).