AI Agent Evaluation
БесплатноБез исполняемых скриптовНе проверенComprehensive evaluation patterns for AI agents including multi-turn conversation testing, LLM-as-judge frameworks, benchmark suites, regression detection…
от PramodDutta★ 253 звезды на GitHubОб этом скилле
AI Agent Evaluation Skill
You are an expert in evaluating AI agents and LLM-powered systems. When the user asks you to build evaluation frameworks, create benchmarks, implement LLM-as-judge patterns, test multi-turn conversations, or measure agent quality, follow these detailed instructions to produce robust, reproducible evaluation systems.
Core Principles
- Deterministic evaluation pipelines -- Every eval must be reproducible. Pin model versions, temperatures, seed values, and system prompts so results can be compared across runs.
- Multi-dimensional scoring -- Never rely on a single metric. Evaluate correctness, helpfulness, safety, latency, cost, and task completion as separate dimensions.
- LLM-as-judge with calibration -- When using LLMs to judge outputs, calibrate judges against human annotations and measure inter-judge agreement before trusting automated scores.
- Golden dataset management -- Maintain versioned datasets of input/expected-output pairs. Tag each example with difficulty, category, and edge-case classification.
- Regression detection over absolute scores -- Track score changes between agent versions rather than chasing absolute numbers. A 2% drop from a reliable baseline matters more than a 90% absolute score.
- Safety and alignment testing -- Every eval suite must include adversarial inputs, prompt injection attempts, and boundary-testing cases that verify the agent refuses harmful requests.
- Statistical rigor -- Report confidence intervals, run multiple trials, and use proper statistical tests when comparing agent versions. Never declare a winner based on a single run.
Project Structure
evals/
datasets/
golden/
coding-tasks.jsonl
qa-pairs.jsonl
multi-turn-conversations.jsonl
adversarial-inputs.jsonl
edge-cases.jsonl
generated/
synthetic-tasks.jsonl
judges/
correctness-judge.ts
helpfulness-judge.ts
safety-judge.ts
code-quality-judge.ts
composite-judge.ts
runners/
eval-runner.ts
batch-runner.ts
parallel-runner.ts
metrics/
scoring.ts
statistical.ts
aggregation.ts
reports/
html-reporter.ts
json-reporter.ts
regression-detector.ts
config/
eval-config.ts
model-config.ts
tests/
judge-calibration.test.ts
metric-accuracy.test.ts
pipeline-integration.test.ts
results/
.gitkeep
Eval Dataset Format
// evals/datasets/types.ts
export interface EvalExample {
id: string;
input: string | ConversationTurn[];
expectedOutput?: string;
expectedBehavior?: string;
tags: string[];
difficulty: 'easy' | 'medium' | 'hard' | 'adversarial';
category: string;
metadata?: Record<string, unknown>;
}
export interface ConversationTurn {
role: 'user' | 'assistant' | 'system';
content: string;
}
export interface EvalResult {
exampleId: string;
agentOutput: string;
scores: Record<string, number>;
judgeReasonings: Record<string, string>;
latencyMs: number;
tokenUsage: { input: number; output: number };
timestamp: string;
agentVersion: string;
error?: string;
}
export interface EvalSuiteResult {
suiteId: string;
agentVersion: string;
timestamp: string;
results: EvalResult[];
aggregateScores: Record<string, AggregateScore>;
totalExamples: number;
passedExamples: number;
failedExamples: number;
errorExamples: number;
}
export interface AggregateScore {
mean: number;
median: number;
stdDev: number;
min: number;
max: number;
p5: number;
p95: number;
confidenceInterval: { lower: number; upper: number };
sampleSize: number;
}
LLM-as-Judge Implementation
// evals/judges/correctness-judge.ts
import Anthropic from '@anthropic-ai/sdk';
export interface JudgeResult {
score: number; // 0-10 scale
reasoning: string;
confidence: number; // 0-1
flags: string[];
}
export interface JudgeConfig {
model: string;
temperature: number;
maxTokens: number;
systemPrompt: string;
scoringRubric: string;
}
const DEFAULT_CORRECTNESS_CONFIG: JudgeConfig = {
model: 'claude-sonnet-4-20250514',
temperature: 0,
maxTokens: 1024,
systemPrompt: `You are an expert evaluator assessing the correctness of AI agent responses.
You must be objective, precise, and consistent in your scoring.
Always provide a numerical score and detailed reasoning.`,
scoringRubric: `Score the response on a 0-10 scale:
- 10: Perfectly correct, complete, and well-explained
- 8-9: Correct with minor omissions or imprecisions
- 6-7: Mostly correct but missing important details
- 4-5: Partially correct with significant errors
- 2-3: Mostly incorrect with some relevant elements
- 0-1: Completely incorrect or harmful`,
};
export class CorrectnessJudge {
private client: Anthropic;
private config: JudgeConfig;
constructor(config: Partial<JudgeConfig> = {}) {
this.client = new Anthropic();
this.config = { ...DEFAULT_CORRECTNESS_CONFIG, ...
Установить AI Agent Evaluation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл AI Agent Evaluation?
Comprehensive evaluation patterns for AI agents including multi-turn conversation testing, LLM-as-judge frameworks, benchmark suites, regression detection, and systematic eval pipelines for measuring agent quality and safety.
Как установить скилл AI Agent Evaluation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл AI Agent Evaluation запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic