Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when the user asks to design a RAG pipeline, choose a chunking strategy or embedding model, pick a vector database, or evaluate retrieval quality (precision@k, recall@k, NDCG). Examples: 'design a RAG system for our docs', 'what chunk size should I use for this corpus', 'evaluate my retriever against ground truth'. NOT for general LLM cost tuning (use llm-cost-optimizer) or agent loops over retrieval (use agenthub).
.claude/skills/alirezarezvani-rag-architect/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | -37% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 362% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 36% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 26% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 3% | 0% |
Design, tune, and evaluate production RAG pipelines with three deterministic tools. Run the tools against the actual corpus and requirements — do not pick chunk sizes or databases by intuition.
retrieval_evaluator.py numbers is a hypothesis, not a deliverable.chunking_optimizer.py on the real documents before choosing a strategy.| Tier | Current-generation examples (verify before use) | When | |---|---|---| | Fast / self-hosted | all-MiniLM-L6-v2, bge-small | Cost-sensitive, small scale, real-time | | Balanced open | all-mpnet-base-v2, bge-large, e5-large | Quality without API dependency | | Quality API | text-embedding-3-large, voyage-3-large | Accuracy-priority general retrieval | | Code | voyage-code-3, CodeBERT-family | Code search corpora |
Pricing discipline: build the cost model with a placeholder table — columns model | $/1M tokens (verify) | dims | as-of date — and have the user fill in live numbers. Same for vector DBs (Pinecone/Weaviate/Qdrant/Chroma/pgvector): the selection criteria (managed vs self-hosted, scale, filtering, existing Postgres) are durable; the dollar figures are not.
All paths relative to this skill folder. Outputs chain: corpus analysis → design → evaluation.
bashpython3 chunking_optimizer.py /path/to/docs --extensions .md .txt -o chunking.json
Emits chunking.json with corpus_info, per-strategy strategy_results, a recommendation, and sample_chunks. Use recommendation.strategy and its config; show the user 2-3 sample_chunks so they can sanity-check boundaries.
Write a requirements JSON with these keys (all required): document_types[], document_count, avg_document_size (chars), queries_per_day, query_patterns[], latency_requirement, budget_monthly, accuracy_priority (0-1), cost_priority (0-1), maintenance_complexity.
bashpython3 rag_pipeline_designer.py requirements.json -o design.json
Emits design.json with chunking, embedding, vector_db, retrieval, reranking, evaluation, total_cost, architecture_diagram (mermaid), and config_templates. Present the diagram; label every cost_monthly figure as an estimate to verify (rule 1).
Prepare queries.json (list of {id, text} or {"queries": [...]}) and ground_truth.json ({query_id: [relevant_doc_ids]}), then:
bashpython3 retrieval_evaluator.py queries.json /path/to/docs ground_truth.json --k-values 3 5 10 -o eval.json
Reports precision@k, recall@k, MRR, NDCG@k, plus poor_precision_examples / poor_recall_examples for failure analysis.
The design is done only when:
eval.json meets targets — typical floors: precision@5 ≥ 0.8, recall@10 ≥ 0.85 (set per use case with the user).references/chunking_strategies_comparison.md — strategy trade-offs the optimizer implementsreferences/embedding_model_benchmark.md — benchmark methodology (dated snapshot; staleness warning at top)references/rag_evaluation_framework.md — metric definitions (faithfulness, relevance, precision/recall/NDCG)| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-04 | pass→pass | 15,072 | 14,493 | -4% | 1 | 1 | 0% | 3,192 | 4,374 | +37% | 0 | 0 | — |
case-01 | fail→fail | 14,459 | 2,927 | -80% | 1 | 1 | 0% | 2,922 | 1,654 | -43% | 0 | 0 | — |
case-02 | fail→fail | 21,297 | 7,403 | -65% | 1 | 1 | 0% | 4,310 | 1,476 | -66% | 0 | 0 | — |
case-03 | fail→fail | 21,632 | 5,243 | -76% | 1 | 1 | 0% | 4,259 | 1,563 | -63% | 0 | 0 | — |
case-05 | pass→pass | 9,647 | 10,133 | +5% | 1 | 1 | 0% | 2,196 | 3,399 | +55% | 0 | 0 | — |
case-06 | pass→pass | 9,278 | 8,760 | -6% | 1 | 1 | 0% | 1,950 | 2,846 | +46% | 0 | 0 | — |
case-07 | fail→pass | 12,071 | 2,130 | -82% | 1 | 1 | 0% | 2,319 | 1,462 | -37% | 0 | 0 | — |
case-08 | fail→pass | 2,241 | 2,205 | -2% | 1 | 1 | 0% | 331 | 1,528 | +362% | 0 | 0 | — |
case-09 | fail→pass | 8,914 | 6,349 | -29% | 1 | 1 | 0% | 1,636 | 2,225 | +36% | 0 | 0 | — |
case-10 | fail→pass | 5,621 | 1,177 | -79% | 1 | 1 | 0% | 1,013 | 1,279 | +26% | 0 | 0 | — |
case-11 | fail→pass | 7,415 | 2,109 | -72% | 1 | 1 | 0% | 1,450 | 1,497 | +3% | 0 | 0 | — |
case-12 | pass→pass | 8,562 | 4,751 | -45% | 1 | 1 | 0% | 1,506 | 1,931 | +28% | 0 | 0 | — |
case-13 | pass→pass | 5,098 | 1,330 | -74% | 1 | 1 | 0% | 881 | 1,302 | +48% | 0 | 0 | — |
case-14 | fail→pass | 10,123 | 1,421 | -86% | 1 | 1 | 0% | 1,796 | 1,279 | -29% | 0 | 0 | — |
case-15 | pass→pass | 9,480 | 2,868 | -70% | 1 | 1 | 0% | 1,692 | 1,591 | -6% | 0 | 0 | — |
case-16 | pass→pass | 6,159 | 2,663 | -57% | 1 | 1 | 0% | 1,099 | 1,614 | +47% | 0 | 0 | — |
case-17 | fail→pass | 8,402 | 1,354 | -84% | 1 | 1 | 0% | 1,502 | 1,249 | -17% | 0 | 0 | — |
case-18 | fail→pass | 9,828 | 3,241 | -67% | 1 | 1 | 0% | 1,642 | 1,642 | 0% | 0 | 0 | — |
case-19 | fail→pass | 17,980 | 7,468 | -58% | 1 | 1 | 0% | 3,229 | 2,451 | -24% | 0 | 0 | — |
case-20 | fail→pass | 5,947 | 1,264 | -79% | 1 | 1 | 0% | 1,037 | 1,252 | +21% | 0 | 0 | — |
case-21 | fail→pass | 5,206 | 1,285 | -75% | 1 | 1 | 0% | 839 | 1,283 | +53% | 0 | 0 | — |
case-22 | pass→pass | 6,789 | 2,308 | -66% | 1 | 1 | 0% | 1,260 | 1,512 | +20% | 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. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +50 percentage points is the difference between those two pass rates over the 21 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.