New to Claude Skills? Learn how to install them →

wshobson on GitHub

LLM Evaluation

Free

Systematic evaluation strategies for LLM performance.

by wshobson38.7k stars on wshobson/agents
2 views
Updated Jul 18, 2026
Get this skill

Free · Opens the source repo

What LLM Evaluation does

LLM Evaluation provides a structured approach to assess the performance of large language models (LLMs) through various evaluation strategies. This skill enables developers and researchers to implement both automated metrics and human feedback, making it easier to gauge the effectiveness of LLM applications. By utilizing a combination of quantitative metrics and qualitative assessments, users can ensure that their models meet the desired performance standards before deployment.

The skill encompasses several core evaluation types, including automated metrics that allow for fast and repeatable assessments. Key metrics such as BLEU, ROUGE, and BERTScore provide insights into text generation quality, while classification metrics like accuracy and precision help evaluate model performance in specific tasks. Additionally, retrieval metrics such as NDCG and Precision@K are included for applications involving information retrieval. This comprehensive set of metrics enables users to systematically measure and compare LLM performance across different models and prompts.

Human evaluation is also a crucial aspect of this skill, allowing users to assess dimensions like accuracy, coherence, and fluency that are often challenging to quantify automatically. By incorporating both automated and human evaluations, LLM Evaluation helps build confidence in the quality of AI applications, making it a valuable tool for developers seeking to validate their models and track performance over time. The skill also aids in debugging unexpected model behavior and establishing baselines for future improvements.

Overall, LLM Evaluation is designed for developers and researchers who need to rigorously evaluate LLM performance, ensuring that their applications are reliable and effective in real-world scenarios.

When to use it

Use this skill when you need to measure, compare, or validate the performance of LLM applications systematically.

When not to use it

This skill may not be suitable for simple applications where performance evaluation is not critical or for scenarios requiring real-time feedback without structured assessment.

What you can build with it

Performance Comparison

Use LLM Evaluation to systematically compare the performance of different language models or prompts to determine the best option for your application.

Regression Detection

Implement this skill to detect performance regressions in your models before they are deployed, ensuring consistent quality over time.

Human Feedback Integration

Incorporate human evaluation to assess aspects of model outputs that automated metrics cannot capture, enhancing the overall quality of your AI applications.

How to install LLM Evaluation

View source

1. Install with the skills CLI

npx skills add wshobson/agents/llm-evaluation --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by wshobson

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.

Frequently asked questions about LLM Evaluation

Similar skills