What is Vector database?
A vector database stores embeddings, the sequences of numbers a model has turned texts, images or products into, and answers one single question very quickly: which stored sequences lie closest to a new one? A conventional database checks whether a value is equal or contains a pattern. A vector database checks how close two meanings are and returns the nearest neighbours in order.
It is only fast with an index. Comparing every query against every entry works for a thousand paragraphs and becomes a wait at a million. Methods such as HNSW therefore build a neighbourhood graph in which the search lands in the right region within a few hops, at the price of occasionally returning a slightly worse neighbour than the exhaustive calculation would. For a website search that trade is almost always the right one.
You do not need a separate product for it. Postgres does it with the pgvector extension, many search services ship a vector index, and for a website with a few hundred pages that is entirely sufficient. What the database does not do is create the meaning. That comes from the embedding model, and the quality of the results depends on the quality of the units that were embedded. The three terms belong together: the embedding is the sequence of numbers, the vector database finds the closeness, and RAG is the method that uses both and has an answer written from them.
Why does Vector database matter?
In 2023 Google Cloud had Harris Poll survey nearly 13,500 adults in 14 countries: 80 per cent are more likely to buy elsewhere after an unsuccessful search on a retail site, 77 per cent avoid websites where they have experienced search difficulties before. The vector database is the component that turns „no results" into a list of hits with the page of the same meaning at the top.
Vector database in practice
- 01The site search sends the embedded query to the vector database and receives the ten closest paragraphs with their page addresses, sorted by closeness.
- 02A help centre with 3,000 articles sits as a vector index in the same Postgres database as the customer data, because pgvector needs no second service.
- 03An AI chatbot retrieves the five best-matching passages through the vector database and passes only those to the language model, so that the context window stays small and the answer stays verifiable.


