Step 05 of 22
Vector databases
Store embeddings and find the nearest ones in milliseconds. This is the memory your application searches on every question. Cost, filtering and operations matter more than raw speed.
How to choose
- Already on Postgres with modest volume: pgvector keeps one database to run.
- Heavy filtering, hybrid search or large scale: a dedicated engine such as Qdrant, Weaviate or Milvus.
- No servers to manage: a hosted service such as Pinecone, at a monthly cost.
What to look for
The questions that separate the options, in order of how much they matter.
01
Filtered search quality
Real queries are almost always filtered by permissions, tenant ID, date or document type, and the results must stay relevant once the filter applies. Engines that filter after the vector search can return three results when you asked for ten, or quietly miss the best match. Qdrant adds graph edges for indexed payload fields so filtered traversal stays connected; pgvector needs iterative scans (0.8.0 and later) or partial indexes. Test with your most selective real filter, not an unfiltered demo.
02
Hybrid search: vectors plus keywords
Vectors miss names, identifiers and exact terms such as product codes and error messages; keyword search (BM25) catches them. Hybrid search runs both and blends the scores. Weaviate, Qdrant, Milvus, LanceDB and turbopuffer do it in one engine; Pinecone offers sparse-dense indexes or a full-text filter; with pgvector you combine Postgres full-text search in SQL yourself. Check whether you can tune the weighting or use reciprocal rank fusion.
03
Recall against latency
Approximate search trades accuracy for speed: recall is the share of the true nearest neighbours it recovers, and you want it at the response time you need, not at any speed. HNSW, a layered graph, gives high recall but wants the index in RAM; IVF clusters vectors and searches the nearest clusters; disk-based indexes (Milvus's DiskANN, Weaviate's HFresh, turbopuffer's and Chroma Cloud's SPFresh or SPANN) keep most data on SSD or object storage. Quantisation shrinks vectors 4 to 32 times, usually with a rescoring step to recover accuracy. On benchmarks: ANN-Benchmarks, run by academics Martin Aumueller, Erik Bernhardsson and Alec Faitfull, plots recall against queries per second for single queries on small public datasets; it compares index algorithms, not databases, and ignores filtering, writes and operations. VectorDBBench is maintained by Zilliz, the company behind Milvus, and adds p99 latency, filtered and streaming cases and cost per query. Compare QPS and p99 at the same recall, and treat any vendor's benchmark of its own product as a claim to reproduce.
04
Workload capacity
Size the job before choosing: expected vector count, dimensions, concurrent queries and how often data changes. Vectors times dimensions times bytes gives the raw memory an in-memory index needs. Encore, which sells Postgres hosting, puts pgvector level with Pinecone below about five million vectors and in need of careful tuning beyond that; Chroma suits prototypes to tens of millions; LanceDB's FAQ says the open-source library handles millions of vectors on one node; Milvus and turbopuffer are built for billions.
05
Updates and deletion
Check how quickly inserts, edits and deletes become searchable. Some indexes absorb new data immediately, others buffer writes or need a rebuild; turbopuffer writes go to object storage at 248 ms p90 for a 512 KB upsert. Deletion matters for compliance: when a user withdraws a document, it must stop appearing in results promptly, and per-tenant indexes make deleting a whole customer simple.
06
Security and isolation
Look for access control, encryption at rest and in transit, and tenant isolation that holds up. If permissions are enforced by a metadata filter, that filter must be reliable on every query, which is another reason to test filtered recall. turbopuffer offers unlimited namespaces and customer-managed keys on enterprise; Qdrant can mark a field as the tenant key; Weaviate has native multi-tenancy, though its namespaces feature now needs a paid licence; in pgvector you partition by tenant or use row-level security.
07
Operations
Backups, recovery, monitoring and scaling often cost more than the licence. pgvector adds nothing new to run if you already have Postgres. Qdrant ships as one binary; Milvus at scale needs Kubernetes and a platform team. Chroma and LanceDB run inside your process. Pinecone and turbopuffer are managed only, with bring-your-own-cloud for enterprise buyers. Licence decides your exit: Apache 2.0 (Qdrant, Milvus, Chroma, LanceDB) and the PostgreSQL licence (pgvector) let you self-host freely, Weaviate is open core since September 2026, and the proprietary services mean exporting and re-indexing to leave.
08
Total cost
Count indexes, metadata storage, queries and updates, and whether you need a separate database at all. Managed services bill in different units: Pinecone by read units, write units and stored GB, Weaviate Cloud by stored vector dimensions, turbopuffer by usage above a monthly minimum, Chroma Cloud by data written, stored and queried. A read-heavy chatbot and a write-heavy indexing pipeline can rank the same vendors in opposite orders, so model your own volumes on each calculator and against an instance you would run yourself.
Which approach for which data
Different content needs different models. Many systems use more than one and route by data type.
| Your data | Approach | Start with |
|---|---|---|
| Already on Postgres, under about 10 million vectors | Add vectors to the database you run; filters are SQL and there is nothing new to operate. | pgvector |
| Multi-tenant SaaS with per-user permissions | Choose strong filtered search or one namespace per tenant, and test permission filters for recall. | Qdrant, turbopuffer, Weaviate |
| Heavy keyword needs: names, codes, identifiers | Pick an engine with built-in hybrid BM25 and vector search. | Weaviate, Qdrant, Milvus |
| Hundreds of millions to billions of vectors | Use a distributed or object-storage engine built for that scale. | Milvus, turbopuffer |
| No ops team, unpredictable traffic | Use a fully managed service and cap spend with plan limits. | Pinecone, turbopuffer |
| On-device, notebooks or local agents | Run an embedded library inside the process, with no server. | Chroma, LanceDB |
| Multimodal data in a data lake | Keep embeddings beside the raw files and search them in place. | LanceDB, Milvus |
How to test it on your own data
- Build 50 to 100 representative questions and mark the correct passages for each.
- Include hard cases: abbreviations, exact IDs and codes, ambiguous questions and permission-restricted documents.
- Measure Recall@k: how often the correct passages appear in the top k results.
- Measure ranking quality, such as NDCG@10 or MRR, so the right passage is near the top, not just present.
- Measure p95 latency under realistic concurrency with your real filters switched on.
- Add total cost: indexing, storage, queries and updates at your expected volume.
- Check final answer quality, and evaluate the whole pipeline (embedding model, database, reranker and LLM) together, not the database alone.
How the options differ
Two choices are easy to confuse. The embedding model decides what counts as similar; the vector database decides how efficiently you store, filter and retrieve those embeddings. Evaluate them separately, then test them together on your own data. And before adding a new system, check the database you already run: if its vector search meets your retrieval and filtering needs, you may not need another one.
Vector databases fall into five families. A Postgres extension (pgvector) puts embeddings in an ordinary table, so filters are SQL, data stays in the same transactions and backups, and there is nothing new to run; it is the default for a few million vectors. Dedicated engines (Qdrant, Weaviate, Milvus) are separate servers built only for search: they handle heavy filtering, hybrid keyword-and-vector search, quantisation and larger scale, at the price of another system to operate. Qdrant is the simplest to run, Weaviate leads on hybrid search and built-in embedding, and Milvus is designed to spread billions of vectors across many machines.
Embedded libraries (Chroma, LanceDB) run inside your application like SQLite, with no server: ideal for prototypes, notebooks, local apps and agents, weaker under many concurrent users. Fully managed services (Pinecone, turbopuffer) remove operations entirely and bill by usage; Pinecone keeps indexes hot, while turbopuffer keeps data in object storage, which is cheaper at huge scale but slower on cold queries. Search engines with vector support (Elasticsearch, OpenSearch) and graph databases such as Neo4j also store vectors, which makes sense if you already run them for keyword search or relationships, but they are not covered here.
8 tools, compared
Ranked by our rating. Open any review for sources, prices and the full verdict.
| Tool | Rating | Our verdict | Best for | Price |
|---|---|---|---|---|
| Qdrantrepo | 4.7/5 | Filtered vector search done properly makes Qdrant the open-source database to beat for production RAG, as long as someone locks down a server that ships open. | Teams running production RAG or search that need fast filtered vector queries. | Free and open source under the Apache 2.0 licence. Qdrant Cloud has a free 1 GB cluster, then usage-based billing; Premium, Hybrid and Private Cloud are priced by sales. |
| pgvectorrepo | 4.6/5 | For most teams already on Postgres, a dedicated vector database is extra infrastructure that pgvector makes unnecessary. | Teams already on Postgres building RAG or semantic search over a few million vectors. | Free and open source under the PostgreSQL License. The only cost is the Postgres instance you already run, or a larger one. |
| Milvusrepo | 4.4/5 | Built for billions of vectors and priced in operational effort; below a few hundred million, it is more database than most teams need. | Platform teams running vector search at hundreds of millions to billions of vectors. | Free and open source under Apache 2.0. Zilliz Cloud is the managed service, with a free tier; published paid prices vary by source, so use Zilliz's calculator. |
| Pineconetool | 4.2/5 | Pinecone removes almost all the operations work from vector search and charges for it on every read, which suits a small team far better than a busy production index. | Teams without database operations staff who want managed vector search and accept usage-based fees. | Free Starter (2 GB, 1M read units/month, AWS us-east-1 only). Builder $20/month flat with hard quotas. Standard $50/month minimum, then $0.33/GB/month storage, $16–$18 per 1M read units, $4–$4.50 per 1M write units. Enterprise $500/month minimum. |
| Weaviaterepo | 4.2/5 | Hybrid keyword-and-vector search is still Weaviate's best argument, but its newest operational features now sit behind a licence key. | Teams building search or RAG where exact keywords and semantic similarity both matter. | Core is BSD-3-Clause; some enterprise features need a paid licence key. Weaviate Cloud: Free (100,000 objects), Flex pay-as-you-go with a $45/month minimum, Premium from $400/month on a prepaid contract. |
| turbopuffertool | 4.2/5 | turbopuffer is the vector database to beat for products with millions of separate, mostly idle indexes, as long as the first query on a cold one may take a second. | Teams building multi-tenant AI products with many separate indexes or billions of vectors who want no servers to run. | Launch $16/month minimum usage; Scale $256/month minimum (SSO, HIPAA BAA); Enterprise from $4,096/month with a 35% usage premium (BYOC, single-tenant, 99.95% SLA). Storage up to $0.33/GB, writes up to $2/GB, queries up to $1/PB queried. No free tier. |
| Chromarepo | 4.1/5 | Quick to embed and cheap to host for read-heavy RAG, though nothing has been tagged since May 2026. | Developers prototyping RAG or running small to mid-size vector search. | Free and open source under Apache 2.0. Chroma Cloud: Starter $0 plus usage with $5 credits; Team $250/month plus usage; Enterprise custom. Writes $2.50/GiB, storage $0.33/GiB-month. |
| LanceDBrepo | 4.0/5 | When your embeddings live next to images, video or training data, LanceDB removes the separate database entirely, though busy multi-user search is not what the free library is built for. | Teams working with multimodal or training data who want vector search without running a server. | Free and open source under Apache 2.0. LanceDB Enterprise is sold on annual commitments; AWS Marketplace lists a $60,000 12-month commitment, with private offers by quote. |
Side by side
The specifications that matter for this step. Checked 2026-10-23; confirm on the vendor’s site before you commit.
| Tool | Type | Licence | Index types | Hybrid search | Hosting options | Sweet-spot scale |
|---|---|---|---|---|---|---|
| Qdrant | Dedicated engine (Rust) | Apache 2.0 | HNSW, sparse inverted; TurboQuant/BQ/PQ | Yes, sparse + dense in one query | Self-host, Qdrant Cloud, Edge | Millions to hundreds of millions |
| pgvector | Postgres extension | PostgreSQL Licence | HNSW, IVFFlat; half, binary, sparse | Via Postgres full-text in SQL | Any Postgres, most managed services | A few million vectors (about 5M per Encore) |
| Milvus | Distributed engine (Go/C++) | Apache 2.0 | HNSW, IVF, DiskANN, SCANN, flat | Yes, BM25 + sparse + dense | Self-host (Kubernetes), Zilliz Cloud | Hundreds of millions to billions |
| Pinecone | Fully managed service | Proprietary | Not published | Sparse-dense or full-text filter | Serverless; BYOC on Enterprise | Any; cost grows with reads |
| Weaviate | Dedicated engine (Go) | BSD-3 core + commercial features | HNSW, flat, dynamic, HFresh | Yes, BM25 + vector, tunable | Self-host, Weaviate Cloud | Not published |
| turbopuffer | Managed, object-storage based | Proprietary | SPFresh + RaBitQ binary quantisation | Yes, BM25 + vector | Multi-tenant, single-tenant, BYOC | Billions of vectors, many tenants |
| Chroma | Embedded library or server | Apache 2.0 | HNSW (single node), SPANN (Cloud) | Full-text alongside vectors | In-process, server, Chroma Cloud | Prototypes to tens of millions |
| LanceDB | Embedded library (Lance files) | Apache 2.0 | IVF (PQ/SQ/RQ), IVF_HNSW | BM25 full-text + vector | In-process on disk or S3; Enterprise | Local apps; millions of vectors per node |
Connect it to your agent
MCP servers that let assistants like Claude, ChatGPT and Cursor use these tools directly.
Where this stage fits
- Chat with your documents: we would start with Qdrant.
- Customer support agent: we would start with pgvector.
- Coding agent: we would start with LanceDB.
- Research & knowledge graph: we would start with Weaviate.
- Assistant with long-term memory: we would start with Qdrant.
- Image generation pipeline: we would start with Qdrant.
- Video production: we would start with LanceDB.
- Voice agent: we would start with pgvector.
- Private, on-device AI: we would start with LanceDB, Chroma.
Sources for this guide
- ANN-Benchmarks
- VectorDBBench (Zilliz) on GitHub
- VectorDBBench leaderboard
- Qdrant docs: indexing
- Qdrant docs: quantization
- Weaviate docs: vector indexes
- Milvus docs: index types
- Milvus docs: DiskANN
- Chroma docs: collection configuration
- Chroma docs: architecture
- LanceDB docs: indexing
- Pinecone docs: hybrid search
- pgvector README
- turbopuffer: ANN v3
- LanceDB OSS FAQ
- pgvector vs Pinecone (Encore)