Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Evaluate and benchmark large language models for research applications
.claude/skills/brycewang-stanford-llm-evaluation-guide/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | -1% | 0% |
| case-18 | ✗→✓ | ▲ Improved | -5% | 0% |
| case-11 | ✓→✗ | ▼ Worse | 62% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 52% | 0% |
| case-06 | ✓→✓ | = Same ✓ | 38% | 0% |
A skill for evaluating and benchmarking large language models (LLMs) in research settings. Covers automatic metrics, human evaluation protocols, benchmark suites, evaluation pitfalls, and best practices for reporting LLM performance.
1. Intrinsic evaluation:
Measures model quality on its own terms
- Perplexity, likelihood, calibration
- Useful for comparing architectures and training procedures
2. Extrinsic evaluation:
Measures model quality on downstream tasks
- Task-specific benchmarks (QA, summarization, classification)
- Closer to real-world usefulness
3. Human evaluation:
Human judges rate model outputs
- Fluency, correctness, helpfulness, safety
- Gold standard but expensive and slow| Task | Metric | Description | |------|--------|-------------| | Language modeling | Perplexity | Lower is better; measures prediction quality | | Machine translation | BLEU, COMET | N-gram overlap; learned quality estimation | | Summarization | ROUGE-1/2/L | Recall of n-grams against reference | | Question answering | Exact Match, F1 | Token-level match against reference answer | | Classification | Accuracy, F1 | Standard classification metrics | | Generation quality | BERTScore | Semantic similarity via embeddings | | Factuality | FActScore | Proportion of atomic facts supported by evidence |
pythonfrom collections import Counter import math def compute_bleu(reference: list[str], hypothesis: list[str], max_n: int = 4) -> float: """ Compute corpus-level BLEU score (simplified). Args: reference: List of reference token sequences hypothesis: List of hypothesis token sequences max_n: Maximum n-gram order """ precisions = [] for n in range(1, max_n + 1): num = 0 den = 0 for ref_tokens, hyp_tokens in zip(reference, hypothesis): ref_ngrams = Counter( tuple(ref_tokens[i:i+n]) for i in range(len(ref_tokens) - n + 1) ) hyp_ngrams = Counter( tuple(hyp_tokens[i:i+n]) for i in range(len(hyp_tokens) - n + 1) ) clipped = {ng: min(c, ref_ngrams.get(ng, 0)) for ng, c in hyp_ngrams.items()} num += sum(clipped.values()) den += max(sum(hyp_ngrams.values()), 1) precisions.append(num / max(den, 1)) # Brevity penalty ref_len = sum(len(r) for r in reference) hyp_len = sum(len(h) for h in hypothesis) bp = math.exp(1 - ref_len / max(hyp_len, 1)) if hyp_len < ref_len else 1.0 # Geometric mean of precisions log_avg = sum(math.log(max(p, 1e-10)) for p in precisions) / max_n return bp * math.exp(log_avg)
General knowledge and reasoning:
- MMLU (Massive Multitask Language Understanding): 57 subjects, MCQ
- HellaSwag: Commonsense sentence completion
- ARC (AI2 Reasoning Challenge): Science questions
- WinoGrande: Coreference resolution / commonsense
Coding:
- HumanEval: Python function completion (pass@k)
- MBPP: Mostly basic Python problems
- SWE-bench: Real-world software engineering tasks
Math:
- GSM8K: Grade school math word problems
- MATH: Competition-level mathematics
Safety and alignment:
- TruthfulQA: Resistance to common misconceptions
- BBQ (Bias Benchmark for QA): Social bias in QA
- RealToxicityPrompts: Tendency to generate toxic text
Instruction following:
- MT-Bench: Multi-turn conversation quality (LLM-as-judge)
- AlpacaEval: Instruction-following quality
- Chatbot Arena: ELO-based human preference rankingpythondef design_human_eval(task: str, n_annotators: int = 3, n_examples: int = 200) -> dict: """ Design a human evaluation protocol for LLM outputs. Args: task: The task being evaluated n_annotators: Number of independent annotators per example n_examples: Number of examples to evaluate """ return { "task": task, "n_annotators": n_annotators, "n_examples": n_examples, "criteria": [ {"name": "Fluency", "scale": "1-5", "description": "Is the text grammatically correct and natural?"}, {"name": "Relevance", "scale": "1-5", "description": "Does the output address the input/question?"}, {"name": "Correctness", "scale": "1-5", "description": "Is the factual content accurate?"}, {"name": "Helpfulness", "scale": "1-5", "description": "Would a user find this response useful?"} ], "agreement_metric": "Krippendorff's alpha (ordinal)", "presentation": "Randomize model order; blind annotators to model identity", "calibration": "Have all annotators rate 20 shared examples first", "cost_estimate": f"~{n_examples * n_annotators * 0.50:.0f} USD at typical rates" }
1. Data contamination:
Test data may appear in the LLM's training set.
Mitigation: Use held-out datasets, check for contamination,
create new test sets.
2. Metric gaming:
High BLEU does not mean high quality; ROUGE rewards verbosity.
Mitigation: Use multiple metrics and human evaluation.
3. Cherry-picking examples:
Showing only best-case outputs misrepresents model capabilities.
Mitigation: Report aggregate metrics over full test sets.
4. Ignoring variance:
LLM outputs vary with temperature and random seeds.
Mitigation: Report mean and standard deviation over multiple runs.
5. Unfair comparisons:
Comparing models with different prompt formats or few-shot counts.
Mitigation: Standardize prompts and report all hyperparameters.When publishing LLM evaluation results, report: model name and version, parameter count and architecture, evaluation dataset with version number, exact prompts used (include in appendix), number of few-shot examples, decoding parameters (temperature, top-p, max tokens), multiple metrics (not just one), confidence intervals or significance tests, and hardware and inference cost where relevant.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 24,738 | 39,708 | +61% | 1 | 1 | 0% | 3,933 | 6,751 | +72% | 0 | 0 | — |
case-02 | fail→fail | 21,441 | 14,627 | -32% | 1 | 1 | 0% | 4,162 | 4,461 | +7% | 0 | 0 | — |
case-03 | fail→fail | 21,872 | 33,554 | +53% | 1 | 1 | 0% | 3,538 | 7,600 | +115% | 0 | 0 | — |
case-04 | pass→pass | 27,204 | 9,985 | -63% | 1 | 1 | 0% | 2,200 | 3,345 | +52% | 0 | 0 | — |
case-05 | fail→pass | 14,066 | 4,788 | -66% | 1 | 1 | 0% | 2,485 | 2,458 | -1% | 0 | 0 | — |
case-06 | pass→pass | 17,301 | 12,653 | -27% | 1 | 1 | 0% | 2,765 | 3,810 | +38% | 0 | 0 | — |
case-07 | pass→pass | 6,612 | 2,382 | -64% | 1 | 1 | 0% | 1,134 | 2,079 | +83% | 0 | 0 | — |
case-08 | pass→pass | 5,546 | 4,810 | -13% | 1 | 1 | 0% | 932 | 2,349 | +152% | 0 | 0 | — |
case-09 | pass→pass | 11,389 | 4,721 | -59% | 1 | 1 | 0% | 1,658 | 2,366 | +43% | 0 | 0 | — |
case-10 | pass→pass | 9,381 | 4,400 | -53% | 1 | 1 | 0% | 1,453 | 2,372 | +63% | 0 | 0 | — |
case-11 | pass→fail | 13,858 | 12,092 | -13% | 1 | 1 | 0% | 2,180 | 3,534 | +62% | 0 | 0 | — |
case-12 | pass→pass | 10,304 | 9,223 | -10% | 1 | 1 | 0% | 1,682 | 3,118 | +85% | 0 | 0 | — |
case-13 | pass→pass | 12,542 | 13,072 | +4% | 1 | 1 | 0% | 2,004 | 3,883 | +94% | 0 | 0 | — |
case-14 | pass→pass | 10,815 | 5,644 | -48% | 1 | 1 | 0% | 1,679 | 2,594 | +54% | 0 | 0 | — |
case-15 | pass→pass | 8,474 | 3,555 | -58% | 1 | 1 | 0% | 1,293 | 2,293 | +77% | 0 | 0 | — |
case-16 | pass→pass | 6,368 | 2,807 | -56% | 1 | 1 | 0% | 1,084 | 2,068 | +91% | 0 | 0 | — |
case-17 | pass→pass | 7,172 | 6,396 | -11% | 1 | 1 | 0% | 1,106 | 2,663 | +141% | 0 | 0 | — |
case-18 | fail→pass | 12,771 | 4,044 | -68% | 1 | 1 | 0% | 2,621 | 2,483 | -5% | 0 | 0 | — |
case-19 | pass→pass | 12,558 | 7,214 | -43% | 1 | 1 | 0% | 2,005 | 2,787 | +39% | 0 | 0 | — |
case-20 | pass→pass | 15,695 | 12,338 | -21% | 1 | 1 | 0% | 2,540 | 3,696 | +46% | 0 | 0 | — |
case-21 | pass→pass | 17,871 | 15,253 | -15% | 1 | 1 | 0% | 3,712 | 4,820 | +30% | 0 | 0 | — |
case-22 | pass→pass | 21,023 | 23,149 | +10% | 1 | 1 | 0% | 3,805 | 5,460 | +43% | 0 | 0 | — |
case-23 | pass→pass | 24,566 | 21,986 | -11% | 1 | 1 | 0% | 4,316 | 6,043 | +40% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +4 percentage points is the difference between those two pass rates over the 23 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.