Skip to content

Vector Database

A vector database is a data system designed to store and search numerical vector representations such as embeddings for similarity and semantic retrieval.

A vector database is a data system designed to store and search vector representations such as embeddings.

It is commonly used for semantic retrieval in AI applications.

How It Works

A simplified workflow looks like:

Document
   ↓
Embedding
   ↓
Vector database

Then:

User question
   ↓
Question embedding
   ↓
Similarity search
   ↓
Related document chunks

The retrieved material can then be used by Retrieval-Augmented Generation.

Vector Database vs. Vector Store

The terminology varies between platforms.

Vector store is a broader term for a collection or index containing vectors.

Vector database usually refers to a database system optimized to persist, index, filter, and query vector information.

OpenAI's retrieval system, for example, uses the term vector store for searchable collections where uploaded files are chunked, embedded, and indexed. OpenAI retrieval and vector-store guide

What It Can Store

A vector system may associate embeddings with:

  • Original text
  • Document ID
  • Source URL
  • Author
  • Date
  • Category
  • Access level
  • Content Type
  • Other metadata

Metadata can help narrow retrieval beyond semantic similarity alone.

Does RAG Require a Vector Database?

No.

Retrieval-Augmented Generation requires retrieval.

That retrieval might use:

  • Vector search
  • Keyword search
  • SQL
  • Search APIs
  • Hybrid search
  • External knowledge systems

Vector databases are common because semantic retrieval is useful, not because they are mandatory.

Common Problems

Common problems include:

  • Treating the vector database as the source of truth
  • Content updated without re-indexing
  • No metadata
  • Permissions ignored during retrieval
  • Duplicate document chunks
  • Poor chunk sizes
  • Old content retrieved alongside current content

How to Improve

Keep the original content source authoritative.

Build a process to:

  • Index
  • Update
  • Delete
  • Filter
  • Monitor

vector representations as the underlying content changes.

Data Synchronization concepts apply here as much as they do to other integrations.