LaunchKit · 2026
Back to Skills

rag-eval

Evaluate your RAG pipeline quality using Ragas metrics (faithfulness, answer relevancy, context precision).

2
381 downloads
by @jonathanjing

Setup & Installation

openclaw skills install @jonathanjing/rag-eval

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install rag-eval

Version History

v1.2.1Mar 4, 2026 - Version note by skill developer:

Fixed versioning regression and added simplified installation instructions.

What This Skill Does

Evaluates RAG pipeline output quality using Ragas metrics: faithfulness, answer relevancy, and context precision. Requires an existing RAG system with a vector DB and retrieval pipeline. An LLM serves as the judge, configurable via OpenAI, Anthropic, or a local model like Ollama.

Ragas applies LLM-graded metrics for faithfulness and relevancy that manual spot-checking or simple string matching cannot reliably replicate.

When to use it

  • Checking if a chatbot's answers are supported by retrieved documents
  • Detecting hallucinations in RAG-generated responses before shipping
  • Running batch quality checks on a Q&A dataset ahead of deployment
  • Identifying irrelevant context chunks reducing retrieval precision
  • Tracking RAG output quality over time with daily scored logs

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: Evaluate this RAG response — question: 'What is the return policy?', answer: 'Returns are accepted within 30 days.', contexts: ['Our policy allows returns within 30 days of purchase.']

AGENT
  1. 1Write the question, answer, and contexts as JSON to /tmp/rag-eval-input.json
  2. 2Run python3 scripts/run_eval.py --input-file /tmp/rag-eval-input.json
  3. 3Parse output scores for faithfulness, answer_relevancy, context_precision, and overall_score
  4. 4Delete the temp file
  5. 5Present a human-readable summary with PASS/REVIEW/FAIL verdict
OUTPUT

Faithfulness: 0.95 ✅, Answer Relevancy: 0.91 ✅, Context Precision: 0.88 ✅, Overall: 0.91 — PASS

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

OPENAI_API_KEY environment variable (default judge, uses GPT-4o)ANTHROPIC_API_KEY environment variable (alternative judge, uses Claude Haiku)