
RAG Designer
End-to-end RAG that returns grounded answers — semantic chunking, hybrid retrieval + re-rank, grounded generation, separate eval. Retrieval-first. A comprehensive skill.
v1.0.0 · ~969 tokens · ⬇ 0 · Updated July 6, 2026
What it does
A comprehensive RAG design skill covering every stage: meaning-based chunking with metadata, embedding + hybrid (dense+keyword) indexing, retrieval with re-ranking and permission filtering, grounded-and-cited generation that refuses to answer beyond context, and separate retrieval vs generation evaluation on a real question set. Core insight: most RAG failures are retrieval misses, not prompt problems — debug there first.
Example uses
Design a RAG pipeline end-to-end
You are building chat-over-docs for the first time and want every stage decided deliberately instead of copied from a tutorial.
Design a RAG pipeline for our internal engineering wiki: about 4,000 Markdown pages with code blocks and tables, Postgres with pgvector, and every answer must cite its source page. Walk me through the chunking strategy (the docs have deep heading hierarchies), whether I need hybrid dense-plus-keyword retrieval given all the exact error strings people search for, re-ranking, and a generation prompt that refuses to answer beyond the retrieved context.Debug wrong RAG answers
Your RAG system returns confident answers that are not in the documents, and prompt tweaks have not fixed it.
Our support RAG bot answered "refunds take 3 days" when the policy doc says 14 — so the right chunk was either never indexed or never retrieved. Diagnose stage by stage before touching the prompt: build a small retrieval eval from 20 real customer questions with the known correct document for each, measure hit rate at k, and tell me whether the failure is chunking, retrieval, or generation — with the fix for that stage.Add permission-aware retrieval
Your RAG search spans documents with mixed access levels and you cannot risk leaking restricted content into answers.
We are adding RAG search across HR documents, customer contracts, and public help articles in one index. Design the metadata schema and query-time permission filtering so a user can never retrieve a document their role cannot see — enforced in retrieval, not in the prompt — plus a test plan that proves a sales rep query never surfaces HR content, even when it is the closest semantic match.Install
# 1. Create the skill folder in your Claude setup mkdir -p ~/.claude/skills/rag-designer # 2. Download SKILL.md into it (or move the file you just downloaded) # → ~/.claude/skills/rag-designer/SKILL.md # 3. Claude Code auto-discovers it on next launch.
Inside the skill
--- name: rag-designer description: Design a retrieval-augmented generation (RAG) system that actually returns grounded, correct answers — chunking, embeddings, retrieval, generation, and evaluation. Use when building RAG/search-over-docs, when a RAG system gives wrong or ungrounded answers, or asked "design a RAG pipeline", "why is my RAG bad", "chat over my documents". A comprehensive, end-to-end skill. --- # RAG Designer Most RAG systems fail not at the LLM but at retrieval: if the right chunk isn't retrieved, no prompt saves the answer. Design each stage deliberately, and measure retrieval separately from generation. ## 1 — Ingestion & chunking (where most quality is won or lost) - **Chunk by meaning, not by fixed character count.** Split on structure (headings, sections, paragraphs, code blocks) so a chunk is a coherent unit. A chunk cut mid-sentence retrieves poorly. - **Right size**: big enough to hold a complete thought, small enough to be specific. Overlap chunks slightly so a fact spanning a boundary isn't lost. - **Attach metadata**: source, section, title, date, permissions — you'll filter and cite with it. - **Preserve structure**: tables, lists, code often need special handling; flattening them to prose loses meaning. ## 2 — Embedding & indexing - Pick an embedding model suited to the domain and language; be consistent (query and docs embedded by the SAME model). - Store vectors + the metadata + the original text. You return the text, not the vector. - Consider hybrid: dense (semantic) + sparse/keyword (BM25) — pure vector search misses exact terms (names, codes, error strings); keyword catches those. Hybrid beats either alone on most corpora. ## 3 — Retrieval (the make-or-break stage) - Retrieve top-k, then **re-rank** (a cross-encoder or the LLM) — first-pass vector recall is broad; re-ranking gets the truly relevant to the top. - **Filter by metadata** (recency, source, the user's permissions — never retrieve a doc the user can't see; RAG is an access-control surface). - Tune k: too few misses context, too many buries the answer in noise and burns tokens. - If retrieval quality is bad, the whole system is bad — fix here before touching the prompt. ## 4 — Generation (grounded, honest) - Instruct the model to answer ONLY from the retrieved context, and to say "I don't know / not in the provided documents" when the answer isn't there. This is the anti-hallucination core. - **Cite sources**: have it point to which chunk/document each claim came from — grounding you can verify. - Pass enough context, in a clear structure, with the question. Don't dump 20 chunks; pass the re-ranked best. ## 5 — Evaluate (separately, or you're flying blind) - **Retrieval metrics**: for a set of test questions with known relevant docs, measure hit rate / recall@k. If the right doc isn't retrieved, generation can't recover — this is where to debug first. - **Generation metrics**: faithfulness (is the answer grounded in the retrieved context, no invention?), answer relevance, and does it correctly say "don't know" when it should? - Build a small eval set of real questions early; iterate against it, not against one demo query. ## Rules - Diagnose retrieval before generation — a wrong answer is usually a retrieval miss, not a prompt problem. - Ground and cite; the model must refuse to answer beyond the retrieved context. - Respect permissions in retrieval — RAG can leak documents a user shouldn't see. - Evaluate retrieval and generation separately, on a real question set, or you can't improve anything. ## Output The pipeline design stage by stage (chunking strategy, embedding + index choice, retrieval + re-rank + filtering, generation prompt, eval plan), the key decisions with reasons, and — if debugging an existing RAG — which stage is failing (with how you'd confirm) and the fix.
Changelog
- v1.0.02026-07-03Initial clean-room write.
Frequently asked questions
Is RAG Designer free?
Yes. RAG Designer is free to download and MIT-licensed.
Where do I install RAG Designer?
Place the SKILL.md file in ~/.claude/skills/rag-designer/ and Claude Code auto-discovers it on next launch.
How many tokens does RAG Designer use?
About 969 tokens — it is designed to be token-lean.

We're developers and SaaS builders who use these tools daily in production. Every review comes from hands-on experience building real products — DealPropFirm, ThePlanetIndicator, PropFirmsCodes, and many more. We don't just review tools — we build and ship with them every day.
Written and tested by developers who build with these tools daily.