MMOOZZGG.com

Glossary

What is a vector database?

In short

A vector database is a store that keeps texts, images and products as embeddings and quickly finds records close in meaning to a query.

Search and RAG · vector database

MMOOZZGG.com editorsChecked: 1 min read

For a child

Imagine a huge box of colored pencils. The pencils are not sorted by name: each lies next to similar colors, light blue by dark blue, pink by red. When you need the color of the sky, you reach straight into the right corner and do not search the whole box. A vector database arranges texts and pictures the same way: similar things lie side by side.

In plain words

An ordinary database looks for exact matches: an order number, a surname, a date. A vector database looks for what is similar in meaning. Each document or product is first turned into an embedding, a long list of numbers, and saved together with the original text. When a query comes, it is also turned into numbers, and the database finds the records with the closest values in a fraction of a second. A shopper types “warm jacket for fishing”, and the store shows a parka with a membrane, even though the query had none of those words.

For business

Almost every assistant that answers from documents needs such a store, and so does smart catalog search. The usual choice is a separate product or an extension to the database you already have, for example pgvector for PostgreSQL. The second option is easier to maintain and needs no new server. The price depends on the number of records, the length of the vectors and the speed you need. The index is kept in memory, and millions of documents need a lot of it. If the database holds personal data or trade secrets, where it physically sits matters: in Russia, a foreign cloud may conflict with 152-FZ, the Russian personal data law. Hosting on your own server is discussed together with the choice of a local model.

For a specialist

A vector database stores vectors together with their IDs and metadata and answers nearest-neighbor queries by a metric: cosine similarity, dot product or Euclidean distance. Exact search gives full recall, but its time grows linearly with volume, so systems use approximate nearest neighbor (ANN) search. The common HNSW index (Malkov, Yashunin, 2016) builds a hierarchy of proximity graphs and gives logarithmic growth of search cost. Other families are IVF, which splits the space into clusters, and product quantization for compression. The Faiss library (Douze et al., 2024) collects methods for indexing, compressing and clustering vectors. The pgvector extension adds exact search to PostgreSQL by default, plus HNSW and IVFFlat indexes. Engineering questions include metadata filtering together with ANN, index updates without downtime and access control for records.

Example

A support team keeps all past operator answers in a vector database. The system compares a new request with them and shows the operator three similar cases with their solutions.

Related terms

Questions and answers

How is a vector database different from an ordinary one? An ordinary database finds records by an exact match of fields. A vector database compares sets of numbers and returns records close in meaning, even if the query uses other words.
Can I do without a separate vector database? Yes, if you have little data. Extensions such as pgvector add vector search to PostgreSQL, and you need no separate service while the volume and load stay moderate.

Sources

Not sure whether your company needs this?

AI solutions map
Contact us