ares-framework
БесплатноБез исполняемых скриптовНе проверенARES (Stanford) automated RAG evaluation: synthetic query generation, fine-tuned classifiers for faithfulness and relevance, prediction-powered inference…
от claude-dev-suite★ 51 звезда на GitHubОб этом скилле
ARES Evaluation Framework
What ARES Is
ARES (Stanford, 2024) is an automated RAG evaluation framework. Unlike RAGAS, which uses a large LLM as judge at eval time, ARES trains small classifiers (DeBERTa-size) on synthetic data, then uses prediction-powered inference (PPI) to combine classifier outputs with a small human-labeled set for statistically unbiased estimates.
Core claim: you can get tight confidence intervals on RAG quality metrics with as few as 150-300 human labels, plus thousands of synthetic examples.
Three Scored Dimensions
| Dimension | Question |
|---|---|
| Context Relevance | Is retrieved context relevant to the query? |
| Answer Faithfulness | Is the answer grounded in the context (no hallucination)? |
| Answer Relevance | Does the answer address the query? |
Each is a binary classifier producing probability scores.
Pipeline
corpus -> synth (q, ctx, a, labels) -> train 3 classifiers
|
v
prod logs (q, ctx, a) -> classifier predictions -> PPI <- gold (150-300 human labels)
|
v
unbiased metric + confidence interval
Setup
pip install ares-ai
Requires a local GPU (~16GB VRAM) for classifier fine-tuning.
Synthetic Query Generation
from ares import ARES
ares = ARES(
synthetic_query_generator="google/flan-t5-xl",
document_filepaths=["corpus.tsv"],
few_shot_prompt_filename="few_shot_prompts.tsv",
synthetic_queries_filenames=["synth_queries.tsv"],
documents_sampled=10000,
)
ares.generate_synthetic_data()
The synthetic set contains:
- Relevant positive examples (query + matching context).
- Negative contexts (query + random / near-miss context).
- Hallucinated answers (inject contradictions).
- Unfaithful rewrites.
Training Judge Classifiers
classifier_cfg = {
"classification_dataset": "synth_queries.tsv",
"test_set_selection": "gold_test.tsv",
"label_column": ["Context_Relevance_Label",
"Answer_Faithfulness_Label",
"Answer_Relevance_Label"],
"num_epochs": 10,
"patience_value": 3,
"learning_rate": 5e-6,
"training_dataset_path": "synth_queries.tsv",
"assigned_batch_size": 8,
"gradient_accumulation_multiplier": 16,
"model_choice": "microsoft/deberta-v3-large",
}
ares.train_classifier(**classifier_cfg)
Output: three fine-tuned DeBERTa classifiers saved to disk.
Prediction-Powered Inference (PPI)
Human labels are expensive. Pure LLM-judge is cheap but biased. PPI gives unbiased estimates by correcting classifier bias using a small labeled sample.
ppi_cfg = {
"evaluation_datasets": ["prod_logs_labeled.tsv"], # has ~200 human labels + classifier preds
"few_shot_examples_filepath": "few_shot_prompts.tsv",
"checkpoints": ["ckpt_context_rel.pt",
"ckpt_faithfulness.pt",
"ckpt_answer_rel.pt"],
"labels": ["Context_Relevance_Label",
"Answer_Faithfulness_Label",
"Answer_Relevance_Label"],
"gold_label_path": "gold_labels.tsv",
}
scores = ares.evaluate_RAG(**ppi_cfg)
# {
# "Context Relevance": {"score": 0.83, "ci_low": 0.79, "ci_high": 0.87},
# "Answer Faithfulness":{"score": 0.91, "ci_low": 0.88, "ci_high": 0.94},
# "Answer Relevance": {"score": 0.77, "ci_low": 0.72, "ci_high": 0.82},
# }
PPI output includes confidence intervals — critical for reporting and A/B tests.
PPI Math (Intuition)
Let f(x) be the classifier prediction, y be the true label on gold set of size n, and classifier predictions on an unlabeled set of size N.
mean_true ~= mean(f over unlabeled) + mean(y - f over gold)
^^^^^ biased estimator ^^^^^ bias correction
CI shrinks as both n and N grow; N is cheap (classifier predictions), so PPI gives near-full-label precision with small n.
Comparison with RAGAS
| Aspect | RAGAS | ARES |
|---|---|---|
| Judge | Large LLM (GPT-4, Claude Sonnet) at eval time | Small fine-tuned classifier |
| Cost per 1000 evals | $5-20 (LLM calls) | ~$0 (local inference) |
| Calibration | Prompt-engineered, hard to debug | Classifier + PPI, statistically grounded |
| Labeled data | None needed | 150-300 gold labels required |
| Infrastructure | API key only | Needs GPU for training |
| Confidence intervals | Not built-in | Native via PPI |
| Domain adaptation | Rewrite prompt | Fine-tune on domain synth |
| Startup cost | Minutes | Hours (training) |
| Ongoing eval speed | API-bound | Fast (local) |
When ARES Wins
- You evaluate at scale (>100k samples per run) and LLM-judge cost is prohibitive.
- You need confidence intervals for A/B tests or regulatory reporting.
- You have a specialized domain (medical, legal) where generic LLM judges mis
Установить ares-framework в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGrepGlobWriteEditFAQ
Что делает скилл ares-framework?
ARES (Stanford) automated RAG evaluation: synthetic query generation, fine-tuned classifiers for faithfulness and relevance, prediction-powered inference (PPI) for unbiased estimates from a small gold set. Compared to RAGAS. USE WHEN: user mentions "ARES", "Stanford ARES", "prediction-powered inference", "PPI for RAG", "ares-ai", "fine-tuned RAG judges", "automated RAG eval with small gold set" DO NOT USE FOR: LLM-as-judge only workflow - use `rag-evaluation` (RAGAS); Giskard tooling - use `giskard-rag`; CI integration patterns - use `continuous-evaluation`
Как установить скилл ares-framework?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ares-framework запускает скрипты?
Нет, скилл состоит только из инструкций (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