rag-architect
Use when the user asks to design RAG pipelines, optimize retrieval strategies, choose embedding models, implement vector search, or build knowledge retrieval systems.
What this skill does
# RAG Architect - POWERFUL ## Overview The RAG (Retrieval-Augmented Generation) Architect skill provides comprehensive tools and knowledge for designing, implementing, and optimizing production-grade RAG pipelines. This skill covers the entire RAG ecosystem from document chunking strategies to evaluation frameworks, enabling you to build scalable, efficient, and accurate retrieval systems. ## Core Competencies ### 1. Document Processing & Chunking Strategies #### Fixed-Size Chunking - **Character-based chunking**: Simple splitting by character count (e.g., 512, 1024, 2048 chars) - **Token-based chunking**: Splitting by token count to respect model limits - **Overlap strategies**: 10-20% overlap to maintain context continuity - **Pros**: Predictable chunk sizes, simple implementation, consistent processing time - **Cons**: May break semantic units, context boundaries ignored - **Best for**: Uniform documents, when consistent chunk sizes are critical #### Sentence-Based Chunking - **Sentence boundary detection**: Using NLTK, spaCy, or regex patterns - **Sentence grouping**: Combining sentences until size threshold is reached - **Paragraph preservation**: Avoiding mid-paragraph splits when possible - **Pros**: Preserves natural language boundaries, better readability - **Cons**: Variable chunk sizes, potential for very short/long chunks - **Best for**: Narrative text, articles, books #### Paragraph-Based Chunking - **Paragraph detection**: Double newlines, HTML tags, markdown formatting - **Hierarchical splitting**: Respecting document structure (sections, subsections) - **Size balancing**: Merging small paragraphs, splitting large ones - **Pros**: Preserves logical document structure, maintains topic coherence - **Cons**: Highly variable sizes, may create very large chunks - **Best for**: Structured documents, technical documentation #### Semantic Chunking - **Topic modeling**: Using TF-IDF, embeddings similarity for topic detection - **Heading-aware splitting**: Respecting document hierarchy (H1, H2, H3) - **Content-based boundaries**: Detecting topic shifts using semantic similarity - **Pros**: Maintains semantic coherence, respects document structure - **Cons**: Complex implementation, computationally expensive - **Best for**: Long-form content, technical manuals, research papers #### Recursive Chunking - **Hierarchical approach**: Try larger chunks first, recursively split if needed - **Multi-level splitting**: Different strategies at different levels - **Size optimization**: Minimize number of chunks while respecting size limits - **Pros**: Optimal chunk utilization, preserves context when possible - **Cons**: Complex logic, potential performance overhead - **Best for**: Mixed content types, when chunk count optimization is important #### Document-Aware Chunking - **File type detection**: PDF pages, Word sections, HTML elements - **Metadata preservation**: Headers, footers, page numbers, sections - **Table and image handling**: Special processing for non-text elements - **Pros**: Preserves document structure and metadata - **Cons**: Format-specific implementation required - **Best for**: Multi-format document collections, when metadata is important ### 2. Embedding Model Selection #### Dimension Considerations - **128-256 dimensions**: Fast retrieval, lower memory usage, suitable for simple domains - **512-768 dimensions**: Balanced performance, good for most applications - **1024-1536 dimensions**: High quality, better for complex domains, higher cost - **2048+ dimensions**: Maximum quality, specialized use cases, significant resources #### Speed vs Quality Tradeoffs - **Fast models**: sentence-transformers/all-MiniLM-L6-v2 (384 dim, ~14k tokens/sec) - **Balanced models**: sentence-transformers/all-mpnet-base-v2 (768 dim, ~2.8k tokens/sec) - **Quality models**: text-embedding-ada-002 (1536 dim, OpenAI API) - **Specialized models**: Domain-specific fine-tuned models #### Model Categories - **General purpose**: all-MiniLM, all-mpnet, Universal Sentence Encoder - **Code embeddings**: CodeBERT, GraphCodeBERT, CodeT5 - **Scientific text**: SciBERT, BioBERT, ClinicalBERT - **Multilingual**: LaBSE, multilingual-e5, paraphrase-multilingual ### 3. Vector Database Selection #### Pinecone - **Managed service**: Fully hosted, auto-scaling - **Features**: Metadata filtering, hybrid search, real-time updates - **Pricing**: $70/month for 1M vectors (1536 dim), pay-per-use scaling - **Best for**: Production applications, when managed service is preferred - **Cons**: Vendor lock-in, costs can scale quickly #### Weaviate - **Open source**: Self-hosted or cloud options available - **Features**: GraphQL API, multi-modal search, automatic vectorization - **Scaling**: Horizontal scaling, HNSW indexing - **Best for**: Complex data types, when GraphQL API is preferred - **Cons**: Learning curve, requires infrastructure management #### Qdrant - **Rust-based**: High performance, low memory footprint - **Features**: Payload filtering, clustering, distributed deployment - **API**: REST and gRPC interfaces - **Best for**: High-performance requirements, resource-constrained environments - **Cons**: Smaller community, fewer integrations #### Chroma - **Embedded database**: SQLite-based, easy local development - **Features**: Collections, metadata filtering, persistence - **Scaling**: Limited, suitable for prototyping and small deployments - **Best for**: Development, testing, small-scale applications - **Cons**: Not suitable for production scale #### pgvector (PostgreSQL) - **SQL integration**: Leverage existing PostgreSQL infrastructure - **Features**: ACID compliance, joins with relational data, mature ecosystem - **Performance**: ivfflat and HNSW indexing, parallel query processing - **Best for**: When you already use PostgreSQL, need ACID compliance - **Cons**: Requires PostgreSQL expertise, less specialized than purpose-built DBs ### 4. Retrieval Strategies #### Dense Retrieval - **Semantic similarity**: Using embedding cosine similarity - **Advantages**: Captures semantic meaning, handles paraphrasing well - **Limitations**: May miss exact keyword matches, requires good embeddings - **Implementation**: Vector similarity search with k-NN or ANN algorithms #### Sparse Retrieval - **Keyword-based**: TF-IDF, BM25, Elasticsearch - **Advantages**: Exact keyword matching, interpretable results - **Limitations**: Misses semantic similarity, vulnerable to vocabulary mismatch - **Implementation**: Inverted indexes, term frequency analysis #### Hybrid Retrieval - **Combination approach**: Dense + sparse retrieval with score fusion - **Fusion strategies**: Reciprocal Rank Fusion (RRF), weighted combination - **Benefits**: Combines semantic understanding with exact matching - **Complexity**: Requires tuning fusion weights, more complex infrastructure #### Reranking - **Two-stage approach**: Initial retrieval followed by reranking - **Reranking models**: Cross-encoders, specialized reranking transformers - **Benefits**: Higher precision, can use more sophisticated models for final ranking - **Tradeoff**: Additional latency, computational cost ### 5. Query Transformation Techniques #### HyDE (Hypothetical Document Embeddings) - **Approach**: Generate hypothetical answer, embed answer instead of query - **Benefits**: Improves retrieval by matching document style rather than query style - **Implementation**: Use LLM to generate hypothetical document, embed that - **Use cases**: When queries and documents have different styles #### Multi-Query Generation - **Approach**: Generate multiple query variations, retrieve for each, merge results - **Benefits**: Increases recall, handles query ambiguity - **Implementation**: LLM generates 3-5 query variations, deduplicate results - **Considerations**: Higher cost and latency due to multiple retrievals #### Step-Back Prompting - **Approach**: Generate broader, more general version of specific query - **Benefits**: Re
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.