rag-architecture-review

rag-architecture-review is a cursor rule for Cursor from mohitagw15856/pm-claude-skills. It costs 84 tokens per session (973 once invoked), scanned A, original, MIT.

A review of an existing Retrieval-Augmented Generation (RAG) system, which answers questions using retrieved documents. It checks each stage to find where incorrect or unsupported answers begin.

In plain words
What is it for?
Use it to audit a chat-with-your-docs system, investigate hallucinated or stale answers, and rank improvements across ingestion, chunking, search, reranking, and answer generation.
Why use it?
It helps distinguish a retrieval problem from a document-processing or prompt problem, so fixes target the actual cause instead of only treating wrong answers as a model issue.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to audit a chat-with-your-docs system, investigate hallucinated or stale answers, and rank improvements across ingestion, chunking, search, reranking, and answer generation.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/mohitagw15856/pm-claude-skills/rag-architecture-review
About the project

PM Skills is a collection of plain-Markdown instructions that teach AI assistants structured methods for handling professional, personal, and life-admin tasks. People use it with Claude, ChatGPT, Gemini, Cursor, Codex, and other supported agents for work such as writing product requirements, reviewing documents, or planning difficult situations.

mohitagw15856/pm-claude-skills · 1,357 stars · on GitHub · mohitagw15856.github.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/mohitagw15856/pm-claude-skills

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rag-architecture-review

README.md
[![agentmods](https://agentmods.dev/badge/rules/mohitagw15856/pm-claude-skills/rag-architecture-review/github.svg)](https://agentmods.dev/rules/mohitagw15856/pm-claude-skills/rag-architecture-review)
Your own site
<a href="https://agentmods.dev/rules/mohitagw15856/pm-claude-skills/rag-architecture-review"><img src="https://agentmods.dev/badge/rules/mohitagw15856/pm-claude-skills/rag-architecture-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rag-architecture-review

Your own site · 80×15
<a href="https://agentmods.dev/rules/mohitagw15856/pm-claude-skills/rag-architecture-review"><img src="https://agentmods.dev/badge/rules/mohitagw15856/pm-claude-skills/rag-architecture-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 973 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00084 $0.00973
Opus 5 $0.00042 $0.00487
Sonnet 5 $0.00017 $0.00195
Haiku 4.5 $0.00008 $0.00097

Measured 8d ago against content hash db6fc238a212, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

rag-architecture-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

exports/cursor/pm-ai/rag-architecture-review/rag-architecture-review.mdc · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

Stage Finding Severity Root cause Fix
Chunking 1500-tok fixed chunks split tables mid-row High structure-blind splitting structure-aware chunking + metadata
Retrieval pure vector, no keyword High exact IDs/terms missed add hybrid (BM25 + dense)
Generation weak grounding instruction Med model answers from prior "answer only from context; else say unknown"

Read the full file on GitHub · 72 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 72 lines · 84 tokens per session scan A db6fc238a212

Subscribe to this mod's changes

rag-architecture-review is a cursor rule published in the GitHub repository mohitagw15856/pm-claude-skills (1,357 stars, last pushed today), licensed MIT. It adds 84 tokens to every session and 973 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.