LLM Evaluation
Seth HobsonCommunityCreated by Seth Hobson
- Skill
- Review and audit
- Data and AI
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured approach to assessing the quality and reliability of LLM-based applications. It covers three primary evaluation pillars: automated metrics for scalable performance tracking, human evaluation for nuanced quality assessment, and LLM-as-a-judge patterns for automated qualitative scoring. The skill includes implementation patterns for common metrics like BLEU, ROUGE, and BERTScore, as well as custom logic for groundedness and factuality checking.
What it does
- Implements automated metrics for text generation, classification, and RAG retrieval tasks.
- Provides a Python-based evaluation suite structure for running test cases against models.
- Offers patterns for using stronger LLMs to act as judges for response quality.
- Includes custom metric implementations for groundedness, toxicity, and factuality.
- Defines dimensions for human-in-the-loop evaluation such as coherence and safety.
- Supports comparative analysis and regression testing for prompt and model iterations.
When to use it
- When you need to establish a baseline for LLM application performance.
- When comparing different models or prompt variations systematically.
- When you need to detect performance regressions before deploying updates.
- When validating the factual accuracy or groundedness of RAG-based responses.
- When building confidence in production systems through repeatable testing.
Advantages
- Enables scalable, repeatable evaluation of AI outputs.
- Reduces manual effort by automating common quality checks.
- Provides a modular architecture for adding custom evaluation metrics.
- Supports both quantitative scoring and qualitative reasoning via LLM-as-a-judge.
- Helps identify specific error patterns through confusion matrices and detailed scoring.
Usage examples
- “How can I implement a custom metric to check if my RAG response is grounded in the provided context?”
- The skill provides a Python function using a cross-encoder model to calculate entailment scores, which can be integrated into the EvaluationSuite.
- “How do I use an LLM to grade the quality of my chatbot's responses?”
- The skill demonstrates an LLM-as-a-judge pattern using a structured Pydantic model to extract numerical ratings and reasoning from a stronger model.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/wshobson/llm-evaluation/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip llm-evaluation.zip -d .agents/skills
Documentation by Seth Hobson
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.
Files
- ATTRIBUTION.mdAdded by AutoGineer980 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md3.8 KiB
- references/details.md13.7 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Python
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Seth Hobson
- Publisher
- Seth Hobson (Community)
- Source
- wshobson/agents · plugins/llm-application-dev/skills/llm-evaluation · commit 4bde316
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Seth Hobson.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download llm-evaluation.zip