Contact
AI & Automation

What is a vector database?

A vector database stores and searches high-dimensional vectors — numerical representations of text, images, or other data. It's the retrieval engine behind RAG systems and semantic search.

How it works: text is converted into vectors (arrays of numbers) using an embedding model. Similar concepts produce similar vectors. "How to cook pasta" and "Italian cooking instructions" would have vectors pointing in roughly the same direction, even though the words are different. The vector database finds the most similar vectors to your query vector — this is semantic search, not keyword matching.

Major platforms: Pinecone (fully managed, easiest to start), Weaviate (open-source, feature-rich), Qdrant (open-source, high performance), Chroma (lightweight, local development), Milvus (enterprise scale), and pgvector (PostgreSQL extension — use your existing database).

Cost: Pinecone starts at $70/month for 1M vectors. Weaviate Cloud starts at $25/month. pgvector is free (runs on your existing PostgreSQL). Self-hosted solutions cost whatever your infrastructure costs.

For most business applications, pgvector is the pragmatic choice. It's free, runs on your existing database, supports up to 10M vectors with good performance, and eliminates an additional service in your stack. Move to a dedicated vector database (Pinecone, Weaviate) when you exceed 10M vectors or need sub-10ms query latency.

Embedding models: OpenAI's text-embedding-3-small ($0.02 per million tokens) or open-source alternatives (sentence-transformers) for self-hosting.

Still have questions?

Talk to Empirium