AI Agents · Retrieval

What Is a Vector Database?

A vector database finds things by meaning, not by exact match. It is the engine that lets an AI pull the passages most relevant to a question out of millions. Here is how embeddings and similarity search work, how it differs from a normal database, and when you actually need one.

Updated June 20266 min readBy the TinyCommand team
Your text
Embed → store
[0.12, -0.4, …]similaritynearest neighbors
Closest matches
by meaning
Build an AI agent free

Search the old way needs the right keyword. Search someone for “cancel my plan” and a page titled “how to unsubscribe” never shows up, because the words do not match. A vector database fixes that by searching on meaning instead of letters, and that one shift is what makes RAG and semantic search possible.

What Is a Vector Database?

Short answer. A vector database stores data as embeddings, long lists of numbers that capture meaning, and finds results by similarity rather than exact match. Give it a query and it returns the items closest in meaning, fast, even across millions of records. It is the storage and search layer behind most RAG and semantic-search systems.

The job it does is “find me the things most like this.” Not equal to, like. That sounds small, but it is the difference between a search box that needs the exact term and one that understands what you meant. For AI systems, that is everything, because language rarely matches word for word.

Embeddings, in One Minute

Short answer. An embedding is a list of numbers that represents the meaning of text, an image, or audio, produced by an embedding model. Similar meanings get similar numbers, so related ideas land near each other in vector space even when the words differ. Similarity search is just measuring the distance between these points.

Picture every sentence as a dot in a huge space, positioned so that sentences about the same thing sit close together. “Reset my password” and “I’m locked out” end up as neighbors. To answer a question you drop it into the same space and grab the nearest dots. A vector database is what makes finding those neighbors fast at scale.

Vector Database vs Traditional Database

Vector databaseTraditional (SQL)
Matches onMeaning (similarity)Exact values
Question it answersWhat is like X?What equals X?
StoresEmbeddings (vectors)Rows and columns
PowersRAG, semantic searchRecords, transactions
Use together?Often yesOften yes

They are not competitors. A normal database is still right for “show this customer’s orders.” A vector database is right for “find the docs that answer this question.” Plenty of apps run both, and some databases now do both: Postgres with pgvector is a popular middle path.

Do You Need a Vector Database for RAG?

For anything past a demo, yes. RAG works by embedding your content and pulling the chunks most similar to a question, which is precisely what a vector database is built to do. With a dozen documents you can search in memory and skip it. With real volume, you want one so retrieval stays fast and the right passages keep surfacing.

A vector database does not make retrieval good, only fast. Garbage in, garbage out still applies: messy or badly chunked content returns messy neighbors no matter which database holds them.

The Main Options

The usual names are Pinecone, Weaviate, Qdrant, Milvus, and Chroma, plus vector support bolted onto general databases like Postgres via pgvector. They vary on managed versus self-hosted, scale, and extras like filtering and hybrid search, but the core job is identical: store embeddings, return nearest neighbors quickly. Pick based on your scale and stack, not the leaderboard of the week.

Whatever vector database you choose, it indexes whatever you give it. TinyTables keeps the underlying data structured and current as work happens, so the content you embed, and the matches you get back, stay trustworthy. Free to start, no code.

Keep the source clean

Frequently Asked Questions

What is a vector database?

A vector database stores data as vectors, long lists of numbers called embeddings that capture meaning, and finds results by similarity rather than exact match. Ask it for the items closest in meaning to a query and it returns the nearest vectors fast, even across millions of records. It is the storage and search engine behind most RAG and semantic-search systems.

What is the difference between a vector database and a regular database?

A traditional database matches exact values: find the row where email equals this. A vector database matches meaning: find the passages most similar to this question, even if they share no keywords. Relational databases answer 'what equals X'; vector databases answer 'what is like X'. They complement each other, and many apps use both.

What is an embedding?

An embedding is a list of numbers that represents the meaning of a piece of text, image, or audio, produced by an embedding model. Things with similar meaning get similar numbers, so 'cancel my plan' and 'how do I unsubscribe' land near each other in vector space even though the words differ. Similarity search works by measuring distance between these vectors.

Do I need a vector database for RAG?

For anything beyond a toy, yes. RAG works by embedding your content and finding the chunks most similar to a question, which is exactly what a vector database is built to do quickly. For a handful of documents you can search in memory, but once you have real volume you want a vector database to keep retrieval fast and accurate.

What are the main vector databases?

Common options include Pinecone, Weaviate, Qdrant, Milvus, and Chroma, plus vector support added to general databases like Postgres (pgvector). They differ on hosting, scale, and features, but all do the same core job: store embeddings and return nearest neighbors fast. The right pick depends on your scale, stack, and whether you want managed or self-hosted.

Does a vector database fix bad retrieval?

No. A vector database makes similarity search fast, but it cannot improve what you feed it. If your content is messy or chunked poorly, the nearest neighbors are still messy. Clean, well-structured source data does more for retrieval quality than swapping vector databases, which is why structure upstream matters so much.

Keep exploring

Get the AI-agent playbooks

No-fluff guides on building, training and shipping AI agents — straight to your inbox.

Or skip ahead — start free →