|$ curl https://forge-ai.dev/api/markdown?path=docs/ai-tools/best-vector-databases
$cat docs/best-vector-databases-2026.md
updated November 2026·19 min read·published

Best Vector Databases 2026

◆Vector Database◆RAG◆Pinecone◆Comparison◆Advanced🎯Free Tools
The Vector Database Decision in 2026

Every production RAG (Retrieval-Augmented Generation) system lives or dies by its vector database. The choice you make here shapes three things you will feel every day: cost (managed services can run thousands of dollars per month at scale, self-hosted options cost engineer-hours instead), latency (retrieval is on the critical path of every LLM call, so a slow index directly adds milliseconds to user-facing responses), and scale (the index that feels instant at 100K vectors may fall over or blow your budget at 100M).

The market has consolidated into a few clear camps in 2026: fully managed services like Pinecone that trade money for zero operations, open-source engines like Weaviate, Qdrant, and Milvus that you can self-host or run as cloud services, Postgres extensions like pgvector that add vector search to the database you already run, and dev-first stores like Chroma that optimize for getting a prototype running in five minutes.

This guide compares all of them on the criteria that actually matter in production: indexing performance (HNSW and friends), metadata filtering, hybrid (vector + keyword) search, horizontal scaling, operational burden, and total cost of ownership. The recommendations are based on real RAG workloads — document Q&A, semantic search, agent memory, and recommendation retrieval — not marketing benchmarks.

ℹ

info

Short on time? The short version: pgvector if you already run Postgres and have under ~10M vectors, Qdrant for self-hosted performance with excellent filtering, Pinecone if you want zero ops and have the budget, Weaviate if you need built-in hybrid search and knowledge-graph features, and Chroma for local development and prototypes.
Quick Comparison
DatabaseTypeHostingHybrid SearchPricing ModelBest For
PineconePurpose-built, closed sourceFully managed (serverless / pods)✅ Sparse-denseUsage-based, free tier → enterpriseZero-ops production RAG
WeaviatePurpose-built, open source (BSD-3)Self-host, Weaviate Cloud, serverless✅ BM25 + vector (native)Free OSS / cloud from $25/moHybrid search + knowledge graphs
QdrantPurpose-built, open source (Apache 2.0, Rust)Self-host, Qdrant Cloud, hybrid cloud✅ Sparse + dense vectorsFree OSS / cloud free tier → usageSelf-hosted performance + filtering
pgvectorPostgreSQL extensionAnywhere Postgres runs (self, RDS, Supabase, Neon)Partial (combine with tsvector / pg_search)Your existing Postgres billTeams already on Postgres, joins with relational data
ChromaDev-first embedding storeEmbedded / local server / Chroma CloudBasic metadata filteringFree OSS / cloud usage-basedPrototyping, local dev, notebooks
MilvusDistributed, open source (Apache 2.0)Self-host (K8s), Zilliz Cloud✅ Sparse + dense, analyzerFree OSS / Zilliz Cloud usage-basedEnterprise scale, 100M+ vectors
📝

note

Pricing changes frequently in this space — always verify current tiers on each vendor's site before committing. The structural differences (usage-based vs. pod-based vs. your own infra) matter more than the exact dollar figure, because they determine how your costs scale with success.
1. Pinecone — Best Fully Managed Option

Pinecone is the incumbent fully managed vector database and the default answer to "I just want retrieval to work." Its serverless architecture (introduced in 2024 and matured since) separates storage and compute: vectors live in object storage, and query capacity scales independently. You create an index, upsert vectors, and never think about shards, replicas, or index tuning again. P99 latencies on well-sized indexes are consistently in the tens of milliseconds, and the API is deliberately minimal — there is almost nothing to misconfigure.

Strengths

Zero operational burden — no clusters, no upgrades, no 3 a.m. pages. Fast and consistent query latency out of the box. Mature SDKs (Python, TypeScript, Java, Go, Rust), namespaces for cheap multi-tenancy, integrated sparse-dense hybrid search (Pinecone Inference + pinecone-sparse-english), and a genuinely useful free tier for prototyping (one serverless index, enough capacity for a real POC). The serverless model means you pay near-zero when idle.

Weaknesses

Cost at scale is the big one: storage and read/write units add up fast past tens of millions of vectors, and many teams report bills that are 3–10× the equivalent self-hosted Qdrant or pgvector setup. It is closed source with a proprietary API, so vendor lock-in is real — migrating out means re-indexing everything. Filtering capabilities are more limited than Qdrant or Postgres, and you have no control over the underlying index parameters.

pinecone-client.ts
TypeScript
1import { Pinecone } from "@pinecone-database/pinecone";
2
3const pc = new Pinecone({ apiKey: process.env.PINECONE_API_KEY! });
4
5// Serverless index — no pods to size
6const index = pc.index("docs-rag");
7
8// Upsert with metadata for filtered retrieval
9await index.namespace("support-docs").upsert([
10 {
11 id: "chunk-001",
12 values: embedding, // number[] from your embedding model
13 metadata: { source: "refund-policy.md", category: "billing", updated: "2026-11" },
14 },
15]);
16
17// Query: vector similarity + metadata filter
18const results = await index.namespace("support-docs").query({
19 vector: queryEmbedding,
20 topK: 8,
21 filter: { category: { "$eq": "billing" } },
22 includeMetadata: true,
23});
🔥

pro tip

Use Pinecone namespaces for multi-tenant RAG instead of one index per customer — they are free, isolate data cleanly, and keep per-tenant queries fast. Reserve separate indexes only when tenants need different embedding dimensions or models.
2. Weaviate — Best for Hybrid Search & Knowledge Graphs

Weaviate is an open-source (BSD-3) vector database written in Go, available self-hosted via Docker/Kubernetes or as Weaviate Cloud (serverless and dedicated tiers). Its defining feature is that hybrid search is a first-class citizen: BM25 keyword search and vector search run natively in the same query engine, fused with tunable alpha weighting, so you don't have to bolt Elasticsearch onto the side. It also has a schema-and-class data model with cross-references between collections, which lets you model lightweight knowledge graphs — entities linked to chunks, documents linked to authors — and traverse them at query time via GraphQL or the v4 gRPC/REST clients.

Strengths

Best-in-class native hybrid search (BM25 + vector with result fusion). Modular architecture: built-in vectorizer modules (OpenAI, Cohere, Hugging Face, local models via text2vec-transformers), reranker modules, and generative modules that run the LLM call inside the query. Named vectors let one object carry multiple embeddings (e.g., title vs. body). Multi-tenancy is native and cheap. Cross-references enable graph-like traversal. Strong Kubernetes operator and replication for HA self-hosting.

Weaknesses

The schema-based model is more upfront design work than schemaless stores — you define classes and properties before inserting. Self-hosting at scale (with replication and multi-tenancy) is genuinely complex; budget real Kubernetes expertise. Memory usage on large HNSW indexes is significant (though PQ/SQ quantization helps). The GraphQL API confuses some teams, and the module ecosystem means behavior varies depending on which modules you enable.

ℹ

info

Weaviate's hybrid query with alpha: 0.5 (equal BM25 and vector weight) is a better default for production RAG than pure vector search — it rescues queries with rare keywords, product codes, and proper nouns that embeddings handle poorly. See our Hybrid Search guide for fusion strategies.
3. Qdrant — Best Self-Hosted Performance

Qdrant is an open-source (Apache 2.0) vector database written in Rust, and it shows: it is consistently among the fastest engines in independent ANN benchmarks, with low memory overhead and excellent CPU utilization. You can run it as a single binary or Docker container for development, scale to a sharded, replicated cluster for production, or use Qdrant Cloud (including a genuinely free 1GB cluster tier and a hybrid-cloud option that runs in your own VPC). Its API is a clean REST/gRPC interface with first-class clients in Python, TypeScript, Rust, Go, and Java.

The standout feature is payload filtering: Qdrant builds filterable indexes on metadata fields and — critically — applies filters duringHNSW graph traversal rather than post-filtering the results. Post-filtering is the silent recall killer in naive setups: if you ask for top-10 and 9 of the nearest neighbors fail your filter, you return 1 result. Qdrant's filtered traversal maintains high recall even with selective filters, which matters enormously for multi-tenant RAG, time-range filtering, and ACL-scoped search.

Strengths

Top-tier query performance and low resource usage (Rust). Best-in-class filtering with indexed payload fields and in-traversal filtering. Scalar/product quantization to cut memory 4–32× with small recall trade-offs. Sparse vectors (SPLADE-style) for hybrid search. Named vectors per point. Snapshots for backup/restore and painless migration between environments. Single-binary deployment makes self-hosting genuinely easy compared to Milvus. Permissive Apache 2.0 license.

Weaknesses

No native BM25 full-text search — hybrid search requires combining sparse + dense vectors yourself (or pairing with a keyword engine). Fewer built-in integrations (no native vectorizer modules like Weaviate — you bring your own embeddings). Cluster management, while simpler than Milvus, is still on you when self-hosting: sharding, replication, rolling upgrades, monitoring. The managed cloud is younger than Pinecone's offering.

qdrant-client.ts
TypeScript
1import { QdrantClient } from "@qdrant/js-client-rest";
2
3const client = new QdrantClient({ url: process.env.QDRANT_URL, apiKey: process.env.QDRANT_API_KEY });
4
5// Create a collection with on-disk payload index + HNSW tuning
6await client.createCollection("docs", {
7 vectors: { size: 1536, distance: "Cosine", on_disk: true },
8 hnsw_config: { m: 16, ef_construct: 100 },
9 quantization_config: { scalar: { type: "int8", quantile: 0.99, always_ram: true } },
10});
11
12await client.createPayloadIndex("docs", {
13 field_name: "tenant_id",
14 field_schema: "keyword",
15});
16
17// Query with in-traversal filtering — recall stays high even with selective filters
18const hits = await client.query("docs", {
19 query: queryEmbedding, // number[]
20 limit: 8,
21 filter: {
22 must: [
23 { key: "tenant_id", match: { value: "acme-corp" } },
24 { key: "updated_at", range: { gte: "2026-01-01" } },
25 ],
26 },
27 with_payload: true,
28});
🔥

pro tip

Enable scalar quantization (int8) from day one on Qdrant — it cuts RAM usage ~4× with typically under 1% recall loss, and the rescoring step (original vectors re-rank the quantized shortlist) recovers most of the difference. For most RAG workloads this is free capacity.
4. pgvector — Best If You Already Run Postgres

pgvector is a PostgreSQL extension that adds a vector column type and approximate-nearest-neighbor indexes (IVFFlat originally, and HNSW since 0.5.0, with iterative index scans added later to fix filtered-search recall). Its superpower is not raw ANN performance — dedicated engines beat it there — but that it is just Postgres. Your embeddings live in the same database as your users, documents, and permissions. Retrieval becomes a SQL query: vector similarity joined with relational filters, full-text search, and business logic in one round trip, with transactions, backups, and tooling you already have.

This eliminates an entire class of distributed-systems pain: no keeping a separate vector store in sync with your source of truth, no dual-write consistency bugs, no orphaned embeddings after deletions. Operationally it is nearly free if you already run Postgres well — and every managed Postgres (RDS, Cloud SQL, Azure, Supabase, Neon, Crunchy) supports it.

Strengths

Zero new infrastructure — one less system to operate, monitor, back up, and secure. Real joins: combine vector similarity with arbitrary SQL (permissions, date ranges, aggregations) in a single query. ACID transactions keep embeddings and source data consistent. Mature ecosystem: every Postgres tool, ORM, and managed service works. Combine with tsvector or the pg_search extension (BM25) for credible hybrid search. Lowest total cost for small-to-medium workloads.

Weaknesses

Scale limits are real: HNSW indexes live in the buffer cache, so performance depends on RAM, and build times get painful past tens of millions of vectors. Throughput (QPS) and recall under heavy concurrent load trail purpose-built engines. No native sparse vectors or built-in reranking. High-dimensional vectors (>2,000 dims) need workarounds (halfvec supports up to 4,000). You inherit Postgres scaling problems — read replicas help queries but writes and index builds are single-primary.

pgvector-setup.sql
SQL
1-- Enable the extension and store embeddings next to your documents
2CREATE EXTENSION IF NOT EXISTS vector;
3
4CREATE TABLE document_chunks (
5 id BIGSERIAL PRIMARY KEY,
6 document_id BIGINT REFERENCES documents(id) ON DELETE CASCADE,
7 content TEXT NOT NULL,
8 embedding vector(1536) NOT NULL, -- text-embedding-3-small dimensions
9 tenant_id UUID NOT NULL,
10 created_at TIMESTAMPTZ DEFAULT now()
11);
12
13-- HNSW index (cosine distance) — tune m and ef_construction for recall
14CREATE INDEX ON document_chunks USING hnsw (embedding vector_cosine_ops)
15 WITH (m = 16, ef_construction = 64);
16
17-- Production RAG query: similarity + ACL filter + recency, one round trip
18SELECT c.id, c.content, c.embedding <=> ${queryEmbedding}::vector AS distance
19FROM document_chunks c
20JOIN documents d ON d.id = c.document_id
21WHERE c.tenant_id = ${tenantId}
22 AND d.status = 'published'
23ORDER BY c.embedding <=> ${queryEmbedding}::vector
24LIMIT 8;
25
26-- Hybrid: combine with Postgres full-text search
27SELECT c.id, c.content,
28 (c.embedding <=> ${queryEmbedding}::vector) AS vector_distance,
29 ts_rank_cd(to_tsvector('english', c.content), plainto_tsquery(${queryText})) AS text_rank
30FROM document_chunks c
31WHERE c.tenant_id = ${tenantId}
32ORDER BY (c.embedding <=> ${queryEmbedding}::vector) - 0.05 * ts_rank_cd(to_tsvector('english', c.content), plainto_tsquery(${queryText}))
33LIMIT 8;
✓

best practice

Always set hnsw.ef_search (e.g., SET hnsw.ef_search = 100;) higher than your LIMIT, and when filtering, use SET hnsw.iterative_scan = strict_order; (pgvector 0.8+) so the scan keeps walking the graph until it finds enough rows that pass your WHERE clause — otherwise filtered queries silently return fewer results than requested.
5. Chroma & Milvus — The Two Extremes

Chroma is the dev-first embedding store: an embedded library (or single-node server) with a three-line API — create collection, add documents, query. It handles embedding generation for you if you want, stores metadata, and runs in-process in Python or JavaScript notebooks. It is the fastest path from zero to a working RAG prototype, and it is what a large share of LangChain/LlamaIndex tutorials use. Its limits are equally clear: the core is single-node, filtering is basic, and production features (auth, replication, sharding) have historically been thin — Chroma Cloud now covers the managed middle ground, but for heavy production loads most teams graduate to Qdrant, Weaviate, or pgvector.

Milvus is the opposite end: a distributed, cloud-native vector database built for enterprise scale. Its architecture separates storage, query nodes, index nodes, and data nodes (coordinated via etcd and message queues), letting you scale each independently across a Kubernetes cluster. It supports a dozen index types (HNSW, IVF_FLAT, DiskANN, GPU-accelerated indexes like CAGRA), sparse vectors, a built-in full-text search analyzer, partition-level isolation for massive multi-tenancy, and billion-scale deployments proven at companies like eBay and Shopee. Zilliz Cloud is the managed offering from the creators.

Chroma — When to Use

Local development, notebooks, hackathons, demos, and small internal tools (under ~1M vectors, single writer). The DX is unmatched — if your prototype needs a vector store today, use Chroma and design your retrieval layer behind an interface so you can swap it later.

Milvus — When to Use

100M+ vectors, high sustained QPS, GPU indexing, or compliance-driven on-prem deployments with a platform team to run Kubernetes. The operational complexity is the price: a production Milvus cluster has many moving parts, and you should not self-host it without dedicated infra ownership. Use Zilliz Cloud if you want Milvus scale without the cluster-admin job.

📝

note

The Chroma → production-database migration is a well-worn path: abstract your retrieval behind a small interface (search(query, filters, k) and upsert(chunks)) from day one, keep your raw documents in a durable store, and swapping backends becomes a re-indexing job, not a rewrite.
How to Choose

Four questions settle most vector database decisions: are you prototyping or productionizing, do you want to self-host or pay for managed, what scale are you realistically heading to, and what is your true budget (dollars and engineer-hours)?

Prototyping, learning, or validating a RAG idea

→ Chroma (embedded, zero setup) or pgvector if your app already has Postgres. Optimize for iteration speed; put retrieval behind an interface so the backend can change.

Production RAG, small-to-mid scale (under ~10M vectors), team already runs Postgres

→ pgvector — one less system to operate, SQL joins for filters and permissions, and the lowest total cost. Move on only when benchmarks on YOUR data show you hitting its limits.

Production RAG, want zero operations, budget is flexible

→ Pinecone serverless — the least to operate, great latency, generous free tier to start. Model the cost at 10× your current scale before committing.

Production RAG, self-hosted or cost-sensitive, heavy metadata filtering / multi-tenancy

→ Qdrant — best self-host DX, excellent filtered recall, quantization keeps RAM low. Run it in Docker/K8s or start on the free cloud tier.

Search quality is the product (e-commerce, support search, legal/medical retrieval)

→ Weaviate — native BM25 + vector hybrid with fusion, reranker modules, and multi-vector support. Hybrid search typically lifts retrieval quality more than any model tweak.

Billion-scale, GPU indexing, dedicated platform team

→ Milvus (self-hosted K8s) or Zilliz Cloud. Only take on this complexity when the scale genuinely demands it.

Data must stay in your VPC / on-prem for compliance

→ Qdrant or Milvus self-hosted, Weaviate self-hosted, or pgvector on your own Postgres. Avoid managed-only services without a hybrid-cloud option.

✓

best practice

Whatever you choose, benchmark with your own data: your embedding dimensions, your metadata selectivity, your query patterns. Public ANN benchmarks use unfiltered queries on clean datasets — filtered, multi-tenant, real-world workloads rank these databases very differently.
Migration & Lock-in Considerations

Vector databases are sticky. Migrating means re-exporting or re-computing every embedding, rebuilding indexes, and revalidating retrieval quality — for a large corpus that can be days of compute and weeks of validation. Design for eventual migration even if you never do it:

◆Keep raw documents + chunk text in a durable store (S3, Postgres) as the source of truth — the vector DB should be a rebuildable derived index, never the only copy
◆Abstract retrieval behind an internal interface (search / upsert / delete) — application code should never import vendor SDK types
◆Record the exact embedding model + version with every vector; switching models means re-embedding everything, and mixed-model indexes silently degrade recall
◆Store enough metadata to rebuild filters and namespaces without re-parsing source documents
◆Prefer engines with snapshot/export formats (Qdrant snapshots, Milvus bulkinsert, pg_dump) — verify you can actually restore one before you need it
◆Beware pricing-model lock-in, not just API lock-in: usage-based managed services can become the reason you can't scale a successful product
📝

note

The cheapest migration insurance is the embedding model: vectors are not portable across models, but documents are. If you can re-chunk and re-embed from source at any time, you are never truly locked in — you just pay the re-indexing cost.
Best Practices for Production RAG Retrieval

Tune the index, measure recall

HNSW parameters (m, ef_construction / ef_search) trade build time, memory, and recall. Defaults are conservative; measure recall@10 against brute-force ground truth on a sample of YOUR data, then raise ef_search until recall flattens. A 2% recall gain often beats a model upgrade.

Index your filter fields

Unindexed metadata filters are the #1 cause of slow queries and poor recall. In Qdrant create payload indexes; in pgvector ensure filter columns have B-tree indexes and enable iterative scans; in Weaviate mark filterable properties. Filtered traversal beats post-filtering every time.

Use hybrid search for real user queries

Pure vector search fails on SKUs, error codes, names, and rare terms. Combine BM25/keyword with dense vectors (Weaviate hybrid, Qdrant sparse+dense, pgvector + tsvector/pg_search, Pinecone sparse-dense) and fuse results (RRF or weighted). Expect a meaningful lift in retrieval quality on real query logs.

Cache embeddings aggressively

Embedding API calls cost money and add latency on your critical path. Cache query embeddings (Redis keyed by normalized query hash), cache document embeddings by content hash so re-chunking unchanged docs is free, and batch embedding requests during indexing.

Namespace / partition multi-tenant data

Isolate tenants with namespaces (Pinecone), multi-tenancy (Weaviate), partitions (Milvus), or row-level filters with indexed tenant_id (Qdrant/pgvector). Per-tenant indexes don't scale to thousands of tenants; a single shared index with enforced filters usually does.

Monitor retrieval quality, not just latency

Track recall proxies (click-through on retrieved chunks, LLM judge scores on groundedness, % of queries with zero high-score results). Vector indexes degrade silently as data drifts — alerting on p99 latency alone won't catch a retrieval quality regression.

🔥

pro tip

Chunking strategy affects retrieval quality more than database choice. Before switching vector databases to fix bad retrieval, try smaller chunks with overlap, adding document titles/headers to each chunk's embedded text, and reranking the top 20 results down to 5. See the Chunking Strategies guide.
$Blueprint — Engineering Documentation·Section ID: AI-TOOLS-BEST·Revision: 1.0

Community

Get help on Slack, Discord or VIP

Stuck on a guide? Join the community and ask.