Rag Architect

Design, debug, and optimize production RAG systems with expert architecture, hybrid search, and grounding strategies.

Install
cmdop skills install agensi-rag-architect

RAG Architect is a skill published by agensi that provides structured guidance for building and troubleshooting production-grade Retrieval-Augmented Generation systems. It covers the full pipeline: ingestion workflows, document parsing, chunking strategy selection, embedding model choices, vector store configuration, and reranking. Rather than treating poor answers as model hallucinations by default, it applies a systematic methodology to isolate where the pipeline actually fails — whether that is a metadata filter mismatch, stale indexes, tenant leakage, or poor chunking semantics.

For architecture decisions, the skill supports corpus-specific design for domains such as legal documents, code, and product documentation, and can reason about hybrid search and context packing tradeoffs. For infrastructure selection, it provides tradeoff analysis across vector databases including pgvector, Qdrant, and Milvus, as well as embedding models and rerankers, without prescribing a single vendor.

Production hardening guidance covers multi-tenant isolation, citation grounding, and incremental re-indexing strategies. The skill also supports establishing evaluation frameworks using metrics such as recall@k, precision, and faithfulness so that pipeline changes are validated with data rather than anecdote.

This skill is appropriate when an agent or developer needs architectural reasoning about a RAG stack, not direct database query execution or document ingestion automation. It has no tools and no environment variables, so it does not connect to live systems.

Use cases

  • Design a hybrid search and reranking architecture for a legal document corpus
  • Debug retrieval failures caused by metadata filter mismatches or poor chunking semantics
  • Select and compare vector databases (pgvector, Qdrant, Milvus) for a specific workload
  • Implement multi-tenant isolation and citation grounding in an existing RAG pipeline
  • Define an evaluation framework using recall@k and faithfulness metrics
  • Diagnose stale indexes or tenant leakage in a production retrieval stack

When to use it

  • Building a RAG system from scratch and need architecture decisions tailored to a specific corpus type
  • An existing RAG pipeline returns poor answers and the failure source is unknown
  • Comparing vector store or embedding model options before committing to infrastructure
  • Establishing measurable evaluation criteria for retrieval quality in a production system
  • Hardening a RAG system for multi-tenant use cases with strict data isolation requirements

When not to use it

  • Direct query execution against a live database is needed — this skill has no tools and cannot connect to systems
  • Automated document ingestion or embedding generation is required at runtime
  • The task requires a running MCP server with active transport — no transport is defined
  • Looking for a Postgres-specific query or schema management capability
  • Real-time monitoring or alerting on vector store performance is needed