evaluate

evaluate is a skill for Claude Code from softspark/ai-toolkit. It costs 42 tokens per session (1,140 once invoked), scanned A, original, Apache-2.0.

A testing workflow for retrieval-augmented generation, or RAG, where an AI answers using retrieved documents. It measures whether answers are supported, relevant, and based on useful retrieved context, and reports knowledge gaps.

In plain words
What is it for?
Checking RAG quality with test datasets, setting score thresholds, detecting missing knowledge, and generating evaluation reports.
Why use it?
It helps reveal when an AI search-and-answer system gives unsupported answers or retrieves the wrong information.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/evaluate_rag.py.

Part of the ai-toolkit plugin — 113 skills, 44 agents, 14 hooks shipped together

Good fit Checking RAG quality with test datasets, setting score thresholds, detecting missing knowledge…

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit
agentmods
npx agentmods add skills/softspark/ai-toolkit/evaluate

Made for: Claude Code.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 113 skills, 44 agents, 14 hooks.

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 evaluate

README.md
[![agentmods](https://agentmods.dev/badge/skills/softspark/ai-toolkit/evaluate.svg)](https://agentmods.dev/skills/softspark/ai-toolkit/evaluate)
Your own site
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/evaluate"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/evaluate.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,140 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.00042 $0.01140
Opus 5 $0.00021 $0.00570
Sonnet 5 $0.00008 $0.00228
Haiku 4.5 $0.00004 $0.00114

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

Security

Grade A, and why

evaluate 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 3d 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.

app/skills/evaluate/SKILL.md · 154 lines

How it starts

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

RAG Evaluation

Evaluate RAG quality using LLM-as-a-Judge methodology.

Usage

/evaluate [--threshold 0.7]

Execution

Direct Execution (recommended for most projects)

# Run RAG evaluation
python3 scripts/evaluate_rag.py

# With custom thresholds
python3 scripts/evaluate_rag.py \
  --faithfulness 0.7 \
  --relevancy 0.7 \
  --context 0.6

# Detect knowledge gaps
python3 scripts/knowledge_gaps.py --detect

# Generate gap report
python3 scripts/knowledge_gaps.py --report

Docker Execution (containerized projects)

# Replace {api-container} with your API server container name
docker exec {api-container} python3 scripts/evaluate_rag.py

# With custom thresholds
docker exec {api-container} python3 scripts/evaluate_rag.py \
  --faithfulness 0.7 \
  --relevancy 0.7 \
  --context 0.6

# Detect knowledge gaps
docker exec {api-container} python3 scripts/knowledge_gaps.py --detect

# Generate gap report
docker exec {api-container} python3 scripts/knowledge_gaps.py --report

Metrics

Metric Description Target
Faithfulness Is answer based on context? >70%
Relevancy Does answer address question? >70%
Context Precision Is found context accurate? >60%

Evaluation Process

  1. Generate test queries from golden dataset
  2. Execute RAG pipeline for each query
  3. LLM judges each response on metrics
  4. Report aggregate scores

Golden Dataset

Located at: scripts/golden_dataset.json (or project-specific path)

{
  "queries": [
    {
      "query": "How to configure rate limiting?",
      "expected_topics": ["nginx", "rate-limiting"],
      "expected_sources": ["kb/nginx/howto/rate-limiting.md"]
    }
  ]
}

Output Example

RAG Evaluation Results
======================
Total Queries: 50
Average Faithfulness: 0.82
Average Relevancy: 0.78
Average Context Precision: 0.71

Quality: GOOD

Failed Queries (faithfulness < 0.7):
- Query: "How to backup PostgreSQL?"
  Score: 0.45
  Issue: No relevant documents found

Read the full file on GitHub · 154 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. 3d ago First seen · 154 lines · 42 tokens per session scan A 09c45695469d

Subscribe to this mod's changes

evaluate is a skill published in the GitHub repository softspark/ai-toolkit (170 stars, last pushed 2d ago), licensed Apache-2.0. It adds 42 tokens to every session and 1,140 once invoked, about $0.0002 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.