Definition
What is Vector database?
Vector database is a vector database stores text, images or other data as lists of numbers called embeddings and finds the items closest in meaning to a query, which is how many AI apps search your documents.
What it is
A vector database is a database built to search by meaning instead of by exact words. It stores each item, such as a paragraph, a product photo or a support ticket, as a long list of numbers called a vector. Items with similar meaning end up with similar vectors, so the database can answer "which of these is closest to my question?"
How it works
The numbers come from an embedding model. You run every document through it once and store the results. When a user asks something, you turn the question into a vector with the same model and ask the database for its nearest neighbors, meaning the stored vectors that sit closest to it.
Checking every vector one by one gets slow at millions of items, so vector databases build special indexes that find close matches approximately but very fast. The trade is a small chance of missing the single best match in return for much lower latency.
Many ordinary databases now offer a vector column or extension as well, so a separate product is not always required.
Why it matters to you
A large language model only knows its training data and whatever fits in its context window. A vector database lets you hand it the right few pages from a library far too big to paste in. That is the retrieval step in retrieval-augmented generation, and it is a main way to keep answers grounded in your own material and cut down hallucination.
It also powers search that understands synonyms. A search for "refund policy" can find a page titled "returning an order" even though no words match.
An example
Say a company loads 10,000 help articles into a vector database. A customer asks, "My card was charged twice." The question is embedded, the database returns the three closest articles, and those pages are placed in the prompt so the model can answer from them.
What to keep in mind
Closest in meaning is not the same as correct. The database returns what looks similar, so poor chunking of documents or an embedding model that does not fit your subject will pull the wrong passages. Test retrieval on real questions before you trust the answers built on top of it. Stored vectors can also leak the content they came from, so treat the database with the same care as the source documents.
Questions people ask
What is a vector database used for?
It is used to search by meaning, most often to retrieve relevant passages for an AI model in retrieval-augmented generation, and for semantic and similar-item search.
Do I need a vector database for RAG?
Not always. Small collections can be searched directly, and many general-purpose databases now support vector search, so a dedicated product is optional.