Diagnosing RAG Failure Modes is a skill that helps engineers and AI architects determine why a RAG pipeline is returning poor results — and whether the root cause is implementation quality or a fundamental architectural mismatch. It provides a two-class query taxonomy that splits queries into Class A (factual lookup, RAG-safe) and Class B (relational or temporal, RAG danger zone), giving teams a shared vocabulary to route queries appropriately before tuning begins. A five-question diagnostic checklist — covering whether a multi-document join is required, whether order matters, whether a causation chain is involved, whether a time span is relevant, and whether the query asks why rather than what — scores any failing query as Class A, borderline, or Class B. The skill defines four named failure patterns: multi-hop relational failure, temporal sequencing failure, organizational context failure, and scale failure. Each pattern comes with a symptom description, a worked example, and a specific architectural fix. Results are captured in a Failure Classification Report template that structures the query, its class, matched failure patterns, a root cause paragraph, and a recommended fix — making the diagnosis communicable to both engineers and non-technical stakeholders. Each failure pattern also references a companion skill for remediation, so diagnosis connects directly to next steps. This skill is most relevant when a RAG pipeline returns plausible-sounding but incorrect results on relational or temporal queries, or when a team is iterating on embeddings and chunk size without improvement.
Diagnosing Rag Failure Modes
A diagnostic skill using a five-question checklist to classify failing RAG queries as safe or structurally incompatible, mapping each to its failure pattern and architectural fix.
Install
cmdop skills install agensi-diagnosing-rag-failure-modes
Use cases
- Classify a failing RAG query as factual-lookup-safe or structurally incompatible using the five-question checklist
- Identify which of four named failure patterns — multi-hop relational, temporal sequencing, organizational context, or scale — explains observed RAG degradation
- Produce a Failure Classification Report to communicate a RAG diagnosis to engineers, architects, and non-technical stakeholders
- Determine whether to invest in embedding tuning and reranking versus adopting a knowledge graph, timeline index, or hybrid retrieval layer
- Audit agent pipelines built over organizational knowledge bases (ADRs, incident reports, policy documents) for structural query mismatches
- Establish a principled basis for recommending architectural changes rather than relying on continued tuning
When to use it
- A RAG pipeline returns plausible but incorrect results and the cause is unclear
- Embedding tuning, chunk size changes, and reranking have been applied with little improvement
- Queries involve causal chains, multi-document joins, or time-ordered events
- An agent is being built over organizational knowledge bases where relational and temporal queries are expected
- A technical lead needs a structured rationale for adding a knowledge graph or hybrid retrieval layer
When not to use it
- The RAG pipeline is failing on simple factual lookups where embedding or chunking quality is the likely cause
- No RAG pipeline exists yet — this skill diagnoses existing failures, not initial design
- The team needs implementation guidance on building a knowledge graph or timeline index directly, not just a diagnosis
- Queries are purely keyword-based with no relational or temporal structure