AI & Infrastructure
Vector Database

Vector Database

A vector database stores embeddings together with IDs and metadata. It finds the vectors closest to a query vector in milliseconds, which makes it the storage layer behind many semantic search and RAG systems.
June 28, 2026
Cihan Geyik
Table of Content

Embedding a million help-center paragraphs is the easy part. The hard part is finding the ten closest to a new question in a few milliseconds, filtered to one product and one language. A vector database exists for that job. It’s the store a company’s AI assistant searches before it answers, and it decides which passages the model gets to read.

A vector database finds rows by distance. Each query returns the records whose vectors sit closest to it, with metadata filters applied on top.

What does a vector database store?

Each record holds an ID, the vector, metadata and usually the original chunk of text. The metadata is what makes the store useful in production.

{ "id": "kb-1042-03",
"vector": [0.018, -0.092, 0.057, …],
"metadata": { "source": "https://help.example.com/exports", "language": "de", "product": "Reports", "updated": "2026-09-30" },
"text": "Exports over 50,000 rows run in the background …" }

The vectors themselves are embeddings produced by a model before insertion. The database stores and searches them, but it doesn’t decide what they mean.

How does a vector database work?

Embed and insert records → Build an approximate index → Embed the incoming query → Apply metadata filters → Return the nearest records

Comparing a query with every stored vector gives perfect recall but slows down as the collection grows. So databases build approximate indexes and trade a little accuracy for speed. The search step itself is described on our vector search page.

The pgvector documentation spells out the usual trade-offs:

  • Exact search is the default and has perfect recall.
  • HNSW indexes give a better balance of speed and recall, but build slower and use more memory.
  • IVFFlat indexes build faster and use less memory, with lower query performance.

Scale changes the picture again. FAISS, a similarity search library from Meta’s Fundamental AI Research group, was built for it. Its GPU paper describes a nearest-neighbor graph over 1 billion vectors, built in under 12 hours on four GPUs. Compression methods such as product quantization shrink vectors further so more fit in memory.

Vector database options

OptionExamplesFits when
Dedicated vector databaseMilvus, Qdrant, Weaviate, Chroma, PineconeVectors are the main workload, at large scale
Extension to an existing databasepgvector for PostgresYou already run Postgres and want one system
Search engine with vector fieldsElasticsearch, OpenSearch, Azure AI SearchYou need keyword and vector search together
Index libraryFAISSYou build your own service around an index

Milvus, Qdrant, Weaviate and Chroma are open-source projects that also sell managed cloud versions. Pinecone is a managed service. Limits differ in ways that matter. The pgvector extension indexes its standard vector type up to 2,000 dimensions. A 3,072-dimension embedding needs its half-precision type or a shorter vector.

The AI visibility side has its own open-source tooling. Our roundup of open-source AEO and GEO tools for developers lists the main projects.

Vector database vs vector index vs traditional database

A traditional database answers exact questions, such as every order over $500 from last week. A vector index answers similarity questions but stores little else. A vector database wraps the index with persistence, updates, deletes, access control and metadata filters.

Filters are harder than they look. Filter after the similarity search and a narrow filter may leave two results out of ten requested. Filter before it and the index can’t help much. Good databases combine the two steps inside the index.

Do AI search engines use vector databases?

ChatGPT search, Perplexity and Google don’t publish their storage stacks, and web-scale retrieval runs on proprietary indexes. Vector databases matter most for private collections: help centers, internal docs and product catalogs.

Those collections feed company assistants and agents through retrieval-augmented generation. A knowledge base is usually the first corpus a team loads. Many teams add a keyword field as well and run hybrid search, so exact product codes still match.

Common mistakes when adopting one

  • Mixing embedding models. Vectors from two models aren’t comparable, so a model change means re-embedding everything.
  • Skipping metadata. Without language or market fields, a German user can get English chunks.
  • Letting chunks go stale. Deleted or edited pages linger until the sync job removes them.
  • Treating closeness as truth. The nearest chunk can be outdated or wrong.
Record the model version with every vector. When you switch embedding models, you’ll know exactly which records still need re-embedding.

How Ansvisor helps

Your help center often feeds your own vector database and gets cited by public AI engines. Ansvisor’s Citations Monitoring lists which of those URLs ChatGPT, Gemini, Perplexity and other platforms cite for each tracked prompt and market. When a forum thread is cited instead of your docs, rework that article, and your own retrieval gains too. Ansvisor is open source under the MIT license, so developers can self-host it next to the rest of their stack.

Vector Store, Vector DB, Embedding Database, Vector Search Database

Let AI Search Work for Your Growth

Each prompt you win brings more mentions, more citations and more buyers. Ansvisor keeps finding the next one.

AI Answers Mentions Citations Visibility Score AI Share of Voice AI Traffic Revenue
Win Back Search VisibilityTry Ansvisor 14-day Free →✓ Zero risk. Cancel anytime.

FAQ

Frequently asked questions.

What is a Vector Database?

A vector database is a data store built to hold embeddings and search them by similarity. Each record pairs a vector with an ID, metadata and often the source text. Given a query vector, it returns the closest records quickly, even across millions of entries.

Why are Vector Databases important?

AI assistants and search features need to find relevant passages by meaning in milliseconds. A vector database does that at scale and adds what a bare index lacks: persistence, updates, metadata filters and access control. Many retrieval-augmented generation systems keep their documents in one.

How do Vector Databases work?

Content is embedded and inserted with metadata. The database builds an approximate nearest neighbor index, such as HNSW or IVF. Each query passes through the same embedding model, and optional filters narrow the candidates. The index then returns the closest vectors by cosine, dot product or Euclidean distance.

What are examples of vector databases?

Dedicated options include Milvus, Qdrant, Weaviate, Chroma and the managed service Pinecone. pgvector adds vector search to Postgres. Search engines such as Elasticsearch and OpenSearch support vector fields, and FAISS is an index library that teams build their own services around.

How do Vector Databases affect AI visibility?

Public AI engines don’t disclose their storage, so the direct effect is on private assistants built over your help center or docs. The same content habits apply to both: focused sections, current facts and metadata such as language and product make passages easier to retrieve.

Help us grow the AI Visibility Glossary

New terms are added regularly.

Help us improve the page or suggest a new term →
About the Author
Cihan Geyik

Cihan Geyik

Co-founder at Ansvisor

Cihan Geyik is the co-founder of Ansvisor, an open-source AI Visibility platform for AI Search. With more than 15 years of experience in digital marketing and growth, he writes about AI visibility, AI search, AEO, GEO, citations, and answer engines. He focuses on helping brands understand and improve their presence across ChatGPT, Gemini, Google AI Overviews, Bing AI Mode and other AI answer engines.

Google Preferred Sources
Get more Ansvisor insights in Google

Add Ansvisor as a preferred source and Google will show you more of our AI search, AEO and GEO guides.