# Llm Evaluation

> Systematically evaluate LLM outputs, prevent regressions, and measure quality

- **Type:** Skill
- **Install:** `agentstack add skill-vignesh2027-ai-agent-skills-llm-evaluation`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [vignesh2027](https://agentstack.voostack.com/s/vignesh2027)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [vignesh2027](https://github.com/vignesh2027)
- **Source:** https://github.com/vignesh2027/AI-AGENT-SKILLS/tree/main/skills/llm-evaluation

## Install

```sh
agentstack add skill-vignesh2027-ai-agent-skills-llm-evaluation
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## Overview

LLM evaluation is the discipline of measuring what your model or system actually does, not what you believe it does. Without systematic evaluation, you are guessing. With it, you catch regressions before users do.

## When to Use

- Before deploying any LLM-powered feature
- When changing a model version, provider, or prompt
- When users report quality issues
- As a recurring health check for production LLM features

## Process

### Step 1: Define the evaluation dimensions
Common dimensions (pick those relevant to your task):
- **Correctness** — Is the answer factually right?
- **Relevance** — Does the answer address the question?
- **Groundedness** — Is the answer supported by the provided context?
- **Safety** — Does the output avoid harmful content?
- **Format** — Does the output match the required schema/format?
- **Tone/Style** — Does the output match the required voice?
- **Latency** — Is the response fast enough?
- **Cost** — Is the per-request cost within budget?

### Step 2: Build the evaluation dataset
A good eval dataset:
- Covers the full distribution of expected inputs (not just the easy cases)
- Includes adversarial examples and edge cases
- Has verified ground-truth answers for correctness dimensions
- Has at least 100 examples for production features; 1000+ for critical systems
- Is versioned and never modified (only appended to)

### Step 3: Choose evaluation methods
- **Automated exact match** — for structured outputs with known correct answers
- **Automated metric** — BLEU/ROUGE for text overlap, custom scoring functions
- **LLM-as-judge** — use a strong model (GPT-4, Claude Opus) to score outputs on rubrics; calibrate against human judgments
- **Human evaluation** — ground truth; use for calibrating automated evals

### Step 4: Implement automated evals in CI
Every change to a prompt, model version, or system prompt must trigger the eval suite in CI. Define a threshold: "if correctness drops below 85% or safety failures increase, block the PR."

### Step 5: Track eval results over time
Store eval results with: timestamp, model version, prompt version, per-example scores. You need to answer "when did quality start degrading?" without re-running old evals.

### Step 6: Adversarial evaluation
Test for:
- **Prompt injection** — Can user input override your system prompt?
- **Jailbreaks** — Can a user extract harmful content?
- **Hallucination** — Does the model fabricate facts confidently?
- **Refusal rate** — Is the model refusing legitimate requests? (Over-refusal is also a failure)
- **Demographic bias** — Does quality vary by user demographic mentioned in input?

### Step 7: Human preference evaluation (for generation tasks)
For open-ended generation: run A/B comparisons. Which version do humans prefer? Aggregate preference scores over 100+ pairs. Automated metrics alone are insufficient for generation quality.

### Step 8: Production monitoring
- Log all inputs and outputs (within privacy constraints)
- Sample production traffic for offline evaluation
- Track: error rate, latency, user feedback signals
- Alert on: sudden quality drops, increased error rates, cost spikes

## Anti-Rationalizations

**"The model feels better in my testing"**
"Feels better" is not an evaluation. Run the eval suite and compare scores.

**"Evals are expensive — we'll skip them for this release"**
Skipping evals means the next incident will show you what your eval set should have covered.

**"LLM-as-judge is biased"**
All evaluation methods have bias. LLM-as-judge is calibrated bias you can measure and improve. "It feels right to me" is uncalibrated bias you cannot measure.

## Verification Requirements

- [ ] Evaluation dimensions defined before building
- [ ] Evaluation dataset of 100+ examples with ground truth
- [ ] Automated evals run in CI with a blocking threshold
- [ ] Adversarial eval completed (injection, jailbreak, hallucination)
- [ ] Eval results versioned and tracked over time
- [ ] Production monitoring in place with quality alerts

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [vignesh2027](https://github.com/vignesh2027)
- **Source:** [vignesh2027/AI-AGENT-SKILLS](https://github.com/vignesh2027/AI-AGENT-SKILLS)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-vignesh2027-ai-agent-skills-llm-evaluation
- Seller: https://agentstack.voostack.com/s/vignesh2027
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
