Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

RAG Engineering — Complete Retrieval-Augmented Generation System

БесплатноБез исполняемых скриптовНе проверен

You are an expert RAG engineer. When the user needs to build, optimize, or debug a RAG system, follow this complete methodology.

modbenderот modbender★ 21 звезда на GitHub

Об этом скилле

RAG Engineering — Complete Retrieval-Augmented Generation System

Build production RAG systems that actually work. From chunking strategy to evaluation — the complete methodology.

You are an expert RAG engineer. When the user needs to build, optimize, or debug a RAG system, follow this complete methodology.


Phase 1: RAG Architecture Assessment

Quick Health Check (Existing Systems)

Signal Healthy Warning Critical
Answer relevance >85% users satisfied 60-85% <60%
Retrieval precision@5 >70% relevant chunks 40-70% <40%
Hallucination rate <5% 5-15% >15%
Latency (P95) <3s 3-8s >8s
Context utilization >60% of retrieved used 30-60% <30%
Cost per query <$0.05 $0.05-0.20 >$0.20

RAG Project Brief

rag_brief:
  project: "[name]"
  date: "YYYY-MM-DD"

  # What problem are we solving?
  use_case: "[customer support / code search / document Q&A / research / legal / medical]"
  user_persona: "[who asks questions]"
  query_types:
    - factual: "[percentage] — direct fact lookup"
    - analytical: "[percentage] — synthesis across documents"
    - procedural: "[percentage] — how-to, step-by-step"
    - comparative: "[percentage] — compare X vs Y"
    - conversational: "[percentage] — multi-turn follow-ups"

  # What data do we have?
  corpus:
    total_documents: "[count]"
    total_size: "[GB/TB]"
    document_types:
      - type: "[PDF/HTML/markdown/code/JSON/CSV]"
        count: "[count]"
        avg_length: "[pages/tokens]"
    update_frequency: "[static / daily / real-time]"
    languages: ["en", "..."]
    quality: "[curated / mixed / noisy]"

  # Requirements
  accuracy_target: "[% — start with 85%]"
  latency_target: "[ms P95]"
    max_cost_per_query: "[$]"
  scale: "[queries/day]"
  multi_turn: "[yes/no]"
  citations_required: "[yes/no]"

  # Constraints
  deployment: "[cloud / on-prem / hybrid]"
  data_sensitivity: "[public / internal / PII / regulated]"
  budget: "[$/month for infrastructure]"

RAG Architecture Decision Tree

Is your corpus < 100 documents AND < 50 pages each?
├─ YES → Consider full-context stuffing (no RAG needed)
│        Use: Long-context model (Gemini 1M, Claude 200K)
│        When: Static docs, low query volume, budget allows
│
└─ NO → RAG is appropriate
         │
         Is real-time freshness critical?
         ├─ YES → Streaming RAG with incremental indexing
         └─ NO → Batch-indexed RAG
                  │
                  Do queries need multi-step reasoning?
                  ├─ YES → Agentic RAG (query planning + tool use)
                  └─ NO → Standard retrieval pipeline
                           │
                           Single document type?
                           ├─ YES → Single-index RAG
                           └─ NO → Multi-index with routing

Architecture Patterns

Pattern Use Case Complexity Quality
Naive RAG Simple Q&A, prototypes Low Medium
Advanced RAG Production systems Medium High
Modular RAG Complex multi-source High Highest
Agentic RAG Multi-step research Highest Highest
Graph RAG Entity-heavy domains High High for relational queries
Hybrid RAG Mixed query types Medium-High High

Phase 2: Data Ingestion & Preprocessing

Document Processing Pipeline

Raw Documents → Extraction → Cleaning → Enrichment → Chunking → Embedding → Indexing

Extraction Strategy by Document Type

Document Type Extraction Tool Key Challenges Quality Tips
PDF PyMuPDF, Unstructured, Docling Tables, images, multi-column Use layout-aware parser; OCR for scanned
HTML BeautifulSoup, Trafilatura Boilerplate, navigation Extract main content only; preserve headers
Markdown Direct parse Minimal Preserve structure; handle frontmatter
Code Tree-sitter, AST Context loss Include file path + imports as metadata
CSV/JSON pandas, jq Schema understanding Convert rows to natural language
DOCX/PPTX python-docx, python-pptx Formatting, embedded media Extract text + table structure
Images GPT-4V, Claude Vision OCR accuracy Generate text descriptions; store as metadata
Audio/Video Whisper, Assembly Timestamps, speakers Chunk by speaker turn or topic segment

Cleaning Checklist

  • Remove headers/footers/page numbers (PDF artifacts)
  • Normalize whitespace (collapse multiple spaces/newlines)
  • Fix encoding issues (UTF-8 normalize)
  • Remove boilerplate (disclaimers, repeated navigation)
  • Preserve meaningful formatting (tables, lists, code blocks
Полный SKILL.md на GitHub

Установить RAG Engineering — Complete Retrieval-Augmented Generation System в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

README.md

FAQ

Что делает скилл RAG Engineering — Complete Retrieval-Augmented Generation System?

You are an expert RAG engineer. When the user needs to build, optimize, or debug a RAG system, follow this complete methodology.

Как установить скилл RAG Engineering — Complete Retrieval-Augmented Generation System?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл RAG Engineering — Complete Retrieval-Augmented Generation System запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить RAG Engineering — Complete Retrieval-Augmented Generation System с