pn-rag-evaluation

pn-rag-evaluation is a skill for Cursor from perniemann/pnCore. It costs 62 tokens per session (1,292 once invoked), scanned A, original, MIT.

An evaluation workflow for retrieval-augmented generation (RAG), where an AI retrieves relevant documents before writing an answer.

In plain words
What is it for?
Use it to build golden test sets, measure retrieval and answer quality, run human reviews, and add regression checks to CI.
Why use it?
It reveals when changes to document chunks, embeddings, rerankers, or prompts cause answers or citations to get worse.

Skill for Cursor

Written for Cursor: shipped in a Cursor plugin.

Part of the pn-core plugin — 133 skills, 19 commands, 9 agents, 1 MCP server shipped together

Good fit Use it to build golden test sets, measure retrieval and answer quality, run human reviews, and add regression checks to CI.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/perniemann/pncore/pn-rag-evaluation
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.

Any agent
npx skills add perniemann/pnCore --skill pn-rag-evaluation
Clone the repo
git clone --depth 1 https://github.com/perniemann/pnCore

Made for: Cursor.

Or install pn-core, the plugin that ships this one along with the rest of its 133 skills, 19 commands, 9 agents, 1 MCP server.

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 pn-rag-evaluation

README.md
[![agentmods](https://agentmods.dev/badge/skills/perniemann/pncore/pn-rag-evaluation/github.svg)](https://agentmods.dev/skills/perniemann/pncore/pn-rag-evaluation)
Your own site
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-rag-evaluation"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-rag-evaluation/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 pn-rag-evaluation

Your own site · 80×15
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-rag-evaluation"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-rag-evaluation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,292 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.00062 $0.01292
Opus 5 $0.00031 $0.00646
Sonnet 5 $0.00012 $0.00258
Haiku 4.5 $0.00006 $0.00129

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

Security

Grade A, and why

pn-rag-evaluation 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 5d 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.

packages/pn-core-mcp/content/skills/integrations/pn-rag-evaluation/SKILL.md · 121 lines

How it starts

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

RAG evaluation

When to use

  • Adding or changing chunking, embeddings, rerankers, or retrieval top-k
  • Before promoting a RAG release to production or a large user cohort
  • After incidents: hallucinated citations, wrong doc retrieved, "empty" answers
  • Setting up CI so RAG changes cannot silently degrade quality

When not to use

  • Pure generative Q&A with no retrieval (use normal eval harnesses)
  • Full search-engine relevance tuning without generation (IR metrics only)

Evaluation layers (run all three for production-grade)

Layer Purpose Owner
Golden set Fixed questions + expected behavior Engineering
Automated metrics Scalable regression signal CI + notebooks
Human rubric Catches what metrics miss Product / SME spot checks

1. Golden set

Build a versioned dataset (JSONL or table) with at least:

Field Content
id Stable id
question User query (realistic phrasing)
gold_docs or gold_chunk_ids Doc ids or chunk ids that should be retrievable (when known)
answer_policy must_cite, refuse_if_missing, or acceptable paraphrase notes
must_not Forbidden claims or sources (optional)

Sizing: Start 50–200 items covering head + long tail; expand per domain. Stratify: easy retrieval, multi-hop, ambiguous, adversarial (prompt injection in retrieved text).

Regression rule: New pipeline version must meet or beat baseline on the golden set (see §4).

2. Automated metrics

Use framework-agnostic goals; implement with RAGAS, deepeval, custom LLM-judge, or classical IR where appropriate.

Concern What to measure Notes
Faithfulness / groundedness Answer supported by retrieved context Penalize facts not in context
Answer relevance Answer addresses the question Not just fluent
Context precision Retrieved chunks are useful Reduce noise
Context recall Needed facts appear in retrieved set Tune k, chunking, reranker
Citation alignment (if citations exposed) Quoted spans exist in cited chunks Prevents fake cites

Read the full file on GitHub · 121 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. 5d ago First seen · 121 lines · 62 tokens per session scan A 72582b7527df

Subscribe to this mod's changes

pn-rag-evaluation is a skill published in the GitHub repository perniemann/pnCore (0 stars, last pushed 2d ago), licensed MIT. It adds 62 tokens to every session and 1,292 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

data-quality-frameworks

Implement data quality validation with Great Expectations, dbt tests, and data contracts. Use when building data quality pipelines, implementing validation rules, or establishing data contracts.

wshobson/agents · 37 tokens

dbt-transformation-patterns

Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.

wshobson/agents · 47 tokens

generate-rag-dataset

Generate a synthetic evaluation dataset from your RAG knowledge base. Creates diverse Q&A pairs with expected answers and relevant context, ready for LangWatch experiments and platform import. Use when you need test data for your RAG pipeline.

langwatch/langwatch · 51 tokens

trulens-running-evaluations

Execute TruLens evaluations and view results.

truera/trulens · 15 tokens

neuron-test-engineer

Write tests for Neuron AI agents, RAG systems, workflows, and tools using the built-in testing utilities. Use this skill when the user mentions testing agents, writing unit tests, mocking AI providers, testing tool execution, verifying RAG retrieval, testing workflow behavior, or creating test cases for Neuron AI…

neuron-core/neuron-ai · 94 tokens

test

Enter the Test phase of CocoBrew. Reads spec.md test requirements, generates test cases, executes SQL validation and quality checks, records results in test.md. Can be re-run without full rebuild. Requires Build phase completion.

Snowflake-Labs/cocoplus · 47 tokens