chromadb
ChromaDBを活用し、RAGパイプライン構築や類似検索エンジン開発において、ベクトル埋め込みの保存・検索・管理を効率的に行い、ビジネスにおける情報検索や推薦システムの精度向上を支援するSkill。
📜 元の英語説明(参考)
Assists with storing, searching, and managing vector embeddings using ChromaDB. Use when building RAG pipelines, semantic search engines, or recommendation systems. Trigger words: chromadb, chroma, vector database, embeddings, semantic search, similarity search, vector store, rag.
🇯🇵 日本人クリエイター向け解説
ChromaDBを活用し、RAGパイプライン構築や類似検索エンジン開発において、ベクトル埋め込みの保存・検索・管理を効率的に行い、ビジネスにおける情報検索や推薦システムの精度向上を支援するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o chromadb.zip https://jpskill.com/download/14739.zip && unzip -o chromadb.zip && rm chromadb.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/14739.zip -OutFile "$d\chromadb.zip"; Expand-Archive "$d\chromadb.zip" -DestinationPath $d -Force; ri "$d\chromadb.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
chromadb.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
chromadbフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
ChromaDB
概要
ChromaDB は、埋め込みを保存、検索、管理するためのオープンソースのベクトルデータベースです。ドキュメントの取り込み、セマンティック類似性検索、メタデータフィルタリングのためのシンプルな API を提供し、Python と JavaScript/TypeScript の両方のクライアントをサポートし、組み込み、サーバー、クラウドのデプロイオプションがあります。
指示
- 初期化時には、べき等なコレクション設定のために
get_or_create_collectionを使用し、開発にはPersistentClientを、本番サーバー接続にはHttpClientを選択してください。 - ドキュメントを追加する際は、
add()呼び出しを 5,000 ドキュメントのチャンクにまとめてバッチ処理し、RAG 引用のために常にソースメタデータ(filename、URL、ページ番号)を保存し、重複を避けるためにインクリメンタルな更新にはupsert()を使用してください。 - クエリを実行する際は、テキストベースの検索には
collection.query(query_texts=..., n_results=...)を使用し、セマンティック検索の前にメタデータのwhereフィルタを組み合わせて結果を絞り込み、n_resultsを LLM のコンテキストウィンドウに基づいて設定してください(ほとんどの RAG パイプラインでは 5〜10)。 - 埋め込みを選択する際は、API キーなしでローカル開発を行う場合はデフォルトの Sentence Transformers を使用し、本番環境では OpenAI または Cohere の埋め込み関数を使用するか、事前に計算されたベクトルを直接渡してください。
- メタデータをフィルタリングする際は、
$eq、$gt、$inなどの演算子を$and/$or論理演算子と組み合わせて使用し、セマンティック類似性と並行してコンテンツベースのフィルタリングを行うためにwhere_documentと組み合わせて使用してください。 - デプロイする際は、シングルノードアプリケーションには組み込みの
PersistentClientを使用し、サーバーモードには Docker を使用し、マルチテナントサポート付きのマネージドホスティングには Chroma Cloud を使用してください。 - パフォーマンスを調整する際は、品質と速度のトレードオフのために HNSW パラメータ(
hnsw:M、hnsw:construction_ef、hnsw:search_ef)を設定し、正規化された埋め込み(OpenAI、Cohere)にはcosine距離を選択してください。
例
例 1: ドキュメント Q&A パイプラインの構築
ユーザーリクエスト: "ドキュメントに関する質問に答えるための ChromaDB を使用した RAG パイプラインをセットアップしてください"
アクション:
- ドキュメントをロードし、メタデータ(source、page)とともにチャンクに分割します
- OpenAI 埋め込み関数を使用してコレクションを作成します
- べき等な取り込みのために
upsert()を使用してドキュメントチャンクをバッチ追加します collection.query()でクエリを実行し、取得したチャンクを LLM にコンテキストとして渡します
出力: LLM を利用した Q&A のために、関連するドキュメントチャンクを取得するセマンティック検索パイプライン。
例 2: フィルタリングされたセマンティック検索をアプリケーションに追加する
ユーザーリクエスト: "テキスト類似性とカテゴリフィルタを組み合わせた製品検索を実装してください"
アクション:
- 製品の説明とカテゴリメタデータを使用してコレクションを作成します
query_textsとwhere={"category": "electronics"}を組み合わせた検索を実装します- 関連性ランキングのために距離とともに結果を返します
$gteおよび$lte演算子を使用して価格範囲フィルタリングを追加します
出力: テキスト類似性でランキングする前にメタデータで絞り込む、フィルタリングされたセマンティック検索。
ガイドライン
- べき等なコレクションの初期化には
get_or_create_collectionを使用してください。再起動しても安全です。 - メモリ使用量を管理するために、
add()呼び出しを 5,000 ドキュメントのチャンクにまとめてバッチ処理してください。 - 常にソースメタデータ(filename、URL、ページ番号)を保存してください。RAG 引用には不可欠です。
- 再取り込み時にドキュメントの重複を避けるために、インクリメンタルな更新には
upsert()を使用してください。 n_resultsは LLM のコンテキストウィンドウに基づいて設定してください。ほとんどの RAG パイプラインでは 5〜10 の結果です。- ノイズを減らすために、セマンティック検索の前にメタデータフィルタリングを使用して結果を絞り込んでください。
- 正規化された埋め込み(OpenAI、Cohere)には
cosine距離を、正規化されていない埋め込みにはl2を選択してください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
ChromaDB
Overview
ChromaDB is an open-source vector database for storing, searching, and managing embeddings. It provides a simple API for document ingestion, semantic similarity search, and metadata filtering, supporting both Python and JavaScript/TypeScript clients with embedded, server, and cloud deployment options.
Instructions
- When initializing, use
get_or_create_collectionfor idempotent collection setup, choosePersistentClientfor development andHttpClientfor production server connections. - When adding documents, batch
add()calls in chunks of 5,000 documents, always store source metadata (filename, URL, page number) for RAG citations, and useupsert()for incremental updates to avoid duplicates. - When querying, use
collection.query(query_texts=..., n_results=...)for text-based search, combine metadatawherefilters to narrow results before semantic search, and setn_resultsbased on the LLM's context window (5-10 for most RAG pipelines). - When choosing embeddings, use the default Sentence Transformers for local development without API keys, OpenAI or Cohere embedding functions for production, or pass pre-computed vectors directly.
- When filtering metadata, use operators like
$eq,$gt,$inwith$and/$orlogical operators, and combine withwhere_documentfor content-based filtering alongside semantic similarity. - When deploying, use the embedded
PersistentClientfor single-node applications, Docker for server mode, or Chroma Cloud for managed hosting with multi-tenancy support. - When tuning performance, configure HNSW parameters (
hnsw:M,hnsw:construction_ef,hnsw:search_ef) for the quality-speed tradeoff and choosecosinedistance for normalized embeddings (OpenAI, Cohere).
Examples
Example 1: Build a document Q&A pipeline
User request: "Set up a RAG pipeline with ChromaDB for answering questions about our docs"
Actions:
- Load documents and split into chunks with metadata (source, page)
- Create a collection with OpenAI embedding function
- Batch-add document chunks with
upsert()for idempotent ingestion - Query with
collection.query()and pass retrieved chunks as context to the LLM
Output: A semantic search pipeline that retrieves relevant document chunks for LLM-powered Q&A.
Example 2: Add filtered semantic search to an application
User request: "Implement product search that combines text similarity with category filters"
Actions:
- Create a collection with product descriptions and category metadata
- Implement search combining
query_textswithwhere={"category": "electronics"} - Return results with distances for relevance ranking
- Add price range filtering with
$gteand$lteoperators
Output: A filtered semantic search that narrows by metadata before ranking by text similarity.
Guidelines
- Use
get_or_create_collectionfor idempotent collection initialization; it is safe for restarts. - Batch
add()calls in chunks of 5,000 documents to manage memory usage. - Always store source metadata (filename, URL, page number); it is essential for RAG citations.
- Use
upsert()for incremental updates to avoid duplicate documents when re-ingesting. - Set
n_resultsbased on the LLM's context window: 5-10 results for most RAG pipelines. - Use metadata filtering to narrow results before semantic search to reduce noise.
- Choose
cosinedistance for normalized embeddings (OpenAI, Cohere) andl2for unnormalized.