Skip to main content

Chroma.

Project description

Chroma Chroma

Chroma - the open-source search engine for AI.
The fastest way to build Python or JavaScript LLM apps that search over your data!

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

Features

  • Simple: Fully-typed, fully-tested, fully-documented == happiness
  • Integrations: 🦜️🔗 LangChain (python and js), 🦙 LlamaIndex and more soon
  • Dev, Test, Prod: the same API that runs in your python notebook, scales to your cluster
  • Feature-rich: Queries, filtering, regex and more
  • Free & Open Source: Apache 2.0 Licensed

Use case: ChatGPT for ______

For example, the "Chat your data" use case:

  1. Add documents to your database. You can pass in your own embeddings, embedding function, or let Chroma embed them for you.
  2. Query relevant documents with natural language.
  3. Compose documents into the context window of an LLM like GPT4 for additional summarization or analysis.

Embeddings?

What are embeddings?

  • Read the guide from OpenAI
  • Literal: Embedding something turns it from image/text/audio into a list of numbers. 🖼️ or 📄 => [1.2, 2.1, ....]. This process makes documents "understandable" to a machine learning model.
  • By analogy: An embedding represents the essence of a document. This enables documents and queries with the same essence to be "near" each other and therefore easy to find.
  • Technical: An embedding is the latent-space position of a document at a layer of a deep neural network. For models trained specifically to embed data, this is the last layer.
  • A small example: If you search your photos for "famous bridge in San Francisco". By embedding this query and comparing it to the embeddings of your photos and their metadata - it should return photos of the Golden Gate Bridge.

Chroma allows you to store these vectors or embeddings and search by nearest neighbors rather than by substrings like a traditional database. By default, Chroma uses Sentence Transformers to embed for you but you can also use OpenAI embeddings, Cohere (multilingual) embeddings, or your own.

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

Project details


Release history Release notifications | RSS feed

This version

1.5.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chromadb-1.5.0.tar.gz (2.3 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

chromadb-1.5.0-cp39-abi3-win_amd64.whl (21.7 MB view details)

Uploaded CPython 3.9+Windows x86-64

chromadb-1.5.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (21.4 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

chromadb-1.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (20.5 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

chromadb-1.5.0-cp39-abi3-macosx_11_0_arm64.whl (19.9 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

chromadb-1.5.0-cp39-abi3-macosx_10_12_x86_64.whl (20.6 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file chromadb-1.5.0.tar.gz.

File metadata

  • Download URL: chromadb-1.5.0.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.11.5

File hashes

Hashes for chromadb-1.5.0.tar.gz
Algorithm Hash digest
SHA256 357c5516ede08305db65f078d1dd4e001b8ecca80a13fd0db0b45bc473554ecb
MD5 de584366c766b8250c4d5abe14b22fb7
BLAKE2b-256 10a988d14ec43948ba164c45a2b8a80df26f68b69d963b4fbdf6e777c7ee6ab9

See more details on using hashes here.

File details

Details for the file chromadb-1.5.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: chromadb-1.5.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 21.7 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.11.5

File hashes

Hashes for chromadb-1.5.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 8298cde5ffe448ca5a9794450c8b9700393e824ef8951be425ba2691330e78e6
MD5 c92ef3336aa330e5cd073ee3ccfc9276
BLAKE2b-256 b87c791d03e23ebcfaff35db5b1e6e7eb5c572046d2a562932305de63d0898fc

See more details on using hashes here.

File details

Details for the file chromadb-1.5.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chromadb-1.5.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4f5258d5b578c48b7c78effb6b582050ee13b1ac2e9eade4c83cd66de1a78c33
MD5 4315e5d79ec29f0af05c3f5a968357a2
BLAKE2b-256 9d2dd9faa17c38f49212ed66ed8f7923ee327a9d5a218dd9b7565f28f538bfa7

See more details on using hashes here.

File details

Details for the file chromadb-1.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chromadb-1.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 20dbfcd178cb93159891e3a0ff085659b8b3e4cbeef3dae311091c325791f4cc
MD5 7c26d25a54ae557a11d7a34b25463149
BLAKE2b-256 ba6ec9a9be7b3ca3fbcb59561464fe713637a475e39fc72e2dd7c60b2f360480

See more details on using hashes here.

File details

Details for the file chromadb-1.5.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chromadb-1.5.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3ae46c642c0bf3b86319b3883456ce8bb4a097a1d0552e7ce8cd4836a0cd1f22
MD5 6c4af801626308d41f90dfc388f954b9
BLAKE2b-256 1375b1354faa6e55ff1cfc916884da1b78629e689a3ddf57871000a62644e583

See more details on using hashes here.

File details

Details for the file chromadb-1.5.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for chromadb-1.5.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4dc035ed075ddf80dfcdcd6bbedf6cd7c81052132333f03e6a71cdeac5ea0899
MD5 92ca677e5bf2c5ed65d613e556c4358e
BLAKE2b-256 118c22b8c965551ce41646d6d0c2b30ce6868b5471e04611d30180823226f273

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page