Chroma
Definition
Chroma is an open-source embedding database designed for simplicity, offering an in-memory mode for development and persistent storage for production, with a focus on being the easiest way to build LLM applications.
Why It Matters
Chroma prioritizes developer experience over enterprise features. In three lines of code, you can create a collection, add documents with auto-generated embeddings, and query for similar content. This simplicity makes it the default choice for tutorials, prototypes, and local development.
The in-memory mode means zero configuration to start. Install the package, write your code, and you’re running vector search. When you need persistence, switch to SQLite or client-server mode with minimal code changes. This progression from prototype to persistent storage without re-architecting is valuable for fast iteration.
For AI engineers learning RAG systems, Chroma reduces friction to the minimum. You can focus on understanding retrieval patterns, chunking strategies, and prompt engineering without managing infrastructure. Many production applications start as Chroma prototypes before migrating to managed services for scale.
Implementation Basics
Chroma’s API is intentionally minimal:
Collections store your embeddings. Create a collection, add documents, and query. That’s the core workflow. Collections can use different embedding functions (OpenAI, Sentence Transformers, or custom).
Documents and metadata are stored together. When you add a document, Chroma stores the text, generates an embedding, and saves any metadata you provide. Query results include both the retrieved text and its metadata.
Query modes support similarity search and filtering. You can query by text (auto-embedded) or by embedding vector directly. Metadata filtering combines with similarity search to narrow results.
Persistence options range from ephemeral (in-memory) to SQLite (local file) to client-server (production). The API stays the same across modes.
Start with the default EphemeralClient for experimentation. Use PersistentClient with a local path when you need data to survive restarts. Move to the Chroma server when you need multi-process access or are approaching production. Keep collections focused, since one collection per distinct document type typically works better than mixing everything together.
Source
Chroma is an open-source embedding database that makes it easy to build LLM apps by making knowledge, facts, and skills pluggable for LLMs.
https://docs.trychroma.com/