RAG Architecture Review Skill
A RAG system that "hallucinates sometimes" is almost never one bug — it's a chain where the weakest stage caps
quality, and the symptom (a wrong answer) is far from the cause (a chunk that was never retrieved). This skill
reviews an existing pipeline stage by stage, isolates where quality leaks, and ranks fixes by impact so you
work the biggest lever first. (Designing a new system from scratch? Use rag-design-doc.)
Working from a brief
Given a partial description ("it uses pgvector and sometimes makes things up"), deliver the full staged
review anyway — infer the likely setup for each unstated stage, label the inference, and flag what to confirm.
Never withhold the review for missing detail; a labelled assumption plus "confirm this" beats a blank.
Required Inputs
Ask for these only if they aren't already provided (else infer and label):
- The current architecture — ingestion, chunking, embedding model, vector store, retrieval (top-k, hybrid?), reranking, and the generation prompt.
- The symptoms — examples of bad answers (wrong, ungrounded, stale, refuses) with the expected answer.
- The corpus — what's retrieved over, its size, structure, and update frequency.
- Constraints — latency, cost, and per-tenant/permission isolation needs.
Output Format
RAG Review: [system]
1. Summary — the headline: where quality is leaking and the top 3 fixes, in priority order.
2. Stage-by-stage findings — for each stage, what's working, what's not, and why:
3. Diagnosis: symptom → stage — map each reported bad answer to the stage that caused it, so fixes target
the real cause (a confident-but-wrong answer is usually retrieval, not the LLM).
4. Prioritised fix plan — ordered by impact-to-effort, with the one change likely to move quality most first.
5. Evaluation gap — whether retrieval quality (recall@k, MRR) is measured separately from answer quality
(faithfulness, correctness); if not, that's finding #1 — you can't fix what you can't isolate. Pair with an
ai-eval-plan.
Quality Checks
Anti-Patterns
Based On
Retrieval-Augmented Generation practice — staged diagnosis, separated retrieval/answer evaluation, hybrid retrieval, and grounded generation.
Example Trigger Phrases
- "Audit a RAG pipeline."
- "Diagnose wrong/ungrounded answers from a 'chat with your docs' feature."
- "Improve an already-built knowledge assistant."