Skip to content

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.

REFUNDSSHIPPINGACCOUNTS?
The question, the search ring, and the 3 nearest passages it returnsPins: stored passages, placed by meaningTopics: passages about the same thing land close togetherAn embedding model turns every passage, and then every question, into a point; similar meanings land close together. The vector database's job is to find the points nearest the question, fast, across millions of them, without checking each one. Note the match is by meaning: “can I get my money back?” finds refund passages even if they never use those words. Positions are illustrative and drawn in two dimensions.

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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.

Approaches by data type
Your dataApproachStart with
Already on Postgres, under about 10 million vectorsAdd vectors to the database you run; filters are SQL and there is nothing new to operate.pgvector
Multi-tenant SaaS with per-user permissionsChoose strong filtered search or one namespace per tenant, and test permission filters for recall.Qdrant, turbopuffer, Weaviate
Heavy keyword needs: names, codes, identifiersPick an engine with built-in hybrid BM25 and vector search.Weaviate, Qdrant, Milvus
Hundreds of millions to billions of vectorsUse a distributed or object-storage engine built for that scale.Milvus, turbopuffer
No ops team, unpredictable trafficUse a fully managed service and cap spend with plan limits.Pinecone, turbopuffer
On-device, notebooks or local agentsRun an embedded library inside the process, with no server.Chroma, LanceDB
Multimodal data in a data lakeKeep embeddings beside the raw files and search them in place.LanceDB, Milvus

How to test it on your own data

  1. Build 50 to 100 representative questions and mark the correct passages for each.
  2. Include hard cases: abbreviations, exact IDs and codes, ambiguous questions and permission-restricted documents.
  3. Measure Recall@k: how often the correct passages appear in the top k results.
  4. Measure ranking quality, such as NDCG@10 or MRR, so the right passage is near the top, not just present.
  5. Measure p95 latency under realistic concurrency with your real filters switched on.
  6. Add total cost: indexing, storage, queries and updates at your expected volume.
  7. 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.

Vector databases tools compared
ToolRatingOur verdictBest forPrice
Qdrantrepo4.7/5Filtered 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.
pgvectorrepo4.6/5For 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.
Milvusrepo4.4/5Built 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.
Pineconetool4.2/5Pinecone 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.
Weaviaterepo4.2/5Hybrid 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.
turbopuffertool4.2/5turbopuffer 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.
Chromarepo4.1/5Quick 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.
LanceDBrepo4.0/5When 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.

Vector databases: specifications side by side
ToolTypeLicenceIndex typesHybrid searchHosting optionsSweet-spot scale
QdrantDedicated engine (Rust)Apache 2.0HNSW, sparse inverted; TurboQuant/BQ/PQYes, sparse + dense in one querySelf-host, Qdrant Cloud, EdgeMillions to hundreds of millions
pgvectorPostgres extensionPostgreSQL LicenceHNSW, IVFFlat; half, binary, sparseVia Postgres full-text in SQLAny Postgres, most managed servicesA few million vectors (about 5M per Encore)
MilvusDistributed engine (Go/C++)Apache 2.0HNSW, IVF, DiskANN, SCANN, flatYes, BM25 + sparse + denseSelf-host (Kubernetes), Zilliz CloudHundreds of millions to billions
PineconeFully managed serviceProprietaryNot publishedSparse-dense or full-text filterServerless; BYOC on EnterpriseAny; cost grows with reads
WeaviateDedicated engine (Go)BSD-3 core + commercial featuresHNSW, flat, dynamic, HFreshYes, BM25 + vector, tunableSelf-host, Weaviate CloudNot published
turbopufferManaged, object-storage basedProprietarySPFresh + RaBitQ binary quantisationYes, BM25 + vectorMulti-tenant, single-tenant, BYOCBillions of vectors, many tenants
ChromaEmbedded library or serverApache 2.0HNSW (single node), SPANN (Cloud)Full-text alongside vectorsIn-process, server, Chroma CloudPrototypes to tens of millions
LanceDBEmbedded library (Lance files)Apache 2.0IVF (PQ/SQ/RQ), IVF_HNSWBM25 full-text + vectorIn-process on disk or S3; EnterpriseLocal 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

Sources for this guide