retrieval-advisor
Skill195 starsChanged 8 days agoApache-2.0View on GitHub
Reviews how an LLM application brings external knowledge into the context: a RAG pipeline (ingestion, chunking, embeddings, retrieval, reranking) or a plan for one. Recommends RAG, cache-augmented generation (CAG), context stuffing, or a hybrid for the given corpus, and reports pipeline problems. Use when the user asks whether they need RAG, or asks to review or improve retrieval, chunking, or a knowledge base integration. Do not use for agent memory design (use memory-designer) or for general prompt review.
In this repository9 other files it gives its agents.
- skills/instruction-auditor/examples/AGENTS.mdAGENTS.md
- eval-builderSkill
- governance-checkSkill
- instruction-auditorSkill
- memory-designerSkill
- prompt-reviewerSkill
- skill-reviewerSkill
- token-budget-auditorSkill
- tool-reviewerSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Read references/checklist.md.
- Very specific: line 21
Write the report described below, with a ## Recommendation section after the findings that explains the choice in a few sentences, …
- Distinctive: line 25
Write the report in Markdown, in this order:
- Distinctive: line 49
Use the book section given in the checklist for each rule.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Retrieval advisor
Decide how this system should bring external knowledge into the model's context, and point out what in the current pipeline hurts answer quality or cost.
Procedure
- Identify the knowledge source: its size (pages, documents, or tokens), how often it changes, its structure, and who can see which parts. If the user did not say, infer it from the code or data and state your assumption.
- Identify the current approach, if any: how documents are loaded, split, embedded, stored, retrieved, filtered, reranked, and placed in the prompt.
- Read
references/checklist.md. Use its decision rules to choose a recommendation, and check the pipeline against its review rules. - Write the report described below, with a
## Recommendationsection after the findings that explains the choice in a few sentences, including when the recommendation would change.
Report format
Write the report in Markdown, in this order:
## Summary: two to four sentences on the overall state and the most important change.## Findings: one bullet per finding, most severe first, in the form- [severity] location: problem. Fix: suggested fix. (book section). Severity ishighwhen the problem causes wrong or unsafe behavior,mediumwhen it makes results unreliable or costly, andlowfor clarity or maintenance issues. If there are no problems, writeNo findings.- Any skill-specific section named in the procedure.
- A final fenced
jsonblock with the same content, as in this example. Setrecommendationto one of these values.rag: retrieve chunks per query.cag: load the whole source once into a cached prefix.context-stuffing: place the whole source in every prompt.hybrid: part of the source in the context and RAG for the rest. Hybrid keyword and vector search is stillrag.
{
"skill": "retrieval-advisor",
"summary": "...",
"recommendation": "rag",
"findings": [
{
"severity": "high",
"location": "ingest.py, chunking",
"problem": "...",
"fix": "...",
"book_section": "Chapter 3, Chunking strategies"
}
]
}Use the book section given in the checklist for each rule. If the input is missing or out of scope for this skill, say so in one sentence and stop.
Learn more: Chapter 3 of Context Engineering (Manning), https://hubs.la/Q04ksQ8J0
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

