Afrexai Rag Production
Skill by afrexai-cto
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/afrexai-cto/afrexai-rag-productionRAG Production Engineering
Complete methodology for building, optimizing, and operating Retrieval-Augmented Generation systems in production. From architecture decisions through chunking strategies, embedding selection, retrieval tuning, evaluation frameworks, and production monitoring.
Quick Health Check
Score your RAG system (1 = poor, 2 = okay):
| Signal | What to Check |
|---|---|
| Retrieval relevance | Top-5 results contain answer >90% of time |
| Answer accuracy | Generated answers faithful to retrieved context |
| Latency | End-to-end response <3s (p95) |
| Chunk quality | Chunks are self-contained, meaningful units |
| Evaluation coverage | Automated eval suite with 50+ test cases |
| Index freshness | Documents indexed within SLA of source update |
| Failure handling | Graceful degradation when retrieval returns nothing |
| Cost efficiency | Cost per query within budget (<$0.05 typical) |
Score: /16 — Below 10 = critical issues. Below 12 = significant gaps. 14+ = production-ready.
Phase 1: Architecture Decision
When to Use RAG (vs Alternatives)
| Approach | Use When | Don't Use When |
|---|---|---|
| RAG | Dynamic knowledge, source attribution needed, data changes frequently | Static small dataset (<10 pages), real-time data needed |
| Fine-tuning | Consistent style/format needed, domain-specific language | Frequently changing data, need source citations |
| Long context | Small corpus (<200K tokens), simple Q&A | Large corpus, cost-sensitive, need precise attribution |
| RAG + Fine-tuning | Domain-specific language AND dynamic knowledge | Budget-constrained, simple use case |
| Agentic RAG | Multi-step reasoning, tool use, complex queries | Simple lookup, latency-critical |
RAG Architecture Brief
# Fill this out before building
project:
name: ""
use_case: "" # Q&A, search, summarization, analysis, chatbot
domain: "" # legal, medical, technical, general
data:
sources: [] # PDF, web, database, API, markdown, code
volume: "" # <1K docs, 1K-100K, 100K-1M, >1M
update_frequency: "" # real-time, daily, weekly, static
avg_doc_length: "" # <1 page, 1-10 pages, 10-100 pages, >100 pages
languages: []
requirements:
latency_p95: "" # <1s, <3s, <10s, <30s
accuracy_target: "" # 85%, 90%, 95%, 99%
citations_needed: true
access_control: false
compliance: [] # GDPR, HIPAA, SOC2, none
budget:
monthly_queries: ""
cost_per_query_target: ""
infra_budget: ""
Architecture Patterns
Basic RAG
Query → Embed → Vector Search → Top-K → LLM → Answer
Best for: Simple Q&A, <100K documents, single data source.
Advanced RAG
Query → Classify → Rewrite → Embed → Hybrid Search → Rerank → Filter → LLM → Answer + Citations
Best for: Production systems, mixed document types, accuracy-critical.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-afrexai-cto-afrexai-rag-production": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
vendor-risk-assessment
Assess third-party vendor risk for AI and SaaS products. Evaluates security posture, data handling, compliance, financial stability, and operational resilience. Use when onboarding new vendors, conducting annual reviews, or building a vendor management program. Generates a scored risk report with mitigation recommendations. Built by AfrexAI.
Afrexai Plumbing Operations
Skill by afrexai-cto
Afrexai Hvac Operations
Skill by afrexai-cto
Afrexai Learning Engine
Skill by afrexai-cto
Afrexai Business Process Audit
Skill by afrexai-cto