onema
AI solutions
MVP
Web development
Mobile apps
UX/UI design
Branding
Find out your project cost
office@onema.ru
Questions and suggestions
Get a cost estimate

What is a vector database

A vector database finds records by meaning rather than by matching words. Where it sits in an AI stack, and when you don’t need a separate database.
Emil I.
PMO at onema
What is a vector database — illustration for the onema article
A vector database is a store designed for search by meaning. It holds embeddings (numerical representations of texts) and, within milliseconds, finds the records among millions that are approximately closest in meaning to a query. A conventional database looks for exact matches; a vector database looks for similar meaning. Today both roles are often combined in PostgreSQL with the pgvector extension.

In plain terms


Let’s continue the map from the article on embeddings: if an embedding gives a text its coordinates on a map of meanings, a vector database is the map itself, with a fast way to answer ‘who are the neighbours of this point?’. Scanning a million records for every query would be slow and expensive. So vector indexes (HNSW, IVF) find neighbours approximately: fast, but occasionally missing a couple of relevant records. The balance between accuracy and speed is tunable. It is an engineering decision, not a property of some ‘magic database’.

Where it sits in an AI stack


In RAG, the vector database is the assistant’s ‘knowledge library’. Documents, the catalogue and internal policies are split into chunks, each chunk gets an embedding and is stored in the database. A question comes in → the database returns chunks close in meaning → the model formulates an answer based on them. Update the catalogue, and after automatic reindexing the database knows about the new product. No need to retrain the model.

Vector search doesn’t replace a conventional database; it complements it. Prices and stock levels live in the conventional database and are inserted into the answer directly. The model does not generate these figures. The vector part is responsible only for ‘finding by meaning’.

Where to start


Not with choosing a database. There are dozens of them, and it’s the last decision you make. Data comes first: what goes into the knowledge base and what state it’s in. This is the first stage of every AI project we run (see our AI development page).

A real-world example

In Sigma.AI, an assistant for the Sigma.Market grocery marketplace, the knowledge base consists of 1,155 recipes and 238 normalised ingredients, each linked to a warehouse stock item. A query like ‘what can I cook with chicken and mushrooms’ is handled there by a deterministic ingredient search scenario, without a model, in up to 6 seconds. A custom embedding runs in the generation pipeline for new, non-standard queries. Availability and prices are always taken directly from the warehouse database. The example shows the key point: semantic search is one of the tools in the system, not a mandatory foundation. More details in the Sigma.AI case study.
Wondering how to teach an assistant to answer from your data?
Describe your task in the estimate form — we’ll start with a data audit and propose an architecture. A live example is in the Sigma.AI case study, and our approach is described on our AI development page.

FAQs

Cost calculation
Tell us where your product has hit a wall, in the estimate form
After the audit, we'll tell you what to migrate, what to keep and how much it costs
More articles