ai-rag-pipeline

inference-sh/skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/inference-sh/skills --skill ai-rag-pipeline
0 commentsdiscussion
summary

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

skill.md

AI RAG Pipeline

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

AI RAG Pipeline

Quick Start

Requires inference.sh CLI (infsh). Install instructions

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

how to use ai-rag-pipeline

How to use ai-rag-pipeline on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add ai-rag-pipeline
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/inference-sh/skills --skill ai-rag-pipeline

The skills CLI fetches ai-rag-pipeline from GitHub repository inference-sh/skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/ai-rag-pipeline

Reload or restart Cursor to activate ai-rag-pipeline. Access the skill through slash commands (e.g., /ai-rag-pipeline) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.631 reviews
  • Yusuf Flores· Dec 20, 2024

    ai-rag-pipeline has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Ganesh Mohane· Dec 8, 2024

    Registry listing for ai-rag-pipeline matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Camila Malhotra· Dec 4, 2024

    ai-rag-pipeline fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Sakshi Patil· Nov 27, 2024

    Keeps context tight: ai-rag-pipeline is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Diego Kapoor· Nov 23, 2024

    ai-rag-pipeline is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Fatima Thomas· Nov 11, 2024

    Solid pick for teams standardizing on skills: ai-rag-pipeline is focused, and the summary matches what you get after install.

  • Yash Thakker· Nov 7, 2024

    ai-rag-pipeline reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Dhruvi Jain· Oct 26, 2024

    We added ai-rag-pipeline from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Chaitanya Patil· Oct 18, 2024

    I recommend ai-rag-pipeline for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Diego Lopez· Oct 14, 2024

    Solid pick for teams standardizing on skills: ai-rag-pipeline is focused, and the summary matches what you get after install.

showing 1-10 of 31

1 / 4