Works with the AI Agents you already use
Diagnosing RAG Failure Modes
Diagnose RAG failures using evidence-grounded analysis of retrieval gaps, multi-hop logic, and answer grounding.
$9.99
Diagnosing RAG Failure Modes
Example session with this skill installed
I have a RAG failure. Query: "What was the revenue impact of the 2022 rebranding?" The answer said $5M but the retrieved chunks only mention a 10% increase in leads. I've attached the chunks.
- Read your context and instructions
- Compiled the diagnosing rag failure
I have analyzed the retrieval trace and generated answer. The system is hallucinating a specific dollar amount from a lead generation metric without a valid causal bridge.
RAG Diagnostic Report
1. Query Evidence Map
| Fact/Hop | Requirement | Status |
|---|---|---|
| Entity Identification | "2022 Rebranding" | Found in Chunk #1 |
| Metric Identification | Revenue Impact (USD) | Missing |
| Bridge Logic | Link between Leads and Revenue | Hypothesized (Unsupported) |
2. Answer Claim-to-Evidence Audit
| Claim | Evidence Source | Status |
|---|---|---|
| Rebranding happened in 2022 | Chunk #1: "Q3 2022 brand refresh..." | SUPPORTED |
| Revenue impact was $5M | None found in retrieved context | UNSUPPORTED |
| 10% increase in leads | Chunk #2: "Leads rose 10% YoY" | SUPPORTED |
3. Failure Mode Classification
- Primary Failure Mode: Weak answer grounding / Causal leap.
- Contributing Failure: Retrieval recall gap (Revenue data not fetched).
- Confidence: High (The $5M figure appears nowhere in the provided 4 chunks).
4. Remediation Plan
Expand Retrieval Scope: The current embedding search is surfacing "marketing" chunks but missing "financial" reports. Suggest adding a metadata filter for department: finance.
2.
Instruction Tuning: Modify the prompt to enforce a "Strict Grounding" rule, requiring the model to say "Information not available" if a direct revenue-to-rebranding link is missing.
5. Regression Test
- Test Case: "What was the revenue impact of the 2022 rebranding?"
- Required Bridge: Explicit link between
doc_id_finance_2022anddoc_id_marketing_2022.
Success Criteria: Answer must cite a specific revenue figure ONLY if a financial chunk is retrieved; otherwise, it must abstain.
Next steps
- Verify if revenue data exists in your vector store under a different namespace.
- Apply the suggested prompt modification to prevent numerical hallucinations.
- Run the regression test against your current embedding model.
Connects securely to your tools. The creator never sees your data.
About this skill
RAG pipelines often fail silently, producing plausible answers that lack factual grounding or miss critical context. This skill provides a structured diagnostic framework for engineers to investigate why a retrieval system is underperforming. It moves beyond simple similarity scores to analyze multi-hop logic, causal links, and context assembly errors.
What it does
- Evidence Mapping breaks down user queries into atomic facts and multi-hop requirements to identify what the retriever missed.
- Retrieval Tracing audits chunks, ranks, and metadata filters to find recall gaps or boundary failures.
- Grounding Audits maps generated claims to specific retrieved evidence, labeling them as supported, unsupported, or contradicted.
- Failure Classification categorizes issues into specific modes like query decomposition failure, ranking errors, or source conflicts.
- Remediation Planning generates testable fixes tied to specific mechanisms rather than general best practices.
How it works
- Supply artifacts such as the user query, retrieved chunks, and the generated answer with citations.
- Review the evidence map to see the logical hops and facts required to answer the query correctly.
- Analyze the diagnostic report which identifies the primary failure mode and confidence levels.
- Implement the regression tests provided to validate that proposed fixes resolve the specific retrieval or grounding gap.
Frameworks & tools
Works with any RAG stack including LangChain, LlamaIndex, Haystack, or custom Python implementations. Compatible with vector databases like Pinecone, Weaviate, or Milvus, and reranking models like Cohere or BGE.
Why this beats prompting it yourself
Standard prompts often hallucinate the cause of RAG failure or rely too heavily on high similarity scores. This skill enforces a rigorous evidence-to-claim mapping process and distinguishes between observed facts and hypotheses, ensuring you fix the root cause instead of symptoms.
Use cases
- Multi-hop reasoning where the agent fails to connect information across two different documents.
- Causal analysis when the pipeline identifies a correlation but lacks the evidence to prove a causal link.
- Citation validation to ensure the LLM is not "hallucinating" sources that don't actually support the claim.
Known limitations
Requires user-provided retrieval traces and documents to function. It cannot independently execute the pipeline or verify production changes.
Requires external retrieval traces and chunk data. Cannot execute pipeline code or access live databases. Does not guarantee accuracy without new evaluation results.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 14 days ago
Permissions
No special permissions declared or detected