The RAG pipeline end to end — chunking that respects meaning, embeddings that don't drift, a relevance floor, and evals that catch regressions before users do.
Free & open · no signup · read-only — it ends by asking · nothing leaves your machine
You are working inside this repo. Mission: audit the retrieval pipeline end to end — ingest, chunk, embed, store, query, inject — and find where it feeds the model the wrong context, or the right context mangled.
Read-only pass. Your only write is the report file.
Phase 2 sweeps the codebase through every one of these, citing file and line for each finding.
do boundaries respect the content's shape, or do they split tables, code blocks, and arguments mid-thought; inspect real chunks, not the config
model version pinned; what happens to the existing index when the model changes; queries and documents embedded consistently
a minimum-similarity threshold, or does top-k dutifully inject k results even when the best match is garbage
a source document updates or is deleted: how long until the index agrees; do deletes actually propagate
metadata filtering and tenancy applied before injection; whether a query can leak across collections or users
how chunks land in the prompt: deduped, ordered, attributed, inside a token budget — or concatenated and prayed over
empty results, store down, timeout: does the agent say so, hallucinate, or quietly answer from priors
golden queries with known-correct chunks; recall measured; anything that fails CI when retrieval regresses
One structured report at the repo root — or in reports/, if you keep one — the same shape every time, ready for a teammate — or the optional Studio — to act on.
Every Goal Prompt follows the same four steps, so results are consistent and repeatable — no matter which one you run.
Trace one document from source to prompt.
Chunking fit — do boundaries respect the content's shape, or do they split tables, code blocks, and arguments mid-thou…
Hand-trace 3 representative queries.
Create RETRIEVAL.md at repo root.
Copy it and paste it into your agent inside the repo you want checked.
Install the goal plugin once — two commands — then just type /goal:retrieval-quality-audit.
/plugin marketplace add GhostlyGawd/goal-prompts/plugin install goal@goal-promptsOr install only this Goal Prompt as /goal-retrieval-quality-audit:
curl -fsSL https://goal-prompts.vercel.app/install | BRIEF=49 shLet an agent fetch it mid-conversation, or pull the raw Goal Prompt by URL.
https://goal-prompts.vercel.app/raw/49.mdNothing hidden — this is the whole Goal Prompt, verbatim. Read it in a minute, edit it, or copy it as-is.
# Goal: Retrieval Quality Audit You are working inside this repo. Mission: audit the retrieval pipeline end to end — ingest, chunk, embed, store, query, inject — and find where it feeds the model the wrong context, or the right context mangled. Read-only pass. Your only write is the report file. ## Phase 1 — Map the pipeline - Trace one document from source to prompt: ingestion, chunking (size, overlap, boundaries), embedding (model, version), storage (index, metadata), the query path (rewriting, filters, top-k, reranking), and the final injection format. - Record every knob and its current value: chunk size, k, similarity thresholds, model names, token budgets. ## Phase 2 — Audit through 8 lenses 1. **Chunking fit** — do boundaries respect the content's shape, or do they split tables, code blocks, and arguments mid-thought; inspect real chunks, not the config 2. **Embedding hygiene** — model version pinned; what happens to the existing index when the model changes; queries and documents embedded consistently 3. **Relevance floor** — a minimum-similarity threshold, or does top-k dutifully inject k results even when the best match is garbage 4. **Freshness & sync** — a source document updates or is deleted: how long until the index agrees; do deletes actually propagate 5. **Filters & scoping** — metadata filtering and tenancy applied before injection; whether a query can leak across collections or users 6. **Injection format** — how chunks land in the prompt: deduped, ordered, attributed, inside a token budget — or concatenated and prayed over 7. **Failure behavior** — empty results, store down, timeout: does the agent say so, hallucinate, or quietly answer from priors 8. **Eval coverage** — golden queries with known-correct chunks; recall measured; anything that fails CI when retrieval regresses ## Phase 3 — Curate - Hand-trace 3 representative queries: what was retrieved, what should have been, and where the pipeline lost it. - Rank findings by answer-quality impact, not architectural taste. ## Phase 4 — Report Create `RETRIEVAL.md` at repo root: 1. **Pipeline map** — stage · implementation · knob values · owning file 2. **Three traces** — query → retrieved vs deserved → diagnosis 3. **Findings** — ranked, with evidence 4. **Eval starter** — ten golden queries worth committing this week Start the report with today's date. If `RETRIEVAL.md` already exists from a previous run, read it first and lead with what changed since. ## Rules - Judge retrieval by what reaches the prompt, not by what the store contains - Every claim about quality needs a traced example behind it - No retrieval or RAG pipeline in this repo? Say so in a one-paragraph null report and stop — a null result is a valid finding. - If a `reports/` directory exists at the repo root, write the report there instead of the root. - Before asking, present the top findings as a ranked list in plain words - Report only — end by asking which fixes to make
reports/ directory exists at the repo root, write the report there instead of the root.Curated neighbors — briefs that answer the adjacent question, worth running in the same session.
Every system prompt in the repo: contradictions, dead instructions, bloat, and injection surface — with a consolidation plan.
Your tools are an API whose consumer is a model — audit names, descriptions, error contracts, and guards on destructive actions.
How runs end — iteration caps, stop conditions, stuck-state detection, and the true cost of one pathological run.
Reconstruct what actually enters the model's window each step — stale payloads, token hogs, retrieval junk, and buried instructions.
Runs inside these playbooks — curated sequences you can launch with one paste: