{
  "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": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/rag-eval",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=rag-eval",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "CHANGELOG.md",
      "PRD.md",
      "README.md",
      "SKILL.md",
      "scripts/batch_eval.py",
      "scripts/run_eval.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/rag-eval",
    "agentPageUrl": "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"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "RAG Eval — Quality Testing for Your RAG Pipeline",
        "body": "Test and monitor your RAG pipeline's output quality."
      },
      {
        "title": "1. Ask OpenClaw (Recommended)",
        "body": "Tell OpenClaw: \"Install the rag-eval skill.\" The agent will handle the installation and configuration automatically."
      },
      {
        "title": "2. Manual Installation (CLI)",
        "body": "If you prefer the terminal, run:\n\nclawhub install rag-eval"
      },
      {
        "title": "⚠️ Prerequisites",
        "body": "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.\nAt least one LLM API key is required — Ragas uses an LLM as judge internally. Set one of:\n\nOPENAI_API_KEY (default, uses GPT-4o)\nANTHROPIC_API_KEY (uses Claude Haiku)\nRAGAS_LLM=ollama/llama3 (for local/offline evaluation)"
      },
      {
        "title": "Setup (first run only)",
        "body": "bash scripts/setup.sh\n\nThis installs ragas, datasets, and other dependencies."
      },
      {
        "title": "Single Response Evaluation",
        "body": "When user asks to evaluate an answer, collect:\n\nquestion — the original user question\nanswer — the LLM output to evaluate\ncontexts — list of text chunks used to generate the answer (retrieved docs)\n\n⚠️ SECURITY: Never interpolate user content directly into shell commands.\nWrite the input to a temp JSON file first, then pipe it to the evaluator:\n\n# Step 1: Write input to a temp file (agent should use the write/edit tool, NOT echo)\n# Write this JSON to /tmp/rag-eval-input.json using the file write tool:\n# {\"question\": \"...\", \"answer\": \"...\", \"contexts\": [\"chunk1\", \"chunk2\"]}\n\n# Step 2: Pipe the file to the evaluator\npython3 scripts/run_eval.py < /tmp/rag-eval-input.json\n\n# Step 3: Clean up\nrm -f /tmp/rag-eval-input.json\n\nAlternatively, use --input-file:\n\npython3 scripts/run_eval.py --input-file /tmp/rag-eval-input.json\n\nOutput JSON:\n\n{\n  \"faithfulness\": 0.92,\n  \"answer_relevancy\": 0.87,\n  \"context_precision\": 0.79,\n  \"overall_score\": 0.86,\n  \"verdict\": \"PASS\",\n  \"flags\": []\n}\n\nPost results to user with human-readable summary:\n\n🧪 Eval Results\n• Faithfulness: 0.92 ✅ (no hallucination detected)\n• Answer Relevancy: 0.87 ✅\n• Context Precision: 0.79 ⚠️ (some irrelevant context retrieved)\n• Overall: 0.86 — PASS\n\nSave to memory/eval-results/YYYY-MM-DD.jsonl."
      },
      {
        "title": "Batch Evaluation",
        "body": "For a JSONL dataset file (each line: {\"question\":..., \"answer\":..., \"contexts\":[...]}):\n\npython3 scripts/batch_eval.py --input references/sample_dataset.jsonl --output memory/eval-results/batch-YYYY-MM-DD.json"
      },
      {
        "title": "Score Interpretation",
        "body": "ScoreVerdictMeaning0.85+✅ PASSProduction-ready quality0.70-0.84⚠️ REVIEWNeeds improvement< 0.70❌ FAILSignificant quality issues"
      },
      {
        "title": "Faithfulness Deep-Dive",
        "body": "If faithfulness < 0.80, run:\n\npython3 scripts/run_eval.py --explain --metric faithfulness\n\nThis outputs which sentences in the answer are NOT supported by context."
      },
      {
        "title": "Notes",
        "body": "Ragas uses an LLM internally as judge (uses your configured OpenAI/Anthropic key)\nEvaluation costs ~$0.01-0.05 per response depending on length\nFor offline use, set RAGAS_LLM=ollama/llama3 in environment"
      }
    ],
    "body": "RAG Eval — Quality Testing for Your RAG Pipeline\n\nTest and monitor your RAG pipeline's output quality.\n\n🛠️ Installation\n1. Ask OpenClaw (Recommended)\n\nTell OpenClaw: \"Install the rag-eval skill.\" The agent will handle the installation and configuration automatically.\n\n2. Manual Installation (CLI)\n\nIf you prefer the terminal, run:\n\nclawhub install rag-eval\n\n⚠️ Prerequisites\nYour 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.\nAt least one LLM API key is required — Ragas uses an LLM as judge internally. Set one of:\nOPENAI_API_KEY (default, uses GPT-4o)\nANTHROPIC_API_KEY (uses Claude Haiku)\nRAGAS_LLM=ollama/llama3 (for local/offline evaluation)\nSetup (first run only)\nbash scripts/setup.sh\n\n\nThis installs ragas, datasets, and other dependencies.\n\nSingle Response Evaluation\n\nWhen user asks to evaluate an answer, collect:\n\nquestion — the original user question\nanswer — the LLM output to evaluate\ncontexts — list of text chunks used to generate the answer (retrieved docs)\n\n⚠️ SECURITY: Never interpolate user content directly into shell commands. Write the input to a temp JSON file first, then pipe it to the evaluator:\n\n# Step 1: Write input to a temp file (agent should use the write/edit tool, NOT echo)\n# Write this JSON to /tmp/rag-eval-input.json using the file write tool:\n# {\"question\": \"...\", \"answer\": \"...\", \"contexts\": [\"chunk1\", \"chunk2\"]}\n\n# Step 2: Pipe the file to the evaluator\npython3 scripts/run_eval.py < /tmp/rag-eval-input.json\n\n# Step 3: Clean up\nrm -f /tmp/rag-eval-input.json\n\n\nAlternatively, use --input-file:\n\npython3 scripts/run_eval.py --input-file /tmp/rag-eval-input.json\n\n\nOutput JSON:\n\n{\n  \"faithfulness\": 0.92,\n  \"answer_relevancy\": 0.87,\n  \"context_precision\": 0.79,\n  \"overall_score\": 0.86,\n  \"verdict\": \"PASS\",\n  \"flags\": []\n}\n\n\nPost results to user with human-readable summary:\n\n🧪 Eval Results\n• Faithfulness: 0.92 ✅ (no hallucination detected)\n• Answer Relevancy: 0.87 ✅\n• Context Precision: 0.79 ⚠️ (some irrelevant context retrieved)\n• Overall: 0.86 — PASS\n\n\nSave to memory/eval-results/YYYY-MM-DD.jsonl.\n\nBatch Evaluation\n\nFor a JSONL dataset file (each line: {\"question\":..., \"answer\":..., \"contexts\":[...]}):\n\npython3 scripts/batch_eval.py --input references/sample_dataset.jsonl --output memory/eval-results/batch-YYYY-MM-DD.json\n\nScore Interpretation\nScore\tVerdict\tMeaning\n0.85+\t✅ PASS\tProduction-ready quality\n0.70-0.84\t⚠️ REVIEW\tNeeds improvement\n< 0.70\t❌ FAIL\tSignificant quality issues\nFaithfulness Deep-Dive\n\nIf faithfulness < 0.80, run:\n\npython3 scripts/run_eval.py --explain --metric faithfulness\n\n\nThis outputs which sentences in the answer are NOT supported by context.\n\nNotes\nRagas uses an LLM internally as judge (uses your configured OpenAI/Anthropic key)\nEvaluation costs ~$0.01-0.05 per response depending on length\nFor offline use, set RAGAS_LLM=ollama/llama3 in environment"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/JonathanJing/rag-eval",
    "publisherUrl": "https://clawhub.ai/JonathanJing/rag-eval",
    "owner": "JonathanJing",
    "version": "1.2.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "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"
  }
}