rag-design-patterns
Automatically applies when building RAG (Retrieval Augmented Generation) systems. Ensures proper chunking strategies, vector database patterns, embedding management, reranking, and retrieval optimization.
npx skills add majiayu000/claude-skill-registry --skill rag-design-patterns --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# RAG Design Patterns When building Retrieval Augmented Generation systems, follow these patterns for effective, scalable retrieval. **Trigger Keywords**: RAG, retrieval, vector database, embeddings, chunking, vector search, semantic search, reranking, vector store, FAISS, Pinecone, Qdrant, ChromaDB, retrieval augmented **Agent Integration**: Used by `ml-system-architect`, `rag-architect`, `llm-app-engineer`, `performance-and-cost-engineer-llm` ## ✅ Correct Pattern: Document Chunking ```python from typing import List from pydantic import BaseModel, Field class Chunk(BaseModel): """A document chunk with metadata.""" id: str content: str start_char: int end_char: int document_id: str metadata: dict = Field(default_factory=dict) class ChunkingStrategy: """Base class for chunking strategies.""" def chunk(self, text: str, document_id: str) -> List[Chunk]: """Split text into chunks.""" raise NotImplementedError class SemanticChunker(ChunkingStrategy): """Chunk by semantic boundaries (paragraphs, sections).""" def __init__( self, max_chunk_size: int = 512, overlap: int = 50, split_on: List[str] = None ): self.max_chunk_size = max_chunk_size self.overlap = overlap self.split_on = split_on
- ✅ Correct Pattern: Document Chunking
- Vector Database Integration
- Reranking for Improved Precision
- Query Rewriting and Expansion
- Context Assembly for LLM
- ❌ Anti-Patterns
- Best Practices Checklist
- Auto-Apply
- Related Skills
What does the rag-design-patterns skill do?
Automatically applies when building RAG (Retrieval Augmented Generation) systems. Ensures proper chunking strategies, vector database patterns, embedding management, reranking, and retrieval optimization.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill rag-design-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
