reaatech/rag-eval-pack/context-precision

Claude Code and agent skill by reaatech/rag-eval-pack

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install reaatech/rag-eval-pack/context-precision

SKILL.md

The same SKILL.md was published earlier as reaatech/rag-eval-pack/context-precision.

Context Precision Evaluation Skill

Overview

Context Precision measures how well the retrieved context chunks are ranked, assessing whether relevant information appears at the top of the results.

What It Measures

  • Ranked Relevance: Whether relevant chunks are ranked higher
  • Mean Average Precision (MAP): Precision at each relevant chunk position
  • Normalized DCG (NDCG): Discounted cumulative gain normalized by ideal ranking

Score Interpretation

Score RangeInterpretation
0.75 - 1.0Excellent - Relevant chunks ranked at top
0.60 - 0.74Good - Most relevant chunks near top
0.40 - 0.59Fair - Mixed ranking quality
0.0 - 0.39Poor - Relevant chunks buried in results

Usage

typescript
import { ContextPrecisionScorer } from '@reaatech/rag-eval-metrics';
const scorer = new ContextPrecisionScorer();
const result = await scorer.score({
query: 'What is the refund policy?',
context: [
'Refunds within 14 days.',
'Contact support for help.',
'Shipping takes 3-5 days.',
],
ground_truth: 'Refunds must be requested within 14 days.',
});
console.log(`Context Precision: ${result.score}`);

MCP Tool

json
{
"name": "rag_eval.judge.context_precision",
"arguments": {
"query": "What is the refund policy?",
"context": ["Refunds within 14 days.", "Contact support."],
"ground_truth": "Refunds within 14 days."
}
}

Best Practices

  1. Target >0.75: Good retrieval systems should score above 0.75
  2. Monitor ranking quality: Low scores indicate poor chunk ordering
  3. Optimize retrieval: Improve embedding quality and search algorithms
  4. Consider chunk size: Too large or small chunks affect precision

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/reaatech/rag-eval-pack/context-precision/badge)](https://verified-skill.com/skills/reaatech/rag-eval-pack/context-precision)

Something wrong with this skill or its page? Tell us.