Command Palette

Search for a command to run...

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

rag-agent-builder

БесплатноЗапускает вложенные скриптыНе проверен

Build Retrieval-Augmented Generation (RAG) applications that combine LLM capabilities with external knowledge sources. Covers vector databases, embeddings…

qodex-aiот qodex-ai★ 50 звёзд на GitHub

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

RAG Agent Builder

Build powerful Retrieval-Augmented Generation (RAG) applications that enhance LLM capabilities with external knowledge sources, enabling accurate, contextualized AI responses.

Quick Start

Get started with RAG implementations in the examples and utilities:

Overview

RAG systems combine three key components:

  1. Document Retrieval - Find relevant information from knowledge bases
  2. Context Integration - Pass retrieved context to the LLM
  3. Response Generation - Generate answers grounded in the retrieved information

This skill covers building production-ready RAG applications with various frameworks and approaches.

Core Concepts

What is RAG?

RAG augments LLM knowledge with external data:

  • Without RAG: LLM relies on training data (may be outdated or limited)
  • With RAG: LLM uses real-time, custom knowledge + training knowledge

When to Use RAG

  • Document Q&A: Answer questions about PDFs, books, reports
  • Knowledge Base Search: Query internal documentation, wikis
  • Enterprise Search: Search proprietary company data
  • Context-Specific Assistants: Customer support, HR assistants
  • Fact-Heavy Applications: Legal docs, medical records, financial data

When RAG Might Not Be Needed

  • General knowledge questions (ChatGPT-like)
  • Real-time data that changes constantly (use tools instead)
  • Very simple lookup tasks (use database queries)

Architecture Patterns

Basic RAG Pipeline

Documents → Chunks → Embeddings → Vector DB
                                        ↓
User Question → Embedding → Retrieval → LLM → Answer
                              ↑         ↓
                         Vector DB    Context

Advanced RAG Patterns

1. Agentic RAG

  • Agent decides what to retrieve and when
  • Can refine queries iteratively
  • Better for complex reasoning

2. Hierarchical RAG

  • Multi-level document structure
  • Search at different levels of detail
  • More flexible organization

3. Hybrid Search RAG

  • Combines keyword search (BM25) + semantic search (embeddings)
  • Captures both exact matches and meaning
  • Better for mixed query types

4. Corrective RAG (CRAG)

  • Evaluates retrieved documents for relevance
  • Retrieves additional sources if needed
  • Ensures high-quality context

Implementation Components

1. Document Processing

Chunking Strategies:

# Simple fixed-size chunks
chunks = split_text(doc, chunk_size=1000, overlap=100)

# Semantic chunks (group by meaning)
chunks = semantic_chunking(doc, max_tokens=512)

# Hierarchical chunks (different levels)
chapters = split_by_heading(doc)
chunks = split_each_chapter(chapters, size=1000)

Key Considerations:

  • Chunk size affects retrieval quality and cost
  • Overlap helps maintain context between chunks
  • Semantic chunking preserves meaning better

2. Embedding Generation

Popular Embedding Models:

  • OpenAI: text-embedding-3-small, text-embedding-3-large
  • Open Source: all-MiniLM-L6-v2, all-mpnet-base-v2
  • Domain-Specific: Domain-trained embeddings for specialized knowledge

Best Practices:

  • Use consistent embedding model for retrieval and queries
  • Store embeddings with normalized vectors
  • Update embeddings when documents change

3. Vector Databases

Popular Options:

  • Pinecone: Managed, serverless, easy to scale
  • Weaviate: Open-source, self-hosted, flexible
  • Milvus: Open-source, high performance
  • Chroma: Lightweight, good for prototypes
  • Qdrant: Production-grade, high-performance

Selection Criteria:

  • Scale requirements (data volume, queries per second)
  • Latency needs (real-time vs batch)
  • Cost considerations
  • Deployment preferences (managed vs self-hosted)

4. Retrieval Strategies

Retrieval Methods:

# Similarity search (most common)
results = vector_db.query(question_embedding, k=5)

# Hybrid search (keyword + semantic)
keyword_results = bm25.search(question, k=3)
semantic_results = vector_db.query(embedding, k=3)
results = combine_and_rank(keyword_results, semantic_results)

# Reranking (improve relevance)
retrieved = initial_retrieval(query)
reranked = rerank_by_relevance(retrieved, query)
`
Полный SKILL.md на GitHub

Установить rag-agent-builder в Claude Code и Claude Desktop

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

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

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

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

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

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

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

README.mdexamples/agentic_rag.pyexamples/basic_rag.pyexamples/retrieval_strategies.pyscripts/embedding_management.pyscripts/rag_evaluation.pyscripts/vector_db_manager.py

FAQ

Что делает скилл rag-agent-builder?

Build Retrieval-Augmented Generation (RAG) applications that combine LLM capabilities with external knowledge sources. Covers vector databases, embeddings, retrieval strategies, and response generation. Use when building document Q&A systems, knowledge base applications, enterprise search, or combining LLMs with custom data.

Как установить скилл rag-agent-builder?

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

Скилл rag-agent-builder запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

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

Сравнить rag-agent-builder с