Chroma Vector Database: A Practical Guide for Builders

Chroma Vector Database: A Practical Guide for Builders

The Chroma vector database is the fastest way most Python developers get from an idea to a working semantic search. It is an open-source embedding database, released under the Apache 2.0 licence, built for storing dense vector embeddings alongside the documents and metadata they came from. The central question is simple: when does Chroma fit your project, and when should you pick something heavier? The short answer is that Chroma fits prototypes, small products and local retrieval work beautifully, while very large or heavily filtered workloads usually need a more scalable store.

This guide explains how Chroma works, what it does well, where it struggles, and how to decide whether it belongs in your stack. If you are comparing options, our vector database comparison guide puts Chroma in context with the wider field.

Key takeaways

  • Chroma is an open-source embedding database that runs embedded in Python, as a single server, or in a distributed setup.
  • A single pip install gets you storing and searching embeddings in minutes, with no account or API key required.
  • It combines vector search with metadata filtering and full-text search, and ships with a local default embedding model.
  • Chroma suits prototypes, small RAG systems and agent memory, but very large collections need a store built for scale.

What Is the Chroma Vector Database?

Chroma is an embedding database, which means it focuses on a narrow job: storing high-dimensional vectors, keeping them next to their source documents and metadata, and returning the nearest neighbours to a query. It does not parse documents, split text into chunks or orchestrate language models. You bring your own pipeline and use Chroma as the storage and retrieval layer.

The project began as a Python-first tool for developers building AI products, and that origin still shapes it. The default experience is a local install with no server to configure, no account to create and no API key to manage. A managed Chroma Cloud option exists for teams that want the same API without running the server themselves.

Under the hood, the current version uses a Rust-based core for vector operations, a step up from the original pure-Python implementation. Single-node deployments keep collection metadata in SQLite and each collection’s vectors in an HNSW index, the same graph-based algorithm that powers Qdrant, Weaviate and Milvus. For background on that algorithm, see our HNSW index explained guide.

Best for: Python developers who want working semantic search in minutes, with no infrastructure decisions up front.

How Chroma Works

Chroma organises data into three building blocks. A client connects you to an instance, either inside your Python process or over HTTP. A collection is the unit of organisation, roughly like a table, and it owns a single embedding function plus a set of records. A record is the actual data: an ID, an optional document, an optional embedding and an optional metadata dictionary.

There are three client modes. An ephemeral client stores data in memory only, which suits tests. A persistent client writes to a local directory, which suits development and small deployments. An HTTP client connects to a separately running Chroma server, which is the usual production path. The same code talks to all three, so an application can move from a laptop to a remote server without rewriting its queries.

The query interface takes text or a vector, embeds it, and returns the closest records. Metadata filtering uses operators such as $eq, $gt, $in, $and and $or, and document text can be filtered with $contains. Hybrid search combining dense vectors, full-text and regex reached general availability in 2025, so keyword and semantic signals can now work together in one query.

Getting Started in Minutes

The fastest path is a single install command, pip install chromadb, which pulls in the Python client, the embedded server components and the default embedding function. That default is a small sentence-transformers model, all-MiniLM-L6-v2 at 384 dimensions, which runs locally through ONNX Runtime with no external API key. The model downloads once, around 80 MB, on first run.

From there, three lines of code create a persistent client, open a collection and add documents. The add call embeds the documents, stores the vectors alongside the text and metadata, and persists everything to the directory you chose. A query then returns the most similar records, with distances you can turn into similarity scores.

OpenAI, Cohere, Google, Hugging Face, Jina, Voyage and Ollama are supported as alternative embedding functions when you want a different model. Supported HNSW distance metrics are L2, which is the default, cosine and inner product, set when the collection is created. To start the server mode, the command chroma run --path /your/db/path starts an HTTP server on port 8000 by default.

Hands typing on a laptop keyboard beside a notebook and a mug
Chroma’s Python-first design means the first working search is minutes away.

Chroma vs Other Vector Stores

Feature Chroma Dedicated vector database Postgres with pgvector
Setup time Minutes, one pip install Docker or managed service Extension on existing Postgres
Licence Apache 2.0 Usually Apache 2.0 or similar PostgreSQL licence
Index HNSW HNSW, often with quantization HNSW or IVFFlat
Filtering Metadata and full-text filters Filter-aware search Full SQL WHERE and joins
Scale comfort zone Up to tens of millions of embeddings Hundreds of millions and beyond Millions on a single instance
Transactions No ACID guarantees Varies by product Full ACID in Postgres
Best use case Prototypes and small RAG Production retrieval at scale Vectors beside relational data

Where Chroma Shines

Chroma’s greatest strength is developer experience. The install is trivial, the API is small, and the default embedding function means you can run a first semantic search without signing up for anything. That is why it appears as the default vector store in countless RAG tutorials and in first-class integrations with LangChain and LlamaIndex.

It also fits agent memory well. AI agents that store observations and recall the relevant ones later need a durable store queried by similarity rather than by key, and Chroma’s collections map neatly onto that pattern. The same applies to small product search, internal knowledge bases and personal document collections.

Your data stays yours in a practical sense too. A collection can be dumped back out with a single call, so moving away from Chroma is measured in hours rather than months. That low lock-in makes it a safe choice for experiments that might grow into products.

Where Chroma Struggles

Scale is the honest limit. Chroma’s own guidance is that users can comfortably rely on it for use cases approaching tens of millions of embeddings on suitable hardware, and that under 2 GB of RAM is not recommended. The HNSW index lives in memory, so RAM caps collection size: a million 1536-dimension vectors need roughly 6 GB of raw data, plus a similar amount again for the graph itself.

Durability is prototype-grade rather than enterprise-grade. Single-node storage uses SQLite plus on-disk segments, which is fine for development and small deployments but lacks the replication, point-in-time recovery and access controls of a full database. The open-source server’s authentication is minimal, so the common production pattern is to run Chroma behind a reverse proxy that handles auth at the network layer.

There are smaller gaps to know about as well. There is no built-in role-based access control, no quantization to shrink large indexes, and the storage format has changed between major versions before, so reading the changelog before upgrading is wise. None of these matter in a prototype, but all of them become visible in production.

For advice on sizing any vector store, see our vector embedding storage guide, which covers the memory maths in detail.

Decision Checklist: Should You Use Chroma?

Run through this checklist before you commit to Chroma for a project.

  • Is this a prototype or a small product? If yes, Chroma is an excellent default. If you expect tens of millions of vectors, plan for a more scalable store.
  • Are you building in Python? Chroma’s Python client is first-class, and TypeScript and Rust clients exist too.
  • Do you need embeddings without an API key? The local default model runs offline, which suits private data and air-gapped work.
  • Is your data already in PostgreSQL? If so, pgvector may be simpler, since it avoids a second system entirely.
  • Do you need strict access control? If yes, put Chroma behind a proxy or choose a store with built-in auth.
  • Will you need replication or failover? Chroma’s distributed mode exists, but dedicated vector databases have deeper clustering stories.
  • How will you pick embeddings? Check our RAG embedding models guide, since the model choice affects retrieval quality more than the store does.

If most answers favour simplicity and speed, choose Chroma. If most favour scale, transactions or access control, choose a heavier store and keep Chroma for the prototype that proves the idea first.

Chroma in a RAG Pipeline

In a retrieval-augmented generation system, Chroma sits between your embedding step and your language model. Documents are chunked, embedded and added to a collection with metadata such as source, date or author. At query time the question is embedded, the nearest chunks are retrieved with any metadata filters applied, and those chunks are passed to the model as context.

This pattern works because Chroma stores the document text next to the vector, so retrieval returns usable context in one call. It also works because the filtering is expressive enough for common needs, such as limiting results to one tenant or one document type. For a broader view of this architecture, see our best vector databases for RAG selection guide.

One practical tip: fix your embedding model and dimension before you load a large collection. Changing the model later means re-embedding everything, and Chroma collections are tied to a single embedding function. A small test collection that proves the retrieval quality is worth more than a large one built on a model you later replace.

Frequently Asked Questions

Is Chroma free?

Yes. Chroma is open source under the Apache 2.0 licence and free to self-host, with no paid tier or feature gate in the open-source code. A managed Chroma Cloud service exists for teams that prefer not to run the server.

Does Chroma need an OpenAI API key?

No. The default embedding function is a small local model that runs on your own machine. You only need an external key if you choose a hosted embedding provider instead.

How many vectors can Chroma handle?

Chroma’s guidance is that use cases approaching tens of millions of embeddings are comfortable on suitable hardware. Beyond that, or when RAM becomes the limit, a dedicated vector database with quantization and sharding is a better fit.

Is Chroma a full database?

No. It is an embedding database focused on storing vectors, documents and metadata and searching them by similarity. It does not offer joins, transactions or the general-purpose features of PostgreSQL.

Can Chroma run in production?

Yes, for small to medium workloads, usually as a server behind a reverse proxy that handles authentication. For large-scale production retrieval with strict availability targets, a distributed vector database is usually the safer choice.

What happens to my data if I stop using Chroma?

Your data stays accessible. Collections can be dumped with a single call, and the storage is local files rather than a proprietary service, so migrating to another vector store is straightforward.

Latest articles

Scroll to Top