Vector database

Definition

A vector database is a database built to store embeddings, the number lists that represent the meaning of text, and to quickly find the ones closest to a new question. In many RAG systems it is the place where the search step happens.

By Ronan Liedmeier, fractional head of growth and course author · Published 17 October 2026 · Last updated 17 October 2026

Also called: vector store, vector DB

Once a knowledge base grows large, comparing a question against every chunk one at a time gets slow. A vector database does that comparison fast.

How it differs from a regular database

A regular database finds exact matches: the customer with ID 4417, every order with status "open". A vector database finds the nearest matches by meaning and returns them ranked, closest first. Ask it about "notice period for ending a contract" and it can return a clause that says "termination requires 60 days' written notice".

Each stored item has three parts: the embedding, the original text, and metadata such as the source document, section, date and access level. The metadata is what lets you narrow a search before ranking. Some teams add vector search to a database they already run instead of adopting a separate product.

Example

A legal operations team stores every clause from its signed contracts with metadata for client, contract type and status. A lawyer asks for termination-for-convenience terms. The query is filtered to one client and active contracts only, then ranked by similarity, so she gets the four relevant clauses instead of every termination clause the firm has.

Common mistake

Ignoring metadata filters, especially permissions. If the search ignores who is asking, a sales rep can receive passages from HR files or board minutes inside an AI answer. Store access level with every chunk and filter on it before any results reach the model.

Learn it in AI Academy

Related terms

Embedding
An embedding is a list of numbers that represents the meaning of a piece of text, so a computer can measure how similar two texts are. Texts about the same idea get similar numbers even when they use different words.
Retrieval-augmented generation (RAG)
Retrieval-augmented generation (RAG) is a way of getting an AI model to answer from your own documents. A search step first finds the passages that match the question, then the model writes its answer using those passages.
Semantic search
Semantic search is a way of searching by meaning instead of exact words, so it finds passages that say what you asked even when they use different wording. It usually works by comparing embeddings, which are lists of numbers that capture what a piece of text means.
Chunking
Chunking is splitting long documents into smaller pieces before they go into a RAG system, so a search can find and return just the relevant part. Where you cut the text decides whether each piece still makes sense on its own.

Browse all terms

Find your next step with AI