ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

Afrexai Rag Production

Skill by afrexai-cto

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/afrexai-cto/afrexai-rag-production
Or

RAG 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):

SignalWhat to Check
Retrieval relevanceTop-5 results contain answer >90% of time
Answer accuracyGenerated answers faithful to retrieved context
LatencyEnd-to-end response <3s (p95)
Chunk qualityChunks are self-contained, meaningful units
Evaluation coverageAutomated eval suite with 50+ test cases
Index freshnessDocuments indexed within SLA of source update
Failure handlingGraceful degradation when retrieval returns nothing
Cost efficiencyCost 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)

ApproachUse WhenDon't Use When
RAGDynamic knowledge, source attribution needed, data changes frequentlyStatic small dataset (<10 pages), real-time data needed
Fine-tuningConsistent style/format needed, domain-specific languageFrequently changing data, need source citations
Long contextSmall corpus (<200K tokens), simple Q&ALarge corpus, cost-sensitive, need precise attribution
RAG + Fine-tuningDomain-specific language AND dynamic knowledgeBudget-constrained, simple use case
Agentic RAGMulti-step reasoning, tool use, complex queriesSimple 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

Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-afrexai-cto-afrexai-rag-production": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.