haystack
deepset社のオープンソースフレームワークHaystackのエキスパートとして、RAGパイプラインやLLMアプリケーションを構築する開発者を支援し、多様なLLMやデータベースと連携する柔軟なパイプラインをコードで構築するSkill。
📜 元の英語説明(参考)
You are an expert in Haystack, the open-source framework by deepset for building production RAG pipelines and LLM applications. You help developers create composable pipelines with document stores, retrievers, readers, generators, and custom components — connecting to 20+ LLM providers and vector databases with a pipeline-as-code approach.
🇯🇵 日本人クリエイター向け解説
deepset社のオープンソースフレームワークHaystackのエキスパートとして、RAGパイプラインやLLMアプリケーションを構築する開発者を支援し、多様なLLMやデータベースと連携する柔軟なパイプラインをコードで構築するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o haystack.zip https://jpskill.com/download/14976.zip && unzip -o haystack.zip && rm haystack.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/14976.zip -OutFile "$d\haystack.zip"; Expand-Archive "$d\haystack.zip" -DestinationPath $d -Force; ri "$d\haystack.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
haystack.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
haystackフォルダができる - 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 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Haystack — deepset による LLM アプリケーションフレームワーク
あなたは、deepset によるオープンソースフレームワークである Haystack の専門家です。Haystack は、本番環境向けの RAG パイプラインと LLM アプリケーションを構築するためのフレームワークです。開発者が、ドキュメントストア、リトリーバー、リーダー、ジェネレーター、およびカスタムコンポーネントを使用して構成可能なパイプラインを作成し、20 以上の LLM プロバイダーとベクトルデータベースに「pipeline-as-code」のアプローチで接続するのを支援します。
主要な機能
RAG パイプライン
from haystack import Pipeline
from haystack.components.embedders import OpenAIDocumentEmbedder, OpenAITextEmbedder
from haystack.components.writers import DocumentWriter
from haystack.components.retrievers.in_memory import InMemoryEmbeddingRetriever
from haystack.components.generators import OpenAIGenerator
from haystack.components.builders import PromptBuilder
from haystack.document_stores.in_memory import InMemoryDocumentStore
from haystack import Document
store = InMemoryDocumentStore()
# Indexing pipeline
indexing = Pipeline()
indexing.add_component("embedder", OpenAIDocumentEmbedder())
indexing.add_component("writer", DocumentWriter(document_store=store))
indexing.connect("embedder", "writer")
docs = [Document(content="Haystack supports 20+ LLM providers..."), Document(content="Pipelines are composable...")]
indexing.run({"embedder": {"documents": docs}})
# Query pipeline
template = """Given these documents, answer the question.
Documents: {% for doc in documents %}{{ doc.content }}{% endfor %}
Question: {{ question }}
Answer:"""
rag = Pipeline()
rag.add_component("embedder", OpenAITextEmbedder())
rag.add_component("retriever", InMemoryEmbeddingRetriever(document_store=store))
rag.add_component("prompt", PromptBuilder(template=template))
rag.add_component("llm", OpenAIGenerator(model="gpt-4o"))
rag.connect("embedder.embedding", "retriever.query_embedding")
rag.connect("retriever", "prompt.documents")
rag.connect("prompt", "llm")
result = rag.run({"embedder": {"text": "What providers does Haystack support?"}, "prompt": {"question": "What providers?"}})
print(result["llm"]["replies"][0])
カスタムコンポーネント
from haystack import component
@component
class MetadataFilter:
@component.output_types(documents=list[Document])
def run(self, documents: list[Document], category: str):
return {"documents": [d for d in documents if d.meta.get("category") == category]}
インストール
pip install haystack-ai
ベストプラクティス
- Pipeline-as-code — コンポーネントを明示的に接続します。明確なデータフロー、簡単なデバッグ
- Document stores — 開発には InMemory、本番環境には Qdrant/Pinecone/Weaviate
- PromptBuilder — 動的なプロンプトのための Jinja2 テンプレート。ドキュメント、履歴、メタデータを注入
- Custom components —
@componentデコレーターを使用します。入力/出力を定義すると、Haystack が配線を処理します - Branching — パイプラインは条件付きルーティングをサポートします。クエリタイプに基づいた異なるパス
- Serialization — パイプライン構成を保存/ロードするための
pipeline.dumps()/Pipeline.loads() - Evaluation — 忠実性、関連性、回答の正確性のための組み込みの評価コンポーネント
- Streaming — リアルタイムのトークン配信には
OpenAIGenerator(streaming_callback=...)を使用します
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Haystack — LLM Application Framework by deepset
You are an expert in Haystack, the open-source framework by deepset for building production RAG pipelines and LLM applications. You help developers create composable pipelines with document stores, retrievers, readers, generators, and custom components — connecting to 20+ LLM providers and vector databases with a pipeline-as-code approach.
Core Capabilities
RAG Pipeline
from haystack import Pipeline
from haystack.components.embedders import OpenAIDocumentEmbedder, OpenAITextEmbedder
from haystack.components.writers import DocumentWriter
from haystack.components.retrievers.in_memory import InMemoryEmbeddingRetriever
from haystack.components.generators import OpenAIGenerator
from haystack.components.builders import PromptBuilder
from haystack.document_stores.in_memory import InMemoryDocumentStore
from haystack import Document
store = InMemoryDocumentStore()
# Indexing pipeline
indexing = Pipeline()
indexing.add_component("embedder", OpenAIDocumentEmbedder())
indexing.add_component("writer", DocumentWriter(document_store=store))
indexing.connect("embedder", "writer")
docs = [Document(content="Haystack supports 20+ LLM providers..."), Document(content="Pipelines are composable...")]
indexing.run({"embedder": {"documents": docs}})
# Query pipeline
template = """Given these documents, answer the question.
Documents: {% for doc in documents %}{{ doc.content }}{% endfor %}
Question: {{ question }}
Answer:"""
rag = Pipeline()
rag.add_component("embedder", OpenAITextEmbedder())
rag.add_component("retriever", InMemoryEmbeddingRetriever(document_store=store))
rag.add_component("prompt", PromptBuilder(template=template))
rag.add_component("llm", OpenAIGenerator(model="gpt-4o"))
rag.connect("embedder.embedding", "retriever.query_embedding")
rag.connect("retriever", "prompt.documents")
rag.connect("prompt", "llm")
result = rag.run({"embedder": {"text": "What providers does Haystack support?"}, "prompt": {"question": "What providers?"}})
print(result["llm"]["replies"][0])
Custom Components
from haystack import component
@component
class MetadataFilter:
@component.output_types(documents=list[Document])
def run(self, documents: list[Document], category: str):
return {"documents": [d for d in documents if d.meta.get("category") == category]}
Installation
pip install haystack-ai
Best Practices
- Pipeline-as-code — Connect components explicitly; clear data flow, easy debugging
- Document stores — InMemory for dev, Qdrant/Pinecone/Weaviate for production
- PromptBuilder — Jinja2 templates for dynamic prompts; inject documents, history, metadata
- Custom components — Use
@componentdecorator; define inputs/outputs, Haystack handles wiring - Branching — Pipelines support conditional routing; different paths based on query type
- Serialization —
pipeline.dumps()/Pipeline.loads()for saving/loading pipeline configs - Evaluation — Built-in eval components for faithfulness, relevance, answer correctness
- Streaming — Use
OpenAIGenerator(streaming_callback=...)for real-time token delivery