Logo: Chroma

Chroma

Communautéit
AlexAI-MCP
chroma

Open-source embedding database for RAG — store embeddings, vector search, metadata filtering. Simple API, scales from notebook to production.

Add to TypingMind

Iwwersiicht

EditeurAlexAI-MCP
Repositoryhermes-CCC
Skill-Nummchroma
Stären
134
Forks
22
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    AlexAI-MCP huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Chroma an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/AlexAI-MCP/hermes-CCC/tree/master/skills/chroma
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AlexAI-MCP/hermes-CCC.git /tmp/hermes-CCC
mkdir -p .claude/skills
cp -r /tmp/hermes-CCC/skills/chroma .claude/skills/chroma
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Chroma an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Chroma automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Chroma net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Chroma

Purpose

  • Use this skill to store embeddings and perform semantic retrieval for RAG systems.
  • Prefer Chroma when you want a simple local developer experience with an easy Python API.
  • Chroma works well for notebooks, prototypes, local apps, and moderate production deployments.
  • It supports metadata filtering, server mode, and pluggable embedding functions.

Install

bash
pip install chromadb sentence-transformers
  • Add any extra embedding provider packages you need, such as the OpenAI SDK.

Basic Setup

python
import chromadb

client = chromadb.PersistentClient(path="./chroma_db")
  • PersistentClient stores data on disk.
  • It is a good default for local development and single-node setups.

Create a Collection

python
collection = client.create_collection(name="docs")
  • Use descriptive collection names like docs, papers, tickets, or kb_chunks.
  • A collection is the logical container for your embeddings and payload metadata.

Add Documents

  • Minimal add call:
python
collection.add(
    documents=["Chroma is useful for local RAG.", "Vector search retrieves semantically similar text."],
    metadatas=[{"source": "note1"}, {"source": "note2"}],
    ids=["doc-1", "doc-2"],
)
  • Required arrays must align by index.
  • Keep ids stable if you plan to update or delete records later.

Query

python
results = collection.query(
    query_texts=["How do I store embeddings for RAG?"],
    n_results=5,
)

print(results["documents"])
print(results["metadatas"])
  • query_texts=['...'] is the most common path when Chroma is managing embeddings for you.
  • Start with n_results=5 or 10 for most retrieval experiments.

Basic Collection Lifecycle

  • Create collection
  • Add documents
  • Query for nearest neighbors
  • Update documents when content changes
  • Delete stale records

Get or Create

  • For idempotent startup flows, prefer get_or_create_collection:
python
collection = client.get_or_create_collection(name="docs")
  • This is helpful in services that initialize storage on boot.

Embedding Functions

  • Chroma supports multiple embedding strategies.
  • Common choices include:
  • DefaultEmbeddingFunction
  • SentenceTransformerEmbeddingFunction
  • OpenAIEmbeddingFunction

Default Embedding Function

python
from chromadb.utils.embedding_functions import DefaultEmbeddingFunction

embedding_fn = DefaultEmbeddingFunction()
collection = client.get_or_create_collection(
    name="default-embeddings",
    embedding_function=embedding_fn,
)
  • The default function is convenient for quick experiments.
  • For production, you usually want to control the embedding model explicitly.

SentenceTransformers Embedding Function

python
from chromadb.utils.embedding_functions import SentenceTransformerEmbeddingFunction

embedding_fn = SentenceTransformerEmbeddingFunction(
    model_name="sentence-transformers/all-MiniLM-L6-v2",
)

collection = client.get_or_create_collection(
    name="st-docs",
    embedding_function=embedding_fn,
)
  • This is a good choice for local semantic search with no external API dependency.

OpenAI Embedding Function

python
from chromadb.utils.embedding_functions import OpenAIEmbeddingFunction

embedding_fn = OpenAIEmbeddingFunction(
    api_key="YOUR_API_KEY",
    model_name="text-embedding-3-small",
)

collection = client.get_or_create_collection(
    name="openai-docs",
    embedding_function=embedding_fn,
)
  • Use this when you want consistent hosted embeddings across environments.
  • Track model versions because embedding changes can invalidate similarity behavior.

Add Structured Documents

python
collection.add(
    documents=[
        "Retrieval augmented generation combines retrieval with generation.",
        "Chroma collections can store metadata for filtering.",
    ],
    metadatas=[
        {"source": "paper1", "section": "intro", "year": 2024},
        {"source": "paper1", "section": "methods", "year": 2024},
    ],
    ids=["paper1-intro", "paper1-methods"],
)
  • Include source, section, title, author, or timestamp metadata if you need filtered retrieval.

Metadata Filtering

  • Filter by metadata with where:
python
results = collection.query(
    query_texts=["What does the paper say about filtering?"],
    n_results=5,
    where={"source": "paper1"},
)
  • Example requested pattern:

  • where={'source': 'paper1'}

  • Metadata filters are critical for multi-tenant or source-restricted RAG.

Full Text Search

  • Chroma also supports document-side text filtering with where_document.
  • The commonly used operator form is:
python
results = collection.query(
    query_texts=["database"],
    n_results=5,
    where_document={"$contains": "keyword"},
)
  • Some examples on the internet simplify this idea informally as where_document={'...': 'keyword'}.
  • In practice, use the explicit operator form your installed Chroma version documents.

Update Documents

  • Update existing records by ID:
python
collection.update(
    ids=["doc-1"],
    documents=["Chroma stores embeddings persistently for local RAG systems."],
    metadatas=[{"source": "note1", "updated": True}],
)
  • Use stable IDs so updates remain deterministic.

Delete Documents

python
collection.delete(ids=["doc-2"])
  • You can also delete by filter in many workflows:
python
collection.delete(where={"source": "note1"})
  • Deletes are useful for document re-indexing and source cleanup jobs.

Inspect Data

  • Fetch records directly:
python
items = collection.get(ids=["doc-1"])
print(items)
  • Use this for debugging chunk contents, metadata shape, and embedding lifecycle issues.

HTTP Client for Server Mode

  • Chroma can run as a server and be accessed over HTTP.
  • Python client example:
python
import chromadb

client = chromadb.HttpClient(host="localhost", port=8000)
collection = client.get_or_create_collection(name="docs")
  • This is useful when multiple apps need to share one Chroma instance.

Docker Server

  • Start a server with Docker:
bash
docker run -p 8000:8000 chromadb/chroma
  • Pair that with chromadb.HttpClient(host='localhost', port=8000) from Python.
  • For persistent data in Docker, mount a volume rather than relying on container-local storage.

Retrieval Design Tips

  • Chunk documents before indexing.
  • Keep chunk size and overlap consistent during experiments.
  • Store source metadata so retrieved chunks can be traced back to originals.
  • Log your embedding model name and collection schema.

Chroma Strengths

  • Very easy local setup
  • Clean Python API
  • Good fit for notebook and single-service workflows
  • Flexible embedding function support

Chroma Limitations

  • It is simpler than some production-first vector engines.
  • Large-scale distributed deployments may need a more specialized backend.
  • You should benchmark real workloads before using it as a high-scale production default.

Common Failure Modes

  • Empty search results:

  • confirm documents were added

  • confirm the embedding function is configured as expected

  • lower filtering constraints

  • Embedding mismatch:

  • avoid changing embedding models inside the same collection without re-indexing

  • document the embedding function used for each collection

  • Duplicate records:

  • choose deterministic IDs from source path plus chunk index

  • upsert or update intentionally instead of re-adding blind

  • Server connectivity issues:

  • verify the Docker container is running

  • confirm localhost:8000 is reachable

  • switch from PersistentClient to HttpClient only when appropriate

Recommended Workflow

  • Start local with PersistentClient.
  • Use sentence-transformers for quick offline prototypes.
  • Add metadata filters early if you know you need scoped retrieval.
  • Move to server mode when multiple apps or services need shared access.

When To Use This Skill

  • You are building a local RAG system.
  • You need an easy vector store API inside Python.
  • You want metadata-aware retrieval without a heavy infrastructure stack.
  • You need a bridge from notebook experimentation to a small production deployment.

Quick Reference

  • Install: pip install chromadb sentence-transformers
  • Local client: chromadb.PersistentClient(path="./chroma_db")
  • Add docs: collection.add(documents=[...], metadatas=[...], ids=[...])
  • Query: collection.query(query_texts=["..."], n_results=5)
  • Metadata filter: where={"source": "paper1"}
  • Document text filter: where_document={"$contains": "keyword"}
  • Server client: chromadb.HttpClient(host="localhost", port=8000)
  • Docker: docker run -p 8000:8000 chromadb/chroma

Heefeg gestallte Froen

Wat mécht de KI-Skill Chroma?

Open-source embedding database for RAG — store embeddings, vector search, metadata filtering. Simple API, scales from notebook to production.

Firwat Chroma op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Chroma besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Chroma an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/AlexAI-MCP/hermes-CCC/tree/master/skills/chroma an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Chroma benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Chroma benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Chroma domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Chroma gratis?

Jo. AlexAI-MCP huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇