What Is a Vector Database?

What Is a Vector Database?

A vector database is a database built to store and search information by meaning, rather than by exact words or labels. Instead of rows in tables, it stores items as vectors — long lists of numbers that describe what something means — and finds the items whose numbers sit closest together.

A normal database is good at exact questions: find the order with this number, or list every customer from one city. A vector database is good at fuzzy questions: find the support article that answers this problem, or the product most like the one a shopper just viewed, even when none of the words match exactly.

Vector databases were once a specialist tool for researchers. They became mainstream because modern AI applications need this kind of search. A vector database does that job quickly, at scale.

Key takeaways

  • A vector database stores items as vectors, lists of numbers that capture meaning, and searches by closeness between those numbers.
  • Vectors are made by embedding models, which turn text, images, or audio into numbers so similar things end up near each other.
  • Similarity search finds the nearest neighbours of a query, which is why it works when words do not match exactly.
  • The main uses are AI search, chatbots that answer from your own documents, recommendations, and image and audio search.
  • A vector database does not replace a normal database: most real systems use both, each for the job it does best.

What a vector database actually is

A vector database is built for one job: storing vectors and finding the ones nearest to a given vector, fast, even when there are millions of them. A vector is a list of numbers that represents one item — a paragraph, a product description, a photo, or a short recording.

Think of a map. On an ordinary map, places near each other are related by geography. In a vector database, items near each other are related by meaning. A paragraph about returning a faulty kettle sits close to one about refunds for damaged appliances, even though the two share almost no words.

The database stores the original item, or a link to it, alongside its vector, so once the nearest vectors are found, the system can return the real paragraphs, products, or images behind them. Our explainer on what retrieval-augmented generation is and how it uses retrieved passages shows one of the best-known systems built on top of this idea.

Vectors and embeddings in plain English

An embedding is the process that turns an item into a vector. An embedding model — a type of machine learning model — reads a piece of text, an image, or a sound clip and produces the list of numbers that represents it. It learns which things belong together from huge amounts of examples.

Each number in a vector is one dimension, and each dimension captures some aspect of the item. No single number means anything on its own. The meaning lives in the pattern across all of them. A vector with 768 numbers is common for text; some models use 1,536 or more.

The same model must be used for both sides of a search. If your documents were turned into vectors by one model and a question is turned into a vector by a different one, the two sets of numbers do not line up, and the results will be poor. Our guide to what machine learning is and how models learn from examples explains the training behind these models in plain terms.

How similarity search works

Similarity search starts when a query is turned into a vector in the same way as the stored items. The database then compares that query vector with the stored vectors and returns the ones closest to it. Closeness is measured with a distance calculation, such as cosine similarity or Euclidean distance. The nearest items are the most similar ones.

Checking every stored vector one by one would be too slow once a collection grows past a few thousand items. So vector databases use indexes, shortcuts that organise vectors so the search can skip most of them. One method groups vectors into clusters and checks only the nearest clusters; another builds a graph where each vector links to its neighbours. These shortcuts are approximate, but they return very good answers in a fraction of the time.

A shop owner browsing a grid of product photos on a laptop at a shop counter
A shop owner browsing similar product photos is using the same idea as similarity search: find the items closest to the one in front of you.

Why vector databases matter for AI applications

Vector databases matter because so many AI applications are really search problems in disguise. A chatbot that answers from company documents needs to find the right passages before it can write an answer. A recommendation system needs to find products a customer is likely to want. An image search needs to find photos that look like the one uploaded.

Semantic search is the clearest example. A customer who types “my kettle leaks from the base” does not want pages containing the word “kettle”. They want the page that explains the fault, even if that page says “water escapes underneath the appliance”. Keyword search misses it; similarity search finds it, because the two descriptions mean nearly the same thing.

How a vector database differs from a traditional database

A traditional relational database stores tidy rows and columns: a name, a price, a date. It answers exact questions brilliantly, enforces rules about what can be stored, and keeps records consistent when several people change them at once. A vector database is built for a different question: which stored items are most like this one?

The difference shows up in what each one is bad at. Asking a relational database for “things similar to this paragraph” is slow and awkward, because it has no notion of meaning. Asking a vector database for an exact total, or a transaction that must never be half-completed, is equally awkward. That is why most real systems use both, connected by an identifier, so a vector result can be joined back to the full record.

Popular options, and how they differ

The best-known dedicated vector databases include Pinecone, Weaviate, Qdrant, Milvus, and Chroma. Pinecone is a managed service: you send it vectors and queries, and it handles the infrastructure. Weaviate, Qdrant, and Milvus can be run yourself or used as managed services. Chroma is a smaller, simpler option often used for prototypes and small projects.

Many familiar databases have also added vector support. PostgreSQL, through the pgvector extension, can store vectors and run similarity search in the same database that already holds the rest of the application data. Elasticsearch and OpenSearch, long used for text search, now support vectors too.

What a small business needs to start

A small business does not need a large setup to start. The first step is to pick one concrete job, such as searching support articles, recommending products, or finding similar images. A vague goal such as “use AI search” leads to a vague result. A specific job — “a customer types a problem in their own words and gets the right help article” — can be tested and improved.

Next comes the content. Gather the documents, product descriptions, or images the search should cover, and check their quality. Outdated pages and half-finished descriptions will be retrieved just as faithfully as good ones, and the answers built on them will be wrong. Cleaning the source material is usually more valuable than tuning the database.

The caveats that matter

Vector search is powerful, but it is not magic, and its failures are quiet. A search can return results that look plausible and are wrong, because closeness in numbers is a guess about meaning, not a guarantee. Two items can be similar in the wrong way — the same words, a different situation — and the system has no way to know.

Vector databases at a glance
Detail What is known
What it stores Vectors, lists of numbers that represent the meaning of text, images, or audio
What it is best at Finding the items most similar to a query, even when words do not match
What it is not for Exact totals, reports, and transactions that must never be half-completed
How vectors are made Embedding models turn items into numbers; the same model must be used for queries
How search stays fast Indexes such as clustering and neighbour graphs approximate the nearest items
Common uses Semantic search, chatbots over your own documents, recommendations, image search
Typical setup Used alongside a traditional database, not as a replacement for it
Main risk Similar-looking but wrong results, and poor results from poor source content

Vectors are made from your content, so check where it goes when it is embedded and what the provider keeps. Our explainer on what big data means and where business data comes from covers keeping business data organised and trustworthy.

Checklist: judging a vector database honestly

Use these checks before choosing a product or rebuilding a search feature around one.

  • Name the one job it must do, in a sentence a customer would recognise, before comparing products.
  • Test it with real questions from real users, not with tidy examples written by the team that built it.
  • Check that the same embedding model is used for stored items and for queries, and record which one.
  • Confirm it supports the filters you need, such as in stock, one product line, or one language.
  • Ask where your content goes when it is embedded, and what the provider stores or keeps.
  • Compare it against plain keyword search on the same questions, and keep whichever genuinely answers better.

Frequently asked questions

What is a vector database in simple terms?

It is a database that stores items as lists of numbers describing their meaning, and finds the items whose numbers are closest to a question. It answers “what is most like this?” rather than “what matches this exactly?”

What is the difference between a vector and an embedding?

An embedding is the process of turning an item into a vector, and the vector is the result: the list of numbers itself. The embedding is the conversion; the vector is what gets stored and searched.

Do I need a vector database to build a chatbot?

Not always. A small chatbot over a handful of pages can work with simpler search. A vector database becomes worth it when the document collection is large, or keyword matching keeps missing the right page.

Can a vector database replace my normal database?

No, in almost every real system it sits alongside one. The normal database keeps orders, customers, and money, where exactness matters. The vector database handles similarity search, and the two are linked by an identifier.

How much does a vector database cost?

At small scale, very little: many managed services have a free tier, and a few thousand vectors cost almost nothing to store. Costs grow with the number of vectors, the amount of text embedded, and the number of queries.

Is vector search always better than keyword search?

No. Keyword search is better for exact names, codes, and phrases that must match precisely. Vector search is better when the question is paraphrased. Many systems run both and combine the results.

The bottom line

A vector database is a specialist tool for a common problem: finding things by meaning instead of by exact match. It stores items as vectors, searches for the nearest neighbours of a question, and makes semantic search, recommendations, and document-based chatbots practical at scale. It works best alongside a traditional database, not instead of one.

For a small business, the sensible start is one concrete job, clean source material, and a test against keyword search using real customer questions. If the vector results are clearly better, the tool has earned its place.

Note: Product names and features change quickly, so check the current documentation of any vector database before choosing one for a live project.

on this page