continuous-evaluation
БесплатноБез исполняемых скриптовНе проверенCI/CD for RAG quality: golden dataset fixtures, RAGAS/DeepEval in pytest, regression thresholds, GitHub Actions workflows, merge-blocking gates, weekly…
от claude-dev-suite★ 51 звезда на GitHubОб этом скилле
Continuous RAG Evaluation
Three Layers of Cadence
| Layer | When | Budget | Purpose |
|---|---|---|---|
| PR gate | Every pull request | <5 min, $0-$5 | Block obvious regressions |
| Nightly | Daily scheduled | 20-60 min, $10-$50 | Full gold set + trend reporting |
| Weekly | Weekly scheduled | Hours, $50-$300 | Refresh testset, sample live traffic |
Missing any of these layers leaves a gap. PR gate without nightly misses slow drift; nightly without PR gate lets bad PRs land.
Golden Dataset as a Fixture
# tests/fixtures/gold.py
import json, functools
@functools.lru_cache(maxsize=1)
def load_gold():
with open("tests/fixtures/gold.jsonl") as f:
return [json.loads(l) for l in f]
# tests/fixtures/gold.jsonl is git-tracked
{"id":"g001","question":"How do I rotate an API key?","expected":"Settings > API Keys > Rotate","relevant_doc_ids":["kb-042","kb-110"],"category":"procedural","difficulty":"easy"}
{"id":"g002","question":"Which SSO providers are supported?","expected":"Okta, Google Workspace, Microsoft Entra","relevant_doc_ids":["kb-200"],"category":"factual","difficulty":"easy"}
Rules:
- Keep 100-300 records minimum.
- Stratify across category, difficulty, persona.
- Version with git; never mutate without a PR.
- Add one failing production query each week.
PR Gate with DeepEval + Pytest
# tests/test_rag_pr_gate.py
import pytest
from deepeval import assert_test
from deepeval.test_case import LLMTestCase
from deepeval.metrics import (
FaithfulnessMetric, AnswerRelevancyMetric,
ContextualPrecisionMetric, ContextualRecallMetric,
)
from fixtures.gold import load_gold
from rag_pipeline import answer
# Fast subset: only `difficulty == easy` runs on PR
GOLD_PR = [g for g in load_gold() if g["difficulty"] == "easy"][:30]
@pytest.mark.parametrize("gold", GOLD_PR, ids=lambda g: g["id"])
def test_pr_gate(gold):
result = answer(gold["question"])
tc = LLMTestCase(
input=gold["question"],
actual_output=result.answer,
expected_output=gold["expected"],
retrieval_context=result.contexts,
)
assert_test(tc, [
FaithfulnessMetric(threshold=0.80),
AnswerRelevancyMetric(threshold=0.80),
ContextualPrecisionMetric(threshold=0.70),
ContextualRecallMetric(threshold=0.75),
])
Run: pytest tests/test_rag_pr_gate.py -n 4 --maxfail=3.
Nightly RAGAS Eval
# eval/nightly.py
from datasets import Dataset
from ragas import evaluate
from ragas.metrics import (faithfulness, answer_relevancy,
context_precision, context_recall, answer_correctness)
from rag_pipeline import answer
from fixtures.gold import load_gold
import json, os, time
rows = []
for g in load_gold():
r = answer(g["question"])
rows.append({
"user_input": g["question"],
"retrieved_contexts": r.contexts,
"response": r.answer,
"reference": g["expected"],
})
ds = Dataset.from_list(rows)
result = evaluate(ds, metrics=[faithfulness, answer_relevancy,
context_precision, context_recall,
answer_correctness])
df = result.to_pandas()
summary = {
"timestamp": int(time.time()),
"commit_sha": os.environ.get("GITHUB_SHA", "local"),
"metrics": {c: float(df[c].mean()) for c in df.select_dtypes("number").columns},
}
with open("eval/history.jsonl", "a") as f:
f.write(json.dumps(summary) + "\n")
# Regression check vs baseline
with open("eval/baseline.json") as f:
baseline = json.load(f)
for metric, value in summary["metrics"].items():
base = baseline.get(metric, 0.0)
if value < base - 0.03:
raise SystemExit(f"REGRESSION: {metric} {value:.3f} < baseline {base:.3f} - 0.03")
GitHub Actions Workflow
# .github/workflows/rag-eval.yml
name: RAG Evaluation
on:
pull_request:
paths:
- "src/rag/**"
- "prompts/**"
- "configs/retriever.yaml"
- "tests/fixtures/gold.jsonl"
schedule:
- cron: "0 3 * * *" # nightly 03:00 UTC
jobs:
pr-gate:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: {python-version: "3.12"}
- run: pip install -r requirements-eval.txt
- run: pytest tests/test_rag_pr_gate.py -n 4 --maxfail=3 --junitxml=gate.xml
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: pr-gate-report
path: gate.xml
nightly:
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: {python-version: "3.12"}
- run: pip install -r requirements-eval.txt
Установить continuous-evaluation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGrepGlobWriteEditFAQ
Что делает скилл continuous-evaluation?
CI/CD for RAG quality: golden dataset fixtures, RAGAS/DeepEval in pytest, regression thresholds, GitHub Actions workflows, merge-blocking gates, weekly scheduled eval, LangSmith/Langfuse in CI. USE WHEN: user mentions "RAG CI", "eval in CI", "regression gate", "golden dataset fixture", "PR quality check", "scheduled RAG evaluation", "LangSmith CI", "Langfuse CI" DO NOT USE FOR: RAGAS metric internals - use `rag-evaluation`; ARES - use `ares-framework`; Giskard internals - use `giskard-rag`; shadow deploys - use `shadow-mode-deployment`
Как установить скилл continuous-evaluation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл continuous-evaluation запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub