Agent skill
rag-system-builder
Build Retrieval-Augmented Generation (RAG) Q&A systems with Claude or OpenAI. Use for creating AI assistants that answer questions from document collections, technical libraries, or knowledge bases.
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/data/documents/rag-system-builder
SKILL.md
Rag System Builder
Overview
This skill creates complete RAG (Retrieval-Augmented Generation) systems that combine semantic search with LLM-powered Q&A. Users can ask natural language questions and receive accurate answers grounded in your document collection.
Quick Start
from sentence_transformers import SentenceTransformer
import anthropic
# Setup
model = SentenceTransformer('all-MiniLM-L6-v2')
client = anthropic.Anthropic()
# Retrieve context (simplified)
query = "What are the safety requirements?"
query_embedding = model.encode(query, normalize_embeddings=True)
# ... search for similar chunks ...
# Generate answer
response = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=1024,
messages=[{"role": "user", "content": f"Context: {context}\n\nQuestion: {query}"}]
)
print(response.content[0].text)
When to Use
- Building AI assistants for technical documentation
- Creating Q&A systems for standards libraries
- Developing chatbots with domain expertise
- Enabling natural language queries over knowledge bases
- Adding AI-powered search to existing document systems
Prerequisites
- Knowledge base with extracted text (see
knowledge-base-builder) - Vector embeddings for semantic search (see
semantic-search-setup) - API key:
ANTHROPIC_API_KEYorOPENAI_API_KEY
Related Skills
knowledge-base-builder- Build the document database firstsemantic-search-setup- Generate vector embeddingspdf/text-extractor- Extract text from PDFsdocument-rag-pipeline- Complete end-to-end pipeline
Version History
- 1.2.0 (2026-01-02): Added Quick Start, Execution Checklist, Error Handling, Metrics sections; updated frontmatter with version, category, related_skills
- 1.1.0 (2025-12-30): Added hybrid search (BM25+vector), reranking, streaming responses
- 1.0.0 (2025-10-15): Initial release with basic RAG implementation
Sub-Skills
- Best Practices
Sub-Skills
- Execution Checklist
- Error Handling
- Metrics
- Dependencies
Sub-Skills
- Architecture
- Step 1: Vector Embeddings Table (+4)
- System Prompt Template (+1)
- 1. Cache Embeddings (+2)
- Example Usage
- Advanced: Hybrid Search (BM25 + Vector)
- Advanced: Reranking
- Streaming Responses
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?