Build RAG systems - embeddings, vector stores, chunking, and retrieval optimization
Build RAG systems with embeddings, vector stores, and chunking for Q&A over documents. Trigger when implementing semantic search or setting up vector databases like Chroma, Pinecone, or Weaviate.
/plugin marketplace add pluginagentmarketplace/custom-plugin-ai-agents/plugin install custom-plugin-ai-agents@pluginagentmarketplace-ai-agentsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/config.yamlassets/schema.jsonreferences/GUIDE.mdreferences/PATTERNS.mdscripts/hybrid_rag_pipeline.pyscripts/validate.pyBuild Retrieval-Augmented Generation systems for grounded responses.
Invoke this skill when:
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
task | string | Yes | RAG goal | - |
vector_db | enum | No | pinecone, weaviate, chroma, pgvector | chroma |
embedding_model | string | No | Embedding model | text-embedding-3-small |
chunk_size | int | No | Chunk size in chars | 1000 |
from langchain_openai import OpenAIEmbeddings
from langchain_chroma import Chroma
from langchain_text_splitters import RecursiveCharacterTextSplitter
# 1. Split documents
splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200)
chunks = splitter.split_documents(documents)
# 2. Create vector store
embeddings = OpenAIEmbeddings(model="text-embedding-3-small")
vectorstore = Chroma.from_documents(chunks, embeddings)
# 3. Retrieve
docs = vectorstore.similarity_search("query", k=5)
| Content Type | Size | Overlap | Rationale |
|---|---|---|---|
| Technical docs | 500-800 | 100 | Preserve code |
| Legal docs | 1000-1500 | 200 | Keep clauses |
| Q&A/FAQ | 200-400 | 50 | Atomic answers |
| Model | Cost/1M tokens |
|---|---|
| text-embedding-3-small | $0.02 |
| text-embedding-3-large | $0.13 |
| Cohere embed-v3 | $0.10 |
| Issue | Solution |
|---|---|
| Irrelevant results | Improve chunking, add reranking |
| Missing context | Increase k, use parent retriever |
| Hallucinations | Add "only use context" prompt |
| Slow retrieval | Add caching, reduce k |
llm-integration - LLM for generationagent-memory - Memory retrievalai-agent-basics - Agentic RAGThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.