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.
npx skills add personamanagmentlayer/pcl --skill rag-expertgit clone --depth 1 https://github.com/personamanagmentlayer/pclWrote 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.
[](https://agentmods.dev/skills/personamanagmentlayer/pcl/rag-expert)<a href="https://agentmods.dev/skills/personamanagmentlayer/pcl/rag-expert"><img src="https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/rag-expert/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.
<a href="https://agentmods.dev/skills/personamanagmentlayer/pcl/rag-expert"><img src="https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/rag-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00097 | $0.02474 |
| Opus 5 | $0.00048 | $0.01237 |
| Sonnet 5 | $0.00019 | $0.00495 |
| Haiku 4.5 | $0.00010 | $0.00247 |
Grade A, and why
rag-expert 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 290 lines — stays where its author put it; the contents beside it link to each section on GitHub.
RAG Expert
Retrieval-augmented generation answers from your corpus rather than from model memory. Almost every failure is a retrieval failure: the model cannot ground an answer in a passage it was never given.
Core Concepts
The Pipeline
ingest → chunk → embed → index
↘
query → rewrite → retrieve → rerank → assemble context → generate → cite
Debug it in that order. When answers are wrong, look at what was retrieved before touching the prompt — the passage is usually missing, not misread.
Retrieval Quality Sets the Ceiling
Generation cannot exceed retrieval. Measure them separately: recall@k for retrieval, groundedness for generation. Conflating the two produces months of prompt tuning against a chunking problem.
Semantic Search Is Not Search
Embeddings capture similarity of meaning, which is exactly wrong for exact
identifiers, error codes, product SKUs and rare terms. Vector-only retrieval
reliably fails on ERR_4021 and on surnames. Hybrid retrieval — dense plus
lexical — is the default, not an optimisation.
Chunking Is the Highest-Leverage Decision
The chunk is the unit of retrieval and the unit of context. Too small and it loses the meaning that makes it findable; too large and it dilutes the embedding and wastes budget.
Chunking
Split on structure first, size second. Markdown headings, HTML sections, legal articles and code functions are natural boundaries; a fixed character count is a fallback, not a strategy.
def chunk_markdown(doc: str, target: int = 900, overlap: int = 120) -> list[Chunk]:
"""Split on headings, then pack sections up to a target size."""
sections = split_on_headings(doc) # keeps the heading with its body
chunks, buffer, heading_path = [], "", []
for section in sections:
if len(buffer) + len(section.text) > target and buffer:
chunks.append(Chunk(text=buffer, heading_path=list(heading_path)))
buffer = buffer[-overlap:] # carry context across the seam
heading_path = section.heading_path
buffer += section.text
if buffer.strip():
chunks.append(Chunk(text=buffer, heading_path=list(heading_path)))
return chunks
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 4d ago First seen · 290 lines · 97 tokens per session scan A 1bc804d7debb
rag-expert is a skill published in the GitHub repository personamanagmentlayer/pcl (40 stars, last pushed 2d ago), licensed Apache-2.0. It adds 97 tokens to every session and 2,474 once invoked, about $0.0005 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-05.
Other skills, from other repositories
rag-retrieval
Retrieval-Augmented Generation patterns for grounded LLM responses. Use when building RAG pipelines, embedding documents, implementing hybrid search, contextual retrieval, HyDE, agentic RAG, multimodal RAG, query decomposition, reranking, or pgvector search.
rag
Use when building grounded Q&A over your own corpus — chunk, retrieve hybrid, rerank, ground, cite chunk ids, refuse when the sources fall short — or when the right document is retrieved but the answer is still wrong, invented, or unmeasured. NOT operating the store itself — collection schema, HNSW efsearch…
RAG Chunking Strategy Advisor
Given a document type and retrieval goal, recommends the optimal chunking strategy for a RAG pipeline to minimize retrieval failures.
nemotron-retrieval-recipes
Use when planning, debugging, tuning, evaluating, exporting, or deploying public Nemotron embed/rerank retrieval recipes.
embeddings-search
Use when choosing an embedding model, chunk size, or query form, when semantic search returns irrelevant results, when adding hybrid BM25+vector or a reranker, or when a retrieval change needs a number (recall@k, nDCG, MRR). NOT operating the store — index tuning, quantization (that is vector-db) — nor the…
qdrant-vector-search
High-performance vector similarity search engine for RAG and semantic search. Use when building production RAG systems requiring fast nearest neighbor search, hybrid search with filtering, or scalable vector storage with Rust-powered performance.