Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/mohitagw15856-rag-design-doc/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 46% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 44% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 115% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 39% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 15% | 0% |
Most RAG systems fail not at generation but at retrieval — the model answers confidently from the wrong chunks. This skill forces the decisions that actually determine quality (chunking, retrieval, reranking, grounding) and pairs each with how you'll evaluate it, so "it hallucinates sometimes" becomes a diagnosable, fixable pipeline.
Ask for these only if they aren't already provided:
1. Goal & non-goals — what questions it answers well, and what it explicitly won't do.
2. Ingestion & chunking
3. Embeddings & index — embedding model + dimension, vector store, and the index/filter strategy (incl. metadata filters and per-tenant isolation).
4. Retrieval — top-k, hybrid (dense + keyword/BM25) vs. pure vector, metadata pre-filtering, and query transformation (rewriting, decomposition, HyDE) if used.
5. Reranking — whether a cross-encoder/reranker narrows the candidate set before generation, and the final context budget.
6. Generation — the prompt template, how retrieved context is formatted, the instruction to answer only from context and say "I don't know" otherwise, and how citations are produced and verified.
7. Evaluation — retrieval metrics (recall@k, MRR) separately from answer quality (faithfulness/groundedness, correctness). Pair with an ai-eval-plan.
8. Failure modes & mitigations — a table: symptom → likely stage → fix.
| Symptom | Likely cause (stage) | Mitigation | |---|---|---| | Confident but wrong | retrieval missed the chunk | hybrid search, better chunking, rerank | | Right doc, wrong detail | chunk too large/small | tune size+overlap, structure-aware split | | Ignores retrieved context | prompt/format | stronger grounding instruction, fewer/cleaner chunks | | Stale answers | index freshness | incremental re-index, timestamp filter |
Retrieval-Augmented Generation practice — hybrid retrieval, reranking, grounded generation, and faithfulness evaluation.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 45,334 | 42,163 | -7% | 1 | 1 | 0% | 8,312 | 7,061 | -15% | 0 | 0 | — |
case-02 | fail→fail | 59,825 | 46,104 | -23% | 1 | 1 | 0% | 8,302 | 7,815 | -6% | 0 | 0 | — |
case-03 | fail→fail | 158,162 | 66,834 | -58% | 1 | 1 | 0% | 8,297 | 7,207 | -13% | 0 | 0 | — |
case-04 | pass→fail | 25,577 | 32,966 | +29% | 1 | 1 | 0% | 4,847 | 5,138 | +6% | 0 | 0 | — |
case-05 | pass→pass | 51,110 | 41,610 | -19% | 1 | 1 | 0% | 4,813 | 6,708 | +39% | 0 | 0 | — |
case-06 | pass→pass | 21,395 | 28,062 | +31% | 1 | 1 | 0% | 3,109 | 5,132 | +65% | 0 | 0 | — |
case-07 | fail→pass | 26,912 | 30,039 | +12% | 1 | 1 | 0% | 3,431 | 4,999 | +46% | 0 | 0 | — |
case-08 | fail→pass | 19,350 | 21,433 | +11% | 1 | 1 | 0% | 2,579 | 3,708 | +44% | 0 | 0 | — |
case-09 | fail→pass | 14,515 | 21,280 | +47% | 1 | 1 | 0% | 2,181 | 4,686 | +115% | 0 | 0 | — |
case-10 | fail→pass | 22,699 | 25,758 | +13% | 1 | 1 | 0% | 3,229 | 4,479 | +39% | 0 | 0 | — |
case-11 | fail→pass | 34,315 | 33,333 | -3% | 1 | 1 | 0% | 4,929 | 5,687 | +15% | 0 | 0 | — |
case-12 | fail→pass | 24,053 | 32,595 | +36% | 1 | 1 | 0% | 3,207 | 5,450 | +70% | 0 | 0 | — |
case-13 | pass→pass | 26,066 | 27,018 | +4% | 1 | 1 | 0% | 3,559 | 4,849 | +36% | 0 | 0 | — |
case-14 | fail→fail | 24,356 | 27,642 | +13% | 1 | 1 | 0% | 3,198 | 5,281 | +65% | 0 | 0 | — |
case-15 | fail→pass | 39,688 | 23,436 | -41% | 1 | 1 | 0% | 5,534 | 4,595 | -17% | 0 | 0 | — |
case-16 | fail→fail | 29,564 | 22,307 | -25% | 1 | 1 | 0% | 3,851 | 4,506 | +17% | 0 | 0 | — |
case-17 | fail→pass | 36,841 | 29,869 | -19% | 1 | 1 | 0% | 5,090 | 5,712 | +12% | 0 | 0 | — |
case-18 | fail→fail | 23,922 | 36,806 | +54% | 1 | 1 | 0% | 4,020 | 4,932 | +23% | 0 | 0 | — |
case-19 | pass→pass | 29,636 | 38,894 | +31% | 1 | 1 | 0% | 4,093 | 5,114 | +25% | 0 | 0 | — |
case-20 | fail→pass | 25,042 | 30,093 | +20% | 1 | 1 | 0% | 4,146 | 5,577 | +35% | 0 | 0 | — |
case-21 | fail→fail | 25,240 | 27,686 | +10% | 1 | 1 | 0% | 4,160 | 5,208 | +25% | 0 | 0 | — |
case-22 | pass→pass | 61,418 | 32,063 | -48% | 1 | 1 | 0% | 6,657 | 6,091 | -9% | 0 | 0 | — |
case-23 | fail→pass | 26,895 | 44,243 | +65% | 1 | 1 | 0% | 3,658 | 7,047 | +93% | 0 | 0 | — |
case-24 | fail→pass | 17,422 | 19,620 | +13% | 1 | 1 | 0% | 2,609 | 3,923 | +50% | 0 | 0 | — |
case-25 | fail→fail | 77,406 | 32,191 | -58% | 1 | 1 | 0% | 6,064 | 6,115 | +1% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted. The headline lift of +40 percentage points is the difference between those two pass rates over the 25 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.