Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

rag-pipeline-builderRAG pipeline 构建器

Agent Skill

用于搭建或维护带检索增强的 RAG 工作流,适合让 Agent 处理知识库问答、向量检索、来源引用和事实核查。它可以辅助整理数据接入、Embedding、向量库、召回参数和回答生成流程。使用时需要确认数据来源、更新频率、召回阈值和引用展示方式,避免把未命中的资料或过期内容包装成确定事实。

总安装

17,422

周安装

817

GitHub Stars

3

下载量

6,817
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:rag-pipeline-builder(RAG pipeline 构建器)
来源仓库:https://github.com/jmsktm/claude-settings
仓库路径:skills/rag-pipeline-builder
安装命令:
npx skills add https://github.com/jmsktm/claude-settings --skill 'RAG Pipeline Builder'
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jmsktm/claude-settings --skill 'RAG Pipeline Builder'

简介

rag-pipeline-builder 用于搭建或维护带检索增强的 RAG 工作流,支持知识库问答、向量检索和事实核查。

  • 适用于客服问答、内部文档查询和智能助手知识更新。
  • 可配置数据源接入、Embedding 模型和召回阈值参数。
  • 安装命令:npx skills add https://github.com/jmsktm/claude-settings --skill 'RAG Pipeline Builder'。
  • 需明确数据来源时效性和引用展示方式,避免虚构答案。

SKILL.md

RAG Pipeline Builder

The RAG Pipeline Builder skill guides you through designing and implementing Retrieval-Augmented Generation systems that enhance LLM responses with relevant context from your own data. RAG combines the power of large language models with the precision of information retrieval, reducing hallucinations and enabling AI to work with private, current, or domain-specific knowledge.

This skill covers the complete RAG stack: document ingestion, chunking strategies, embedding generation, vector storage, retrieval optimization, context injection, and response generation. It helps you make informed decisions at each stage based on your specific requirements for accuracy, latency, cost, and scale.

Whether you are building a documentation Q&A bot, a customer support system, or an enterprise knowledge assistant, this skill ensures your RAG implementation follows production best practices.

Core Workflows

Workflow 1: Design RAG Architecture

  1. Define requirements:

- Data sources and formats - Query types and patterns - Accuracy requirements - Latency budget - Scale expectations

  1. Choose components:

- Document loaders - Chunking strategy - Embedding model - Vector database - LLM for generation - Reranking layer (optional)

  1. Design data flow: Documents → Loader → Chunker → Embedder → Vector DB ↓ Query → Embedder → Vector Search → Reranker → Context ↓ Context + Query → LLM → Response
  2. Document architecture decisions

Workflow 2: Implement Ingestion Pipeline

  1. Set up document loaders:

- PDF, Markdown, HTML parsers - API connectors for live sources - Incremental update handling

  1. Implement chunking: def smart_chunk(doc, chunk_size=500, overlap=50): # Respect document structure sections = extract_sections(doc) chunks = [] for section in sections: if len(section) > chunk_size: chunks.extend(sliding_window(section, chunk_size, overlap)) else: chunks.append(section) return add_metadata(chunks, doc)
  2. Generate embeddings with batching
  3. Store in vector database with metadata
  4. Verify ingestion quality

Workflow 3: Optimize Retrieval Quality

  1. Measure baseline retrieval performance:

- Recall@k for known queries - Mean Reciprocal Rank (MRR) - Relevance scoring

  1. Apply optimization techniques:

- Query expansion/rewriting - Hybrid search (semantic + keyword) - Reranking with cross-encoders - Metadata filtering

  1. Tune retrieval parameters:

- Number of chunks to retrieve (k) - Similarity threshold - Diversity/MMR settings

  1. Validate improvements with test set

Quick Reference

ActionCommand/Trigger
Design RAG system"Help me design a RAG pipeline for [use case]"
Choose vector DB"Which vector database for RAG"
Optimize chunking"Best chunking strategy for [content type]"
Improve retrieval"My RAG has poor retrieval quality"
Reduce hallucinations"RAG still hallucinating, help fix"
Scale pipeline"Scale RAG to [X] documents"

Best Practices

  • Chunk at Semantic Boundaries: Preserve meaning in chunks

- Good: Split at paragraphs, sections, or topic boundaries - Bad: Fixed-size splits that cut sentences mid-thought - Include section headers as context in chunks

  • Include Rich Metadata: Enable filtering and context

- Source document, section, page number - Timestamps for temporal relevance - Categories, tags, or topics - Use metadata filters before semantic search

  • Use Hybrid Search: Combine semantic and keyword search

- Semantic: Captures meaning and synonyms - Keyword (BM25): Catches exact terms, names, codes - Weight combination based on query type

  • Rerank for Quality: Two-stage retrieval improves precision

- Stage 1: Fast vector search (retrieve 20-50) - Stage 2: Cross-encoder reranking (keep top 5-10) - Reranking is slower but much more accurate

  • Show Your Work: Include citations and sources

- Return source chunks with responses - Enable users to verify and explore - Build trust through transparency

  • Handle Edge Cases: What happens when retrieval fails?

- No relevant results found - Conflicting information in sources - Query outside knowledge base scope - Implement graceful fallbacks

Advanced Techniques

Multi-Index Strategy

Use different indexes for different content types:

Index 1: FAQs (short, self-contained)
Index 2: Documentation (long-form, structured)
Index 3: Conversations (temporal, contextual)

Route queries to appropriate index based on intent

Query Transformation Pipeline

Improve retrieval with query processing:

def transform_query(query):
    # Step 1: Classify query type
    query_type = classify_query(query)

    # Step 2: Extract entities
    entities = extract_entities(query)

    # Step 3: Generate search queries
    if query_type == "factual":
        return generate_keyword_queries(query, entities)
    elif query_type == "conceptual":
        return generate_semantic_queries(query)
    else:
        return [query]  # Use as-is

Contextual Compression

Reduce noise in retrieved context:

Retrieved chunks (verbose) → LLM compressor → Relevant excerpts only

Agentic RAG

Let the LLM control retrieval:

def agentic_rag(query):
    # LLM decides what to search for
    search_plan = llm.plan_searches(query)

    # Execute searches
    results = []
    for search in search_plan:
        results.extend(retriever.search(search.query, filters=search.filters))

    # LLM synthesizes answer
    return llm.synthesize(query, results)

Evaluation Framework

Continuously measure RAG quality:

Metrics:
- Retrieval: Precision@k, Recall@k, MRR
- Generation: Faithfulness, Answer Relevance, Context Utilization
- End-to-end: Task Success Rate, User Satisfaction

Tools: Ragas, TruLens, LangSmith

Common Pitfalls to Avoid

  • Chunking too large (loses specificity) or too small (loses context)
  • Not preserving document structure and hierarchy in chunks
  • Ignoring keyword search when exact matches matter
  • Retrieving too few chunks (missing information) or too many (context dilution)
  • Not handling conflicting information across sources
  • Assuming LLM will always use retrieved context correctly
  • Skipping evaluation and monitoring in production
  • Not updating embeddings when source documents change

适合场景

01

研究助手

02

事实核查

03

知识库问答

04

带来源的搜索总结

能力概览

能力 1

组合搜索和大模型调用

能力 2

支持多来源检索和总结

能力 3

强调引用来源和事实核查

能力 4

适合研究型 Agent 流程

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.78%
按下载量换算2,507

Claude

28.39%
按下载量换算1,935

Cursor

18.27%
按下载量换算1,245

Gemini CLI

8.67%
按下载量换算591

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills