rag-architect

Designs, tunes, and evaluates RAG pipelines using corpus analysis and retrieval metrics.

2|Updated Mar 24, 2026
One-click install
npx skills add https://github.com/BryanPinheiro77/FinanceBot-BackEnd --skill rag-architect-bryanpinheiro77
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rag-architect
Source: https://github.com/BryanPinheiro77/FinanceBot-BackEnd/tree/main/.agents/skills/rag-architect
Command: npx skills add https://github.com/BryanPinheiro77/FinanceBot-BackEnd --skill rag-architect-bryanpinheiro77

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Choosing chunking strategies, embedding models, and vector databases by intuition leads to RAG systems with unmeasured retrieval quality. This Skill replaces guesswork with deterministic tools that analyze your actual corpus, generate a pipeline design from requirements, and evaluate retrieval with precision@k, recall@k, MRR, and NDCG metrics. ## Core Features & Use Cases - Corpus-Driven Chunking: Run chunking_optimizer.py on real documents to compare fixed-size, sentence, paragraph, and semantic strategies with size, boundary, and coherence metrics. - Requirements-Based Pipeline Design: Feed a requirements JSON into rag_pipeline_designer.py to get component recommendations, a Mermaid architecture diagram, config templates, and cost estimates flagged for verification. - Retrieval Evaluation: Score a TF-IDF baseline against ground truth with retrieval_evaluator.py, including failure analysis and improvement recommendations. - Use Case: Given a folder of technical documentation and a target of precision@5 ≥ 0.8, run the three tools in sequence to produce a validated RAG design with measured retrieval quality. ## Quick Start Analyze the documents in my docs folder, design a RAG pipeline for 5000 technical documents with high accuracy priority, and evaluate retrieval quality against my ground truth queries.

Frequently Asked Questions about rag-architect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose a chunking strategy for RAG documents?▼

Run chunking_optimizer.py on your actual document corpus to compare fixed-size, sentence-based, paragraph-based, and semantic heading-aware strategies. It scores each on size consistency, boundary quality, and semantic coherence, then recommends the best performer with sample chunks for review.

How do I evaluate RAG retrieval quality with precision and recall?▼

Prepare a queries JSON file and a ground truth file mapping query IDs to relevant document IDs, then run retrieval_evaluator.py against your corpus. It reports precision@k, recall@k, MRR, and NDCG@k using a built-in TF-IDF baseline, plus failure analysis for poorly performing queries.

What vector database should I use for a RAG pipeline?▼

The pipeline designer recommends among Pinecone, Weaviate, Qdrant, Chroma, and pgvector based on scale, latency requirements, budget, and maintenance tolerance. Cost figures are estimates only; verify current pricing on each provider's live pricing page before committing.

Does the RAG evaluation tool require external Python libraries?▼

No, all three tools use only the Python standard library. The retrieval evaluator implements its own TF-IDF index and cosine similarity, so no packages like scikit-learn, numpy, or sentence-transformers need to be installed.

Why is my RAG retrieval recall low and how do I fix it?▼

Low recall typically stems from vocabulary mismatch, overly specific queries, or poor chunk boundaries. The evaluator's failure analysis identifies these patterns, and the recommended fix is to change one variable at a time, such as chunking strategy or embedding tier, then re-run the evaluation.