chroma README

The project's README from github.com/chroma-core/chroma. As one markdown file: README.md.

Chroma Chroma

Chroma - the open-source data infrastructure for AI.

Discord | License | Docs | Homepage

pip install chromadb # python client
# for javascript, npm install chromadb!
# for client-server mode, chroma run --path /chroma_db_path

Chroma Cloud

Our hosted service, Chroma Cloud, powers serverless vector, hybrid, and full-text search. It's extremely fast, cost-effective, scalable and painless. Create a DB and try it out in under 30 seconds with $5 of free credits.

Get started with Chroma Cloud

API

The core API is only 4 functions (run our 💡 Google Colab):

import chromadb
# setup Chroma in-memory, for easy prototyping. Can add persistence easily!
client = chromadb.Client()

# Create collection. get_collection, get_or_create_collection, delete_collection also available!
collection = client.create_collection("all-my-documents")

# Add docs to the collection. Can also update and delete. Row-based API coming soon!
collection.add(
    documents=["This is document1", "This is document2"], # we handle tokenization, embedding, and indexing automatically. You can skip that and add your own embeddings as well
    metadatas=[{"source": "notion"}, {"source": "google-docs"}], # filter on these!
    ids=["doc1", "doc2"], # unique for each doc
)

# Query/search 2 most similar results. You can also .get by id
results = collection.query(
    query_texts=["This is a query document"],
    n_results=2,
    # where={"metadata_field": "is_equal_to_this"}, # optional filter
    # where_document={"$contains":"search_string"}  # optional filter
)

Learn about all features on our Docs

Get involved

Chroma is a rapidly developing project. We welcome PR contributors and ideas for how to improve the project.

Release Cadence We currently release new tagged versions of the pypi and npm packages on Mondays. Hotfixes go out at any time during the week.

License

Apache 2.0

chroma (chroma-core/chroma)

Searching Database…

29.5K ·GitHub
What is this?Chroma is open-source data infrastructure for AI: a vector database that powers search for embeddings, used for things like retrieval-augmented generation (RAG) and AI agent memory.
Is this a database or a client library?It's a database engine (written in Rust) that you run yourself or use hosted, accessed through client packages distributed via pypi and npm.
How do I get started with Chroma?Easiest path is Chroma Cloud: create a database and try it out in under 30 seconds using $5 of free credits. Self-hosting is also supported via the pypi/npm packages and Docker.
What do I need to use Chroma's client?You need either the Python (pypi) or JavaScript/TypeScript (npm) client package to talk to a Chroma instance, or a Chroma Cloud account for the hosted option.
Is the core API complex to learn?No — the core API is intentionally minimal, exposing only 4 functions, which keeps the learning curve low even though it's a full database.
What kind of search does Chroma support?Chroma Cloud powers serverless vector, hybrid, and full-text search, so you can combine semantic (embedding-based) search with traditional keyword search.
What is Chroma Cloud exactly?It's Chroma's hosted service — a managed, serverless version of the database that's fast, cost-effective and scalable, so you don't have to run the infrastructure yourself.
How often does Chroma ship updates?The team releases new tagged versions of the pypi and npm packages every Monday, with hotfixes going out anytime during the week as needed.
Why would I use Chroma over a generic database?Chroma is purpose-built for AI search workloads like embeddings and RAG, giving you vector, hybrid, and full-text search out of the box behind a tiny 4-function API.
What are similar projects?txtai, weaviate, m_flow, memvid, orama, xerj, localGPT, PageIndex
Size
855.9 MB
Stars
29.5K
Age
4y
Commits · 90 Days