rag-implementation
What it does
This skill guides your AI through building search over your own documents that feeds results into a language model. It is for developers who want accurate answers grounded in their data.
When to use it
- ✓When you are building a system that answers questions from your own documents.
- ✓When your current search returns poor results and you need better chunking or hybrid search.
- ✓When you want to decide whether retrieval is needed at all, since it adds latency and cost.
Skill link
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/ai-research/rag-implementation/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you help me improve the search in my document chatbot because it keeps returning irrelevant sections?”
5 new skills a week. 1 minute to read.
How it works
The skill reviews how documents are chunked, embedded, stored, and retrieved. It recommends fixes such as overlap between chunks, hybrid dense and keyword search, and reranking.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
RAG Implementation
You're a RAG specialist who has built systems serving millions of queries over terabytes of documents. You've seen the naive "chunk and embed" approach fail, and developed sophisticated chunking, retrieval, and reranking strategies.
You understand that RAG is not just vector search—it's about getting the right information to the LLM at the right time. You know when RAG helps and when it's unnecessary overhead.
Your core principles:
- Chunking is critical—bad chunks mean bad retrieval
- Hybri
Capabilities
- document-chunking
- embedding-models
- vector-stores
- retrieval-strategies
- hybrid-search
- reranking
Patterns
Semantic Chunking
Chunk by meaning, not arbitrary size
Hybrid Search
Combine dense (vector) and sparse (keyword) search
Contextual Reranking
Rerank retrieved docs with LLM for relevance
Anti-Patterns
❌ Fixed-Size Chunking
❌ No Overlap
❌ Single Retrieval Strategy
⚠️ Sharp Edges
| Issue | Severity | Solution |
|---|---|---|
| Poor chunking ruins retrieval quality | critical | // Use recursive character text splitter with overlap |
| Query and document embeddings from different models | critical | // Ensure consistent embedding model usage |
| RAG adds significant latency to responses | high | // Optimize RAG latency |
| Documents updated but embeddings not refreshed | medium | // Maintain sync between documents and embeddings |
Related Skills
Works well with: context-window-management, conversation-memory, prompt-caching, data-pipeline
FAQ
What is hybrid search?
It combines vector search, which finds similar meaning, with keyword search, which finds exact terms.
Why does chunking matter?
The guidance says bad chunks lead to bad retrieval, so splitting by meaning or sections usually works better than fixed sizes.
Does every app need RAG?
No. The guidance says to check whether retrieval is worth the extra latency and overhead first.
Details
Original description by the author
Retrieval-Augmented Generation patterns including chunking, embeddings, vector stores, and retrieval optimization Use when: rag, retrieval augmented, vector search, embeddings, semantic search.
Popularity
- GitHub stars
- 33k
- Ranking position
- #8615
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
owasp-security
33kTeaches your agent OWASP security guidance for web apps, APIs, mobile, containers and AI agents, so it can spot common weaknesses and suggest fixes.
agent-management
33kLets your agent create, list, hibernate, wake, rename and delete AI agents using the AI Maestro command line, managing each agent's lifecycle.
agent-messaging
33kLets your agent send, receive and reply to signed messages between AI agents, using the Agent Messaging Protocol, mostly on your own machine.
docs-search
33kLets your agent search auto-generated code documentation for function signatures, class definitions and comments, so it checks the real API before changing code.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.