Implement comprehensive evaluation strategies for LLM

LLM evaluation

by wshobson · MIT license · ★ 39,857 on GitHub · updated Sep 21

LLM evaluation cover

Implement comprehensive evaluation strategies for LLM applications using automated metrics, human feedback, and benchmarking. Use when testing LLM performance, measuring AI application quality, or establishing evaluation frameworks.

---
name: llm-evaluation
description: Implement comprehensive evaluation strategies for LLM applications using automated metrics, human feedback, and benchmarking. Use when testing LLM performance, measuring AI application quality, or establishing evaluation frameworks.
---

# LLM Evaluation

Master comprehensive evaluation strategies for LLM applications, from automated metrics to human evaluation and A/B testing.

## When to Use This Skill

- Measuring LLM application performance systematically
- Comparing different models or prompts
- Detecting performance regressions before deployment
- Validating improvements from prompt changes
- Building confidence in production systems
- Establishing baselines and tracking progress over time
- Debugging unexpected model behavior

Overview

Master comprehensive evaluation strategies for LLM applications, from automated metrics to human evaluation and A/B testing.

Manual install (npx, ZIP)
Claude Codenpx skills add wshobson/agents --skill llm-evaluation -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/wshobson/agents/tar.gz/4236bb91f839 \ | tar -xz -C ~/.claude/skills --strip-components=4 agents-4236bb91f839/plugins/llm-application-dev/skills/llm-evaluation
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/3105164cca6232c6a8ab/llm-evaluation.zip" -OutFile "$env:TEMP\llm-evaluation.zip"; Expand-Archive "$env:TEMP\llm-evaluation.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md3.8 KB
  • references/1 file · 13.7 KB
Read the files here
wshobson/4236bb92 files
SKILL.md
Show the full text146 lines

LLM Evaluation

Master comprehensive evaluation strategies for LLM applications, from automated metrics to human evaluation and A/B testing.

When to Use This Skill

  • Measuring LLM application performance systematically
  • Comparing different models or prompts
  • Detecting performance regressions before deployment
  • Validating improvements from prompt changes
  • Building confidence in production systems
  • Establishing baselines and tracking progress over time
  • Debugging unexpected model behavior

Core Evaluation Types

1. Automated Metrics

Fast, repeatable, scalable evaluation using computed scores.

Text Generation:

  • BLEU: N-gram overlap (translation)
  • ROUGE: Recall-oriented (summarization)
  • METEOR: Semantic similarity
  • BERTScore: Embedding-based similarity
  • Perplexity: Language model confidence

Classification:

  • Accuracy: Percentage correct
  • Precision/Recall/F1: Class-specific performance
  • Confusion Matrix: Error patterns
  • AUC-ROC: Ranking quality

Retrieval (RAG):

  • MRR: Mean Reciprocal Rank
  • NDCG: Normalized Discounted Cumulative Gain
  • Precision@K: Relevant in top K
  • Recall@K: Coverage in top K
2. Human Evaluation

Manual assessment for quality aspects difficult to automate.

Dimensions:

  • Accuracy: Factual correctness
  • Coherence: Logical flow
  • Relevance: Answers the question
  • Fluency: Natural language quality
  • Safety: No harmful content
  • Helpfulness: Useful to the user
3. LLM-as-Judge

Use stronger LLMs to evaluate weaker model outputs.

Approaches:

  • Pointwise: Score individual responses
  • Pairwise: Compare two responses
  • Reference-based: Compare to gold standard
  • Reference-free: Judge without ground truth

Quick Start

from dataclasses import dataclass
from typing import Callable
import numpy as np

@dataclass
class Metric:
    name: str
    fn: Callable

    @staticmethod
    def accuracy():
        return Metric("accuracy", calculate_accuracy)

    @staticmethod
    def bleu():
        return Metric("bleu", calculate_bleu)

    @staticmethod
    def bertscore():
        return Metric("bertscore", calculate_bertscore)

    @staticmethod
    def custom(name: str, fn: Callable):
        return Metric(name, fn)

class EvaluationSuite:
    def __init__(self, metrics: list[Metric]):
        self.metrics = metrics

    async def evaluate(self, model, test_cases: list[dict]) -> dict:
        results = {m.name: [] for m in self.metrics}

        for test in test_cases:
            prediction = await model.predict(test["input"])

            for metric in self.metrics:
                score = metric.fn(
                    prediction=prediction,
                    reference=test.get("expected"),
                    context=test.get("context")
                )
                results[metric.name].append(score)

        return {
            "metrics": {k: np.mean(v) for k, v in results.items()},
            "raw_scores": results
        }

# Usage
suite = EvaluationSuite([
    Metric.accuracy(),
    Metric.bleu(),
    Metric.bertscore(),
    Metric.custom("groundedness", check_groundedness)
])

test_cases = [
    {
        "input": "What is the capital of France?",
        "expected": "Paris",
        "context": "France is a country in Europe. Paris is its capital."
    },
]

results = await suite.evaluate(model=your_model, test_cases=test_cases)

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

1---
2name: llm-evaluation
3description: Implement comprehensive evaluation strategies for LLM applications using automated metrics, human feedback, and benchmarking. Use when testing LLM performance, measuring AI application quality, or establishing evaluation frameworks.
4---
5 
6# LLM Evaluation
7 
8Master comprehensive evaluation strategies for LLM applications, from automated metrics to human evaluation and A/B testing.
9 
10## When to Use This Skill
11 
12- Measuring LLM application performance systematically
13- Comparing different models or prompts
14- Detecting performance regressions before deployment
15- Validating improvements from prompt changes
16- Building confidence in production systems
17- Establishing baselines and tracking progress over time
18- Debugging unexpected model behavior
19 
20## Core Evaluation Types
21 
22### 1. Automated Metrics
23 
24Fast, repeatable, scalable evaluation using computed scores.
25 
26**Text Generation:**
27 
28- **BLEU**: N-gram overlap (translation)
29- **ROUGE**: Recall-oriented (summarization)
30- **METEOR**: Semantic similarity
31- **BERTScore**: Embedding-based similarity
32- **Perplexity**: Language model confidence
33 
34**Classification:**
35 
36- **Accuracy**: Percentage correct
37- **Precision/Recall/F1**: Class-specific performance
38- **Confusion Matrix**: Error patterns
39- **AUC-ROC**: Ranking quality
40 
41**Retrieval (RAG):**
42 
43- **MRR**: Mean Reciprocal Rank
44- **NDCG**: Normalized Discounted Cumulative Gain
45- **Precision@K**: Relevant in top K
46- **Recall@K**: Coverage in top K
47 
48### 2. Human Evaluation
49 
50Manual assessment for quality aspects difficult to automate.
51 
52**Dimensions:**
53 
54- **Accuracy**: Factual correctness
55- **Coherence**: Logical flow
56- **Relevance**: Answers the question
57- **Fluency**: Natural language quality
58- **Safety**: No harmful content
59- **Helpfulness**: Useful to the user
60 
61### 3. LLM-as-Judge
62 
63Use stronger LLMs to evaluate weaker model outputs.
64 
65**Approaches:**
66 
67- **Pointwise**: Score individual responses
68- **Pairwise**: Compare two responses
69- **Reference-based**: Compare to gold standard
70- **Reference-free**: Judge without ground truth
71 
72## Quick Start
73 
74```python
75from dataclasses import dataclass
76from typing import Callable
77import numpy as np
78 
79@dataclass
80class Metric:
81 name: str
82 fn: Callable
83 
84 @staticmethod
85 def accuracy():
86 return Metric("accuracy", calculate_accuracy)
87 
88 @staticmethod
89 def bleu():
90 return Metric("bleu", calculate_bleu)
91 
92 @staticmethod
93 def bertscore():
94 return Metric("bertscore", calculate_bertscore)
95 
96 @staticmethod
97 def custom(name: str, fn: Callable):
98 return Metric(name, fn)
99 
100class EvaluationSuite:
101 def __init__(self, metrics: list[Metric]):
102 self.metrics = metrics
103 
104 async def evaluate(self, model, test_cases: list[dict]) -> dict:
105 results = {m.name: [] for m in self.metrics}
106 
107 for test in test_cases:
108 prediction = await model.predict(test["input"])
109 
110 for metric in self.metrics:
111 score = metric.fn(
112 prediction=prediction,
113 reference=test.get("expected"),
114 context=test.get("context")
115 )
116 results[metric.name].append(score)
117 
118 return {
119 "metrics": {k: np.mean(v) for k, v in results.items()},
120 "raw_scores": results
121 }
122 
123# Usage
124suite = EvaluationSuite([
125 Metric.accuracy(),
126 Metric.bleu(),
127 Metric.bertscore(),
128 Metric.custom("groundedness", check_groundedness)
129])
130 
131test_cases = [
132 {
133 "input": "What is the capital of France?",
134 "expected": "Paris",
135 "context": "France is a country in Europe. Paris is its capital."
136 },
137]
138 
139results = await suite.evaluate(model=your_model, test_cases=test_cases)
140```
141 
142## Detailed patterns and worked examples
143 
144Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient.
145 
146 
View all files on GitHub →

Details

Updated
Sep 21, 2026
License
MIT
Stars on the repo
★ 39,857
Checked
Source
wshobson/agents ↗
Creator
wshobson · 179 listings
View creator

Similar skills

See all →
PromptAct as an expert AI engineer specializing in practicalf/prompts.chat · by Ersin YılmazAct as an expert AI engineer specializing in practical machine learning implementation and AI integration for production applications, ensuring efficient and robust AI solutions.New listingSkillQuery the 1000 Genomes Project datasetOneKGPd: Individual-Level Queries over the 1000 Genomes ProjectK-Dense-AI/scientific-agent-skills · by K-Dense-AIQuery the 1000 Genomes Project dataset (3,202 whole-genome-sequenced individuals, GRCh38) at the level of individual participants. Use when a question is about individuals or variants in the 1000 Genomes Project cohort: which individuals carry variants matching specific criteria in a gene or region, which individuals are homozygous-reference at a position, which variants exist in the dataset or carried by specified individuals in a gene or region, the relatedness between two specified individuals. Variants are returned with 1000 Genomes allele frequencies (AF), gnomAD v4.1 exome and genome AF, AlphaMissense score, and HGVSp annotations.★ 46k GitHub starsSkillBayesian modeling with PyMCPyMC Bayesian ModelingK-Dense-AI/scientific-agent-skills · by K-Dense-AIBayesian modeling with PyMC. Build hierarchical models, MCMC (NUTS), variational inference, LOO/WAIC comparison, posterior checks, for probabilistic programming and inference.★ 46k GitHub starsSkillStatistical models library for PythonStatsmodels: Statistical Modeling and EconometricsK-Dense-AI/scientific-agent-skills · by K-Dense-AIStatistical models library for Python. Use when you need specific model classes (OLS, GLM, mixed models, ARIMA) with detailed diagnostics, residuals, and inference. Best for econometrics, time series, rigorous inference with coefficient tables. For guided statistical test selection with APA reporting use statistical-analysis.★ 46k GitHub starsSkillHugging Face Transformers for loading Hub modelsK-Dense-AI/scientific-agent-skills · by K-Dense-AIHugging Face Transformers for loading Hub models, running pipeline inference, text generation, and Trainer fine-tuning on NLP, vision, audio, and multimodal tasks. Use when working with AutoModel, pipelines, tokenizers, or TrainingArguments—not for general ML outside the Transformers library.★ 46k GitHub starsSkillWorking with Outpost Bio's open microbiome foundation modelsWaypoint: Outpost Bio's Open Microbiome Foundation ModelsK-Dense-AI/scientific-agent-skills · by K-Dense-AIUse when working with Outpost Bio's open microbiome foundation models - the Waypoint checkpoints (Waypoint-6m, Waypoint-45m, Waypoint-170m), the Atlas pretraining corpus, the Compass eight-task benchmark, or the `waypoint` CLI from the `waypoint-bio` package. Covers embedding microbiome samples, fine-tuning on taxonomic abundance data, benchmarking a checkpoint on Compass, pretraining a GPT-2 model on taxonomic abundance profiles, and converting MetaPhlAn, Kraken2, QIIME 2, or MGnify abundance tables into waypoint format.★ 46k GitHub stars

More from wshobson

SkillMaster C/.NET backend development patterns for buildingwshobson/agents · by wshobsonMaster C#/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications. Covers async/await, dependency injection, Entity Framework Core, Dapper, configuration, caching, and testing with xUnit. Use when developing .NET backends, reviewing C# code, or designing API architectures.★ 39.9k GitHub starsSkillImplement WCAG 2.2 compliant interfaces with mobileAccessibility compliancewshobson/agents · by wshobsonImplement WCAG 2.2 compliant interfaces with mobile accessibility, inclusive design patterns, and assistive technology support. Use when auditing accessibility, implementing ARIA patterns, building for screen readers, or ensuring inclusive user experiences.★ 39.9k GitHub starsSkillMaster Material Design 3 and Jetpack Compose patternsAndroid Mobile Designwshobson/agents · by wshobsonMaster Material Design 3 and Jetpack Compose patterns for building native Android apps. Use when designing Android interfaces, implementing Compose UI, or following Google's Material Design guidelines.★ 39.9k GitHub starsSkillMigrate from AngularJS to Angular using hybrid modeAngular migrationwshobson/agents · by wshobsonMigrate from AngularJS to Angular using hybrid mode, incremental component rewriting, and dependency injection updates. Use when upgrading AngularJS applications, planning framework migrations, or modernizing legacy Angular code.★ 39.9k GitHub starsSkillUnderstand anti-reversing, obfuscationAnti reversing techniqueswshobson/agents · by wshobsonUnderstand anti-reversing, obfuscation, and protection techniques encountered during software analysis. Use this skill when analyzing malware evasion techniques, when implementing anti-debugging protections for CTF challenges, when reverse engineering packed binaries, or when building security research tools that need to detect virtualized environments.★ 39.9k GitHub starsSkillBuild production Apache Airflow DAGs with best practicesApache Airflow DAG Patternswshobson/agents · by wshobsonBuild production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. Use when creating data pipelines, orchestrating workflows, or scheduling batch jobs.★ 39.9k GitHub stars