
RAG Architect
FreeDesign and evaluate RAG pipelines efficiently.
Free · Opens the source repo
What RAG Architect does
RAG Architect is a specialized tool for designing, tuning, and evaluating Retrieval-Augmented Generation (RAG) pipelines. It provides a systematic approach to optimize chunking strategies and select embedding models tailored to specific corpus requirements. By leveraging the provided Python scripts, users can analyze their documents, create a structured pipeline design, and evaluate retrieval quality based on defined metrics. This skill is particularly useful for developers and data scientists who need to build efficient retrieval systems without relying solely on intuition or outdated information.
The workflow begins with corpus analysis using chunking_optimizer.py, which generates a detailed report on chunking strategies based on the actual documents. This ensures that users make informed decisions about chunk sizes rather than guessing. Following this, the rag_pipeline_designer.py script allows users to input their specific requirements in JSON format, producing a comprehensive design output that includes not only the chosen chunking strategy but also the embedding model and vector database recommendations.
Finally, the retrieval_evaluator.py script enables users to assess the quality of their retrieval system. By evaluating metrics such as precision, recall, and NDCG, users can ensure that their designs meet the necessary performance criteria. The iterative verification process allows for adjustments based on evaluation results, ensuring that the final design is robust and effective.
This skill is aimed at professionals involved in building RAG systems, including data engineers, machine learning practitioners, and researchers. It streamlines the process of creating effective retrieval systems by providing concrete tools and methodologies rather than vague guidelines.
When to use it
Use this skill when you need to design a RAG system, optimize chunking strategies, or evaluate retrieval performance based on real data.
When not to use it
Avoid this skill for general LLM cost tuning or for creating agent loops over retrieval, as it is specifically tailored for RAG pipeline design and evaluation.
What you can build with it
Designing a RAG System for Documentation
When tasked with creating a RAG system for internal documentation, use RAG Architect to analyze the documents and design a tailored retrieval pipeline.
Optimizing Chunk Sizes for a Large Corpus
If you have a large dataset and need to determine the optimal chunk sizes, run the chunking optimizer to get data-driven recommendations.
Evaluating Retrieval Quality Against Ground Truth
After implementing a RAG pipeline, use the retrieval evaluator to measure how well your system retrieves relevant documents based on predefined queries.
How to install RAG Architect
View source1. Install with the skills CLI
npx skills add alirezarezvani/claude-skills/rag-architect --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by alirezarezvaniRAG Architect
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.
Hard rules
- Never present model names or vendor prices as current facts. Embedding models and vector-DB pricing rot in months. Recommend a tier (see table below), name a current-generation candidate, and tell the user to verify against the provider's live pricing page.
- Every design ends with an evaluation run. A RAG design without
retrieval_evaluator.pynumbers is a hypothesis, not a deliverable. - Chunking is corpus-driven. Run
chunking_optimizer.pyon the real documents before choosing a strategy.
Embedding model tiers (pattern, not price list)
| 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.
Workflow
All paths relative to this skill folder. Outputs chain: corpus analysis → design → evaluation.
1. Analyze the corpus and pick chunking
python3 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.
2. Design the pipeline from requirements
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.
python3 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).
3. Evaluate retrieval quality
Prepare queries.json (list of {id, text} or {"queries": [...]}) and ground_truth.json ({query_id: [relevant_doc_ids]}), then:
python3 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.
4. Verification loop
The design is done only when:
eval.jsonmeets targets — typical floors: precision@5 ≥ 0.8, recall@10 ≥ 0.85 (set per use case with the user).- If below target: inspect the poor-example lists, then change one variable (chunking strategy → re-run step 1; embedding tier; add reranking; hybrid retrieval) and re-run step 3. Repeat.
- Every recommended model/price in the deliverable carries a "verify current pricing/model availability" note with an as-of date.
References
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)
Frequently asked questions about RAG Architect
Similar skills
Python PyPI Package Builder
Streamline the process of creating and publishing Python packages.
Minecraft Plugin Development
Streamline your Minecraft server plugin creation.
MCP Server Builder
Easily build .NET MCP servers with the latest standards.
CommunityToolkit.Mvvm Messenger
Decoupled communication for ViewModels in .NET applications.
MVVM Toolkit DI
Streamline ViewModel integration with Dependency Injection in .NET.
MCP Apps Builder
Essential guidelines for MCP server development.
