jpskill.com
🛠️ 開発・MCP コミュニティ

ai-rag-pipeline

ウェブ検索とLLMを組み合わせ、情報源を明記した回答や調査レポートを生成するRAGパイプラインを構築するSkill。

📜 元の英語説明(参考)

Build RAG (Retrieval Augmented Generation) pipelines with web search and LLMs. Tools: Tavily Search, Exa Search, Exa Answer, Claude, GPT-4, Gemini via OpenRouter. Capabilities: research, fact-checking, grounded responses, knowledge retrieval. Use for: AI agents, research assistants, fact-checkers, knowledge bases. Triggers: rag, retrieval augmented generation, grounded ai, search and answer, research agent, fact checking, knowledge retrieval, ai research, search + llm, web grounded, perplexity alternative, ai with sources, citation, research pipeline

🇯🇵 日本人クリエイター向け解説

一言でいうと

ウェブ検索とLLMを組み合わせ、情報源を明記した回答や調査レポートを生成するRAGパイプラインを構築するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o ai-rag-pipeline.zip https://jpskill.com/download/6170.zip && unzip -o ai-rag-pipeline.zip && rm ai-rag-pipeline.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/6170.zip -OutFile "$d\ai-rag-pipeline.zip"; Expand-Archive "$d\ai-rag-pipeline.zip" -DestinationPath $d -Force; ri "$d\ai-rag-pipeline.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して ai-rag-pipeline.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → ai-rag-pipeline フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[スキル名] ai-rag-pipeline

AI RAG パイプライン

AI RAG Pipeline

inference.sh CLI を介して RAG (Retrieval Augmented Generation) パイプラインを構築します。

クイックスタート

curl -fsSL https://cli.inference.sh | sh && infsh login

# シンプルな RAG: 検索 + LLM
SEARCH=$(infsh app run tavily/search-assistant --input '{"query": "latest AI developments 2024"}')
infsh app run openrouter/claude-sonnet-45 --input "{
  \"prompt\": \"Based on this research, summarize the key trends: $SEARCH\"
}"

RAG とは何ですか?

RAG は以下を組み合わせたものです。

  1. 検索 (Retrieval): 外部ソースから関連情報を取得します。
  2. 拡張 (Augmentation): 取得したコンテキストをプロンプトに追加します。
  3. 生成 (Generation): LLM がコンテキストを使用して応答を生成します。

これにより、より正確で最新の、検証可能な AI 応答が生成されます。

RAG パイプラインのパターン

パターン 1: シンプルな検索 + 回答

[ユーザーのクエリ] -> [ウェブ検索] -> [コンテキスト付き LLM] -> [回答]

パターン 2: 複数ソースからの調査

[クエリ] -> [複数の検索] -> [集約] -> [LLM 分析] -> [レポート]

パターン 3: 抽出 + 処理

[URL] -> [コンテンツ抽出] -> [チャンキング] -> [LLM 要約] -> [出力]

利用可能なツール

検索ツール

ツール App ID 最適な用途
Tavily Search tavily/search-assistant 回答付きの AI 搭載検索
Exa Search exa/search ニューラル検索、セマンティックマッチング
Exa Answer exa/answer 直接的な事実の回答

抽出ツール

ツール App ID 最適な用途
Tavily Extract tavily/extract URL からクリーンなコンテンツを抽出
Exa Extract exa/extract ウェブコンテンツを分析

LLM ツール

モデル App ID 最適な用途
Claude Sonnet 4.5 openrouter/claude-sonnet-45 複雑な分析
Claude Haiku 4.5 openrouter/claude-haiku-45 高速処理
GPT-4o openrouter/gpt-4o 汎用
Gemini 2.5 Pro openrouter/gemini-25-pro 長いコンテキスト

パイプラインの例

基本的な RAG パイプライン

# 1. 情報を検索
SEARCH_RESULT=$(infsh app run tavily/search-assistant --input '{
  "query": "What are the latest breakthroughs in quantum computing 2024?"
}')

# 2. 根拠に基づいた応答を生成
infsh app run openrouter/claude-sonnet-45 --input "{
  \"prompt\": \"You are a research assistant. Based on the following search results, provide a comprehensive summary with citations.

Search Results:
$SEARCH_RESULT

Provide a well-structured summary with source citations.\"
}"

複数ソースからの調査

# 複数のソースを検索
TAVILY=$(infsh app run tavily/search-assistant --input '{"query": "electric vehicle market trends 2024"}')
EXA=$(infsh app run exa/search --input '{"query": "EV market analysis latest reports"}')

# 結合して分析
infsh app run openrouter/claude-sonnet-45 --input "{
  \"prompt\": \"Analyze these research results and identify common themes and contradictions.

Source 1 (Tavily):
$TAVILY

Source 2 (Exa):
$EXA

Provide a balanced analysis with sources.\"
}"

URL コンテンツ分析

# 1. 特定の URL からコンテンツを抽出
CONTENT=$(infsh app run tavily/extract --input '{
  "urls": [
    "https://example.com/research-paper",
    "https://example.com/industry-report"
  ]
}')

# 2. 抽出されたコンテンツを分析
infsh app run openrouter/claude-sonnet-45 --input "{
  \"prompt\": \"Analyze these documents and extract key insights:

$CONTENT

Provide:
1. Key findings
2. Data points
3. Recommendations\"
}"

ファクトチェックパイプライン

# 検証する主張
CLAIM="AI will replace 50% of jobs by 2030"

# 1. 証拠を検索
EVIDENCE=$(infsh app run tavily/search-assistant --input "{
  \"query\": \"$CLAIM evidence studies research\"
}")

# 2. 主張を検証
infsh app run openrouter/claude-sonnet-45 --input "{
  \"prompt\": \"Fact-check this claim: '$CLAIM'

Based on the following evidence:
$EVIDENCE

Provide:
1. Verdict (True/False/Partially True/Unverified)
2. Supporting evidence
3. Contradicting evidence
4. Sources\"
}"

調査レポートジェネレーター

TOPIC="Impact of generative AI on creative industries"

# 1. 初期調査
OVERVIEW=$(infsh app run tavily/search-assistant --input "{\"query\": \"$TOPIC overview\"}")
STATISTICS=$(infsh app run exa/search --input "{\"query\": \"$TOPIC statistics data\"}")
OPINIONS=$(infsh app run tavily/search-assistant --input "{\"query\": \"$TOPIC expert opinions\"}")

# 2. 包括的なレポートを生成
infsh app run openrouter/claude-sonnet-45 --input "{
  \"prompt\": \"Generate a comprehensive research report on: $TOPIC

Research Data:
== Overview ==
$OVERVIEW

== Statistics ==
$STATISTICS

== Expert Opinions ==
$OPINIONS

Format as a professional report with:
- Executive Summary
- Key Findings
- Data Analysis
- Expert Perspectives
- Conclusion
- Sources\"
}"

ソース付きのクイックアンサー

# 直接的な事実の質問には Exa Answer を使用
infsh app run exa/answer --input '{
  "question": "What is the current market cap of NVIDIA?"
}'

ベストプラクティス

1. クエリの最適化

# 悪い例: 曖昧すぎる
"AI news"

# 良い例: 具体的に、文脈に沿って
"latest developments in large language models January 2024"

2. コンテキスト管理

# 長い検索結果は LLM に送る前に要約する
SEARCH=$(infsh app run tavily/search-assistant --input '{"query": "..."}')

# 長すぎる場合は、まず要約する
SUMMARY=$(infsh app run openrouter/claude-haiku-45 --input "{
  \"prompt\": \"Summarize these search results in bullet points: $SEARCH\"
}")

# その後、要約を分析に使用する
infsh app run openrouter/claude-sonnet-45 --input "{
  \"prompt\": \"Based on this research summary, provide insights: $SUMMARY\"
}"

3. ソースの帰属

常に LLM にソースを引用するように依頼します。

infsh app run openrouter/claude-sonnet-45 --input '{
  "prompt": "... 常に [ソース名](URL) の形式でソースを引用してください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

AI RAG Pipeline

AI RAG Pipeline

Build RAG (Retrieval Augmented Generation) pipelines via inference.sh CLI.

Quick Start

curl -fsSL https://cli.inference.sh | sh && infsh login

# Simple RAG: Search + LLM
SEARCH=$(infsh app run tavily/search-assistant --input '{"query": "latest AI developments 2024"}')
infsh app run openrouter/claude-sonnet-45 --input "{
  \"prompt\": \"Based on this research, summarize the key trends: $SEARCH\"
}"

What is RAG?

RAG combines:

  1. Retrieval: Fetch relevant information from external sources
  2. Augmentation: Add retrieved context to the prompt
  3. Generation: LLM generates response using the context

This produces more accurate, up-to-date, and verifiable AI responses.

RAG Pipeline Patterns

Pattern 1: Simple Search + Answer

[User Query] -> [Web Search] -> [LLM with Context] -> [Answer]

Pattern 2: Multi-Source Research

[Query] -> [Multiple Searches] -> [Aggregate] -> [LLM Analysis] -> [Report]

Pattern 3: Extract + Process

[URLs] -> [Content Extraction] -> [Chunking] -> [LLM Summary] -> [Output]

Available Tools

Search Tools

Tool App ID Best For
Tavily Search tavily/search-assistant AI-powered search with answers
Exa Search exa/search Neural search, semantic matching
Exa Answer exa/answer Direct factual answers

Extraction Tools

Tool App ID Best For
Tavily Extract tavily/extract Clean content from URLs
Exa Extract exa/extract Analyze web content

LLM Tools

Model App ID Best For
Claude Sonnet 4.5 openrouter/claude-sonnet-45 Complex analysis
Claude Haiku 4.5 openrouter/claude-haiku-45 Fast processing
GPT-4o openrouter/gpt-4o General purpose
Gemini 2.5 Pro openrouter/gemini-25-pro Long context

Pipeline Examples

Basic RAG Pipeline

# 1. Search for information
SEARCH_RESULT=$(infsh app run tavily/search-assistant --input '{
  "query": "What are the latest breakthroughs in quantum computing 2024?"
}')

# 2. Generate grounded response
infsh app run openrouter/claude-sonnet-45 --input "{
  \"prompt\": \"You are a research assistant. Based on the following search results, provide a comprehensive summary with citations.

Search Results:
$SEARCH_RESULT

Provide a well-structured summary with source citations.\"
}"

Multi-Source Research

# Search multiple sources
TAVILY=$(infsh app run tavily/search-assistant --input '{"query": "electric vehicle market trends 2024"}')
EXA=$(infsh app run exa/search --input '{"query": "EV market analysis latest reports"}')

# Combine and analyze
infsh app run openrouter/claude-sonnet-45 --input "{
  \"prompt\": \"Analyze these research results and identify common themes and contradictions.

Source 1 (Tavily):
$TAVILY

Source 2 (Exa):
$EXA

Provide a balanced analysis with sources.\"
}"

URL Content Analysis

# 1. Extract content from specific URLs
CONTENT=$(infsh app run tavily/extract --input '{
  "urls": [
    "https://example.com/research-paper",
    "https://example.com/industry-report"
  ]
}')

# 2. Analyze extracted content
infsh app run openrouter/claude-sonnet-45 --input "{
  \"prompt\": \"Analyze these documents and extract key insights:

$CONTENT

Provide:
1. Key findings
2. Data points
3. Recommendations\"
}"

Fact-Checking Pipeline

# Claim to verify
CLAIM="AI will replace 50% of jobs by 2030"

# 1. Search for evidence
EVIDENCE=$(infsh app run tavily/search-assistant --input "{
  \"query\": \"$CLAIM evidence studies research\"
}")

# 2. Verify claim
infsh app run openrouter/claude-sonnet-45 --input "{
  \"prompt\": \"Fact-check this claim: '$CLAIM'

Based on the following evidence:
$EVIDENCE

Provide:
1. Verdict (True/False/Partially True/Unverified)
2. Supporting evidence
3. Contradicting evidence
4. Sources\"
}"

Research Report Generator

TOPIC="Impact of generative AI on creative industries"

# 1. Initial research
OVERVIEW=$(infsh app run tavily/search-assistant --input "{\"query\": \"$TOPIC overview\"}")
STATISTICS=$(infsh app run exa/search --input "{\"query\": \"$TOPIC statistics data\"}")
OPINIONS=$(infsh app run tavily/search-assistant --input "{\"query\": \"$TOPIC expert opinions\"}")

# 2. Generate comprehensive report
infsh app run openrouter/claude-sonnet-45 --input "{
  \"prompt\": \"Generate a comprehensive research report on: $TOPIC

Research Data:
== Overview ==
$OVERVIEW

== Statistics ==
$STATISTICS

== Expert Opinions ==
$OPINIONS

Format as a professional report with:
- Executive Summary
- Key Findings
- Data Analysis
- Expert Perspectives
- Conclusion
- Sources\"
}"

Quick Answer with Sources

# Use Exa Answer for direct factual questions
infsh app run exa/answer --input '{
  "question": "What is the current market cap of NVIDIA?"
}'

Best Practices

1. Query Optimization

# Bad: Too vague
"AI news"

# Good: Specific and contextual
"latest developments in large language models January 2024"

2. Context Management

# Summarize long search results before sending to LLM
SEARCH=$(infsh app run tavily/search-assistant --input '{"query": "..."}')

# If too long, summarize first
SUMMARY=$(infsh app run openrouter/claude-haiku-45 --input "{
  \"prompt\": \"Summarize these search results in bullet points: $SEARCH\"
}")

# Then use summary for analysis
infsh app run openrouter/claude-sonnet-45 --input "{
  \"prompt\": \"Based on this research summary, provide insights: $SUMMARY\"
}"

3. Source Attribution

Always ask the LLM to cite sources:

infsh app run openrouter/claude-sonnet-45 --input '{
  "prompt": "... Always cite sources in [Source Name](URL) format."
}'

4. Iterative Research

# First pass: broad search
INITIAL=$(infsh app run tavily/search-assistant --input '{"query": "topic overview"}')

# Second pass: dive deeper based on findings
DEEP=$(infsh app run tavily/search-assistant --input '{"query": "specific aspect from initial search"}')

Pipeline Templates

Agent Research Tool

#!/bin/bash
# research.sh - Reusable research function

research() {
  local query="$1"

  # Search
  local results=$(infsh app run tavily/search-assistant --input "{\"query\": \"$query\"}")

  # Analyze
  infsh app run openrouter/claude-haiku-45 --input "{
    \"prompt\": \"Summarize: $results\"
  }"
}

research "your query here"

Related Skills

# Web search tools
npx skills add inferencesh/skills@web-search

# LLM models
npx skills add inferencesh/skills@llm-models

# Content pipelines
npx skills add inferencesh/skills@ai-content-pipeline

# Full platform skill
npx skills add inferencesh/skills@inference-sh

Browse all apps: infsh app list

Documentation