Open-Source Vector Databases Compared: Which One Fits Your RAG System?

Open-Source Vector Databases Compared: Which One Fits Your RAG System?

Open-source vector databases store embedding vectors and retrieve the ones most similar to a query, giving retrieval-augmented generation systems a memory they can search. The leading options, Qdrant, Milvus, Weaviate, Chroma and pgvector, are all free to self-host, yet they differ sharply in scale, search features and operational burden. The right choice depends on your data volume, your team and the retrieval behaviour your application needs.

This guide compares the main open-source engines on the factors that actually decide a project: scale, hybrid search, metadata filtering, multi-tenancy, licensing and day-to-day operations. There is no single winner, but there is usually a clear best fit once you know your constraints.

Key takeaways

  • Qdrant, Milvus, Weaviate, Chroma and pgvector are all open source, but they are built for different scales: Chroma and pgvector suit small to medium workloads, while Milvus targets billion-vector collections.
  • Hybrid search, combining keyword and vector retrieval, is a standard feature on most dedicated engines and a key quality lever for RAG.
  • The database you already run often wins: teams on Postgres should try pgvector before adopting a new system.
  • Best for: teams that want a searchable vector store without licence fees or vendor lock-in, and are willing to operate the system themselves.

What is an open-source vector database?

A vector database stores high-dimensional vectors alongside the metadata that describes them, and answers nearest-neighbour queries quickly. In a RAG system, document chunks are embedded, stored in the database, and retrieved at query time so a language model can answer from your own content rather than only from its training data.

Open-source vector databases add two things on top of a search library such as Faiss: persistence and service behaviour. They keep data safe across restarts, serve queries over a network, filter by metadata, handle concurrent writes and, in the larger engines, scale across machines. The source code is available, the core is free to self-host, and most offer a paid managed cloud for teams that would rather not operate the system.

Licences differ, and the differences are worth a glance before you commit. Qdrant, Milvus and Chroma use the Apache 2.0 licence. Weaviate’s core uses the BSD 3-Clause licence. pgvector is an extension for PostgreSQL and carries the PostgreSQL licence. These are all permissive licences, but some products keep certain enterprise features outside the open-source core, so check which features sit behind a commercial tier.

The leading open-source vector databases

Five engines cover most real projects. Each has a distinct character, and the differences show up quickly once you move past a prototype.

Qdrant is a dedicated vector database written in Rust and released under Apache 2.0. It is known for fast, memory-efficient search and for payload filtering that runs inside the search itself, which keeps filtered queries quick. It supports hybrid search and scales horizontally through sharding. Best for: teams that want a fast open-source engine with strong filtering and no feature gating in the self-hosted version.

Milvus is a distributed vector database, also Apache 2.0, designed for very large collections. It separates storage, indexing and query handling so each part can scale independently, and it offers several multi-tenancy models with role-based access control. Best for: billion-scale collections and teams that need distributed scale from the start.

Weaviate is a dedicated engine with a BSD 3-Clause core and some of the most mature hybrid search in the field, combining BM25 keyword search with vector search in a single pass. It also has a strong multi-tenancy model that isolates each tenant on its own shard. Best for: multi-tenant software and applications where hybrid search quality matters most.

Chroma is a developer-friendly vector database under Apache 2.0, built to make prototyping easy. It runs embedded inside an application, as a self-hosted server or in its managed cloud, and its own documentation places single-node use at small to medium workloads. Best for: prototypes and small to medium collections where simplicity matters more than scale.

pgvector is not a standalone database at all. It is an extension that adds vector storage and similarity search to PostgreSQL, so it inherits Postgres features such as transactions, backups, access control and full-text search. Best for: teams already running Postgres who want vectors without a second database.

Server rack with green status lights in a bright data centre
A vector database is a service you operate, not just a search library: persistence, filtering and scaling all come with the choice.

Open-source vector databases compared

The table below summarises the main trade-offs. Treat it as a starting point for shortlisting, not as a final ranking: the right answer depends on your embeddings, your queries and your operational appetite.

Database Type Licence Scale Hybrid search Best for
Qdrant Dedicated, Rust Apache 2.0 Horizontal via sharding Yes Fast search with strong filtering
Milvus Dedicated, distributed Apache 2.0 Billions of vectors Yes Billion-scale, multi-tenant RAG
Weaviate Dedicated BSD 3-Clause core Hundreds of millions Yes, BM25 plus vector Hybrid search, multi-tenant SaaS
Chroma Dedicated, developer-first Apache 2.0 Small to medium, single node Yes Prototyping and getting started
pgvector Postgres extension PostgreSQL licence RAM-bound, tens of millions Via Postgres full-text search Teams already on Postgres

One independent benchmark of seven open-source engines, run on identical embeddings with every engine tuned to the same recall level, found large differences in speed and memory between engines, with a roughly tenfold spread in single-thread throughput. Those numbers come from one workload and one hardware setup, so read them as evidence that engines differ, not as a ranking that will hold for your data. Measure the shortlisted candidates on your own embeddings before deciding.

How to choose: the factors that matter

Scale and growth

Start with an honest estimate of your collection. A prototype with a hundred thousand chunks behaves nothing like a production system with a hundred million. Chroma and pgvector are comfortable in the small to medium range, while Milvus is built for the far end. Qdrant and Weaviate sit in between and scale further through sharding.

Growth matters as much as current size. An engine that is easy at one million vectors can become painful at fifty million if its scaling model does not match your workload. Ask how each candidate scales: by adding machines, by adding memory, or not at all.

Hybrid search and filtering

Vector similarity alone misses passages that keyword search would catch, and vice versa. Hybrid search combines the two, and it is one of the biggest quality levers in a RAG system. Most dedicated engines support it natively, while pgvector pairs vector search with Postgres full-text search. Our guide to hybrid search in RAG explains how the combination works and why it usually beats either method alone.

Metadata filtering matters just as much. Real applications filter by tenant, by document type, by date or by permission, and a filter applied after retrieval wastes work and weakens results. Check that your shortlist applies filters during search, and test filtered queries specifically rather than assuming they perform like unfiltered ones.

Operations and total cost

Open source does not mean free to run. Self-hosting means backups, upgrades, monitoring, capacity planning and incident response, and a distributed engine such as Milvus demands more of all of them than a single Postgres extension. Managed clouds remove much of that burden for a monthly fee, and every major engine offers one.

Be honest about your team’s operational appetite. A small team with no database operations experience will get further, faster, with pgvector on a managed Postgres or with a managed cloud tier than with a self-hosted distributed cluster. The best engine is the one your team will actually keep healthy.

Where the database sits in a RAG system

The vector database is one layer in a wider retrieval architecture. Documents are loaded, split into chunks, embedded and written to the store; at query time the store returns the most relevant chunks and the language model turns them into an answer. Weaknesses elsewhere in that chain, poor chunking or a mismatched embedding model, will show up as bad answers no matter which database you choose.

Choosing and tuning the embedding model for your retrieval is often the highest-leverage decision in the whole system. The database can only return neighbours that the embeddings place near each other, so model quality sets a ceiling that no index can exceed.

It also helps to design the database as part of a knowledge base architecture built for retrieval, rather than as a standalone store. Chunking, metadata, access control and evaluation all interact with the database choice, and the architecture that keeps them coherent is usually the one that survives contact with real users.

Common mistakes when adopting a vector database

The first mistake is choosing on benchmarks alone. Vendor and independent benchmarks use specific embedding models, data distributions and hardware, and none of them is your workload. Shortlist on features, then measure the finalists on your own data at matched recall.

The second is ignoring filtered search performance. Unfiltered benchmarks look impressive, but production queries almost always carry filters, and some engines slow down sharply once filters are applied. Test the queries your application will actually run.

The third is treating the database as the whole RAG system. Retrieval quality also depends on chunking, embedding choice, reranking and evaluation. A team that spends all its effort on the database and none on evaluation will ship a fast system that returns the wrong passages quickly.

The fourth is underestimating operations. A self-hosted cluster needs backups, upgrades and monitoring from day one, not after the first incident. If nobody owns operations, a managed tier or a simpler engine is the safer choice.

Decision framework: choosing your open-source vector database

  • Estimate collection size now and in two years, and shortlist engines built for that range.
  • Check whether you already run Postgres: if so, trial pgvector before adopting a new system.
  • List the filters every production query needs, and test filtered search on each finalist.
  • Confirm hybrid search support and how keyword and vector results are combined.
  • Check which features sit outside the open-source core, and whether you need them.
  • Decide who operates the system, and whether a managed cloud tier is worth its cost.
  • Benchmark finalists on your own embeddings at matched recall, not on published figures.
  • Plan backups, upgrades and monitoring before the first production write.

Frequently asked questions

Which open-source vector database is best for RAG?

There is no universal winner. Qdrant suits fast search with strong filtering, Milvus suits billion-scale collections, Weaviate suits hybrid search and multi-tenancy, Chroma suits prototypes, and pgvector suits teams already on Postgres. Shortlist on your constraints and measure the finalists on your own data.

Is pgvector a real vector database?

pgvector is a PostgreSQL extension rather than a standalone database, but it provides real vector storage and similarity search inside Postgres. For teams already running Postgres, that is often enough, and it avoids operating a second system.

Do open-source vector databases support hybrid search?

Most dedicated engines do, combining keyword search with vector search in one query. pgvector pairs vector search with Postgres full-text search instead. Check how each engine combines the two result sets before relying on it.

Can I switch vector databases later?

Yes, but it takes work. Embeddings are portable, since they are just vectors, but indexes, metadata schemas, filtering syntax and client code all differ. Keeping source documents and embeddings outside the database makes a future migration much easier.

Should I self-host or use a managed cloud?

Self-hosting is free of licence fees but costs engineering time for operations, backups and upgrades. Managed clouds cost money but remove most of that burden. Small teams and production systems usually benefit from managed tiers; prototypes and research workloads usually do not need them.

What is the difference between a vector database and Faiss?

Faiss is a search library that runs inside your application, while a vector database is a service that adds persistence, metadata filtering, concurrent access and scaling. Some vector databases use Faiss-style indexes internally.

Latest articles

Scroll to Top