RD
RAG Design Doc
🔵 Stable🕐 updated 2026-06-24
🔷 SkillSpec L3
pm-ai
Design a Retrieval-Augmented Generation system end to end. Use when asked to design a RAG pipeline, a 'chat with your docs' feature, a knowledge assistant, or to debug why a RAG system gives wrong/ungrounded answers. Produces a RAG design doc — ingestion & chunking, embeddings & index, retrieval & reranking, the generation prompt, grounding/citations, evaluation, and failure modes with mitigations.
What to give it
▸Corpus — what's being retrieved over (docs, tickets, code, tables), size, and update frequency.
▸Queries — the kinds of questions users ask, and how precise/recall-sensitive they are.
▸Grounding requirement — must answers cite sources? Is "I don't know" acceptable (it should be)?
▸Constraints — latency budget, cost, privacy/tenancy (per-customer isolation?), and freshness needs.
✅ The bar it holds itself to
Every skill in this library self-verifies — these are this skill's own quality checks, straight from its definition.
✓Retrieval quality is evaluated **separately** from answer quality (you can't fix what you can't isolate)
✓The system can say "I don't know" when context is insufficient — it's not forced to answer
✓Answers carry citations that are verified against the retrieved context
✓Chunking strategy and size are justified against the corpus structure, not copied from a tutorial
✓Per-tenant / permission isolation is handled in retrieval, not just at the UI
✓Hybrid (keyword + vector) retrieval is considered for queries with exact terms/IDs
⚠️ What it refuses to do
Do not jump to "fine-tune the model" when retrieval is the problem — fix what's retrieved first
Do not evaluate only the final answer — a good answer from luck and a bad answer from bad retrieval look different and need different fixes
Do not force an answer when nothing relevant was retrieved — an honest "I don't know" beats a confident hallucination
Do not ignore metadata filtering — semantic similarity will happily return the right-sounding chunk from the wrong document or wrong tenant
Do not pick a chunk size by default — it's the single biggest lever on retrieval quality
Install
npx pm-claude-skills add --agent claude # or codex · cursor · gemini · hermes
# or one-line MCP (every skill, any client):
claude mcp add pm-skills -- npx -y pm-claude-skills-mcp
Related skills
🔌 Embed this skill
Drop this on your blog, docs, or site — it renders a "Run this skill" card:
<div data-pm-skill="rag-design-doc"></div>
<script src="https://mohitagw15856.github.io/pm-claude-skills/embed.js" async></script>
💬 Discussion
RAG Design Doc is one of 591 open-source professional AI agent skills — all SkillSpec L3.
Try them all in the browser · ⭐ Star on GitHub · Browse the full catalog