# Send RAG Eval to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "rag-eval",
    "name": "RAG Eval",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/JonathanJing/rag-eval",
    "canonicalUrl": "https://clawhub.ai/JonathanJing/rag-eval",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/rag-eval",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=rag-eval",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "CHANGELOG.md",
      "PRD.md",
      "README.md",
      "SKILL.md",
      "scripts/batch_eval.py",
      "scripts/run_eval.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "rag-eval",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-03T08:57:47.839Z",
      "expiresAt": "2026-05-10T08:57:47.839Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=rag-eval",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=rag-eval",
        "contentDisposition": "attachment; filename=\"rag-eval-1.2.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "rag-eval"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/rag-eval"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/rag-eval",
    "downloadUrl": "https://openagent3.xyz/downloads/rag-eval",
    "agentUrl": "https://openagent3.xyz/skills/rag-eval/agent",
    "manifestUrl": "https://openagent3.xyz/skills/rag-eval/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/rag-eval/agent.md"
  }
}
```
## Documentation

### RAG Eval — Quality Testing for Your RAG Pipeline

Test and monitor your RAG pipeline's output quality.

### 1. Ask OpenClaw (Recommended)

Tell OpenClaw: "Install the rag-eval skill." The agent will handle the installation and configuration automatically.

### 2. Manual Installation (CLI)

If you prefer the terminal, run:

clawhub install rag-eval

### ⚠️ Prerequisites

Your OpenClaw must have a RAG system (vector DB + retrieval pipeline). This skill evaluates the output quality of that pipeline — it does not provide RAG functionality itself.
At least one LLM API key is required — Ragas uses an LLM as judge internally. Set one of:

OPENAI_API_KEY (default, uses GPT-4o)
ANTHROPIC_API_KEY (uses Claude Haiku)
RAGAS_LLM=ollama/llama3 (for local/offline evaluation)

### Setup (first run only)

bash scripts/setup.sh

This installs ragas, datasets, and other dependencies.

### Single Response Evaluation

When user asks to evaluate an answer, collect:

question — the original user question
answer — the LLM output to evaluate
contexts — list of text chunks used to generate the answer (retrieved docs)

⚠️ SECURITY: Never interpolate user content directly into shell commands.
Write the input to a temp JSON file first, then pipe it to the evaluator:

# Step 1: Write input to a temp file (agent should use the write/edit tool, NOT echo)
# Write this JSON to /tmp/rag-eval-input.json using the file write tool:
# {"question": "...", "answer": "...", "contexts": ["chunk1", "chunk2"]}

# Step 2: Pipe the file to the evaluator
python3 scripts/run_eval.py < /tmp/rag-eval-input.json

# Step 3: Clean up
rm -f /tmp/rag-eval-input.json

Alternatively, use --input-file:

python3 scripts/run_eval.py --input-file /tmp/rag-eval-input.json

Output JSON:

{
  "faithfulness": 0.92,
  "answer_relevancy": 0.87,
  "context_precision": 0.79,
  "overall_score": 0.86,
  "verdict": "PASS",
  "flags": []
}

Post results to user with human-readable summary:

🧪 Eval Results
• Faithfulness: 0.92 ✅ (no hallucination detected)
• Answer Relevancy: 0.87 ✅
• Context Precision: 0.79 ⚠️ (some irrelevant context retrieved)
• Overall: 0.86 — PASS

Save to memory/eval-results/YYYY-MM-DD.jsonl.

### Batch Evaluation

For a JSONL dataset file (each line: {"question":..., "answer":..., "contexts":[...]}):

python3 scripts/batch_eval.py --input references/sample_dataset.jsonl --output memory/eval-results/batch-YYYY-MM-DD.json

### Score Interpretation

ScoreVerdictMeaning0.85+✅ PASSProduction-ready quality0.70-0.84⚠️ REVIEWNeeds improvement< 0.70❌ FAILSignificant quality issues

### Faithfulness Deep-Dive

If faithfulness < 0.80, run:

python3 scripts/run_eval.py --explain --metric faithfulness

This outputs which sentences in the answer are NOT supported by context.

### Notes

Ragas uses an LLM internally as judge (uses your configured OpenAI/Anthropic key)
Evaluation costs ~$0.01-0.05 per response depending on length
For offline use, set RAGAS_LLM=ollama/llama3 in environment
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: JonathanJing
- Version: 1.2.1
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-03T08:57:47.839Z
- Expires at: 2026-05-10T08:57:47.839Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/rag-eval)
- [Send to Agent page](https://openagent3.xyz/skills/rag-eval/agent)
- [JSON manifest](https://openagent3.xyz/skills/rag-eval/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/rag-eval/agent.md)
- [Download page](https://openagent3.xyz/downloads/rag-eval)