Agent Retrieval
Vector Databases
Pinecone, Qdrant, Weaviate, pgvector, and when to pick each - condensed current practice
Last verified 2026-10-29
Vector databases store and search high-dimensional via approximate nearest-neighbor algorithms (HNSW, DiskANN, and similar). Choose by operations burden, filtering needs, scale, and whether you already operate Postgres.
Selection matrix
Verify current pricing before a procurement decision - pricing changes faster than the underlying algorithms. The Pinecone figures are Standard-plan rates from pinecone.io/pricing (accessed 2026-10-29), not universal prices; Enterprise lists higher unit rates and a $500 minimum. A vendor benchmark from Timescale, which makes pgvectorscale, reported pgvector + pgvectorscale beating Pinecone's s1 tier on both p95 latency and self-hosted cost at 50M vectors. It is vendor-authored, not independent. Treat any single benchmark as a starting point for your own load test, and note its date, hardware and Pinecone tier.
Pinecone serverless
Managed, auto-scaling, with native hybrid search and reranking. Namespace per tenant for multi-tenant isolation:
const results = await pinecone
.index("main")
.namespace("tenant-1")
.query({ vector: embedding, topK: 10, filter: { source: { $eq: "legal" } } });pgvector + pgvectorscale
The default choice for teams already operating Postgres. Combine an HNSW or DiskANN vector index with Postgres full-text search for hybrid retrieval:
CREATE EXTENSION IF NOT EXISTS vector;
CREATE EXTENSION IF NOT EXISTS pgvectorscale;
CREATE INDEX ON documents USING diskann (embedding);
CREATE INDEX fts_idx ON documents USING GIN (to_tsvector('english', text));Turbopuffer
An object-storage-backed engine best treated as a first-stage retrieval layer: narrow a large namespace to a small candidate set, then rank, rerank, and assemble context in application code. Strong fit for corpora that may grow into the billions of documents, or where not every tenant needs to stay hot. Weak fit when you need joins, transactions, or consistently low latency without cache planning.
Migration checklist
- Export vectors and metadata; map schema (dims, distance metric, quantization) to the new store.
- Batch import with retry logic; run shadow traffic before cutover.
- Verify p95/p99 latency and cost on the new store before decommissioning the old one.