EasyDeepLearn
LLMs & GenAI · section 13 of 18

Evaluation & benchmarks

22 interview questions on evaluation & benchmarks, each answered in full. Free to read, no account needed.

How do you evaluate an LLM system?

medium
  • Use a layered eval: (1) automatic benchmarks (MMLU, HumanEval, GSM8K) for capabilities; (2) task-specific evals with reference answers (exact match, ROUGE, F1); (3) LLM-as-a-judge for rubric-based scoring — validate against human raters; (4) human eval on a small held-out set for critical behaviors; (5) production monitoring (feedback, hallucination rate, latency, cost, safety flags).
#evaluation#benchmarksPermalink & quiz →

What is red-teaming in LLM safety?

medium
  • Adversarial evaluation: humans and/or other LLMs try to elicit harmful, false, or policy-violating outputs by systematically probing the model.
  • Structured across a taxonomy of harms (hate, violence, sexual content, privacy, CSAM, dangerous instructions, misinformation).
  • Findings feed back into RM data, refusal SFT, and content filters.
  • Anthropic and OpenAI publish red-team reports for major model releases.
  • Automated red-teaming uses attacker LLMs to scale coverage.
#safety#red-team#evaluationPermalink & quiz →

What does MMLU actually measure and its limitations?

medium
  • MMLU (Hendrycks 2020): 15,908 multiple-choice questions across 57 subjects (STEM, humanities, professional).
  • Format: question + 4 answer options, model picks A/B/C/D.
  • Measures general knowledge and reasoning across many domains.
  • Limitations: (1) MCQ format is easy to game via answer-key patterns; (2) many questions are contaminated in modern training sets; (3) frontier models are hitting 88-90% — saturation reduces signal; (4) doesn't test open-ended reasoning or tool use.
  • Replacements: MMLU-Pro (harder, 10 options), GPQA (grad-level, contamination-free).
#evaluation#benchmarksPermalink & quiz →

GSM8K vs MATH vs AIME — what do they measure?

medium
  • GSM8K (Cobbe 2021): 8k grade-school word problems; 2-8 step arithmetic.
  • Frontier models are at ~95%.
  • MATH (Hendrycks 2021): 12.5k competition math problems (algebra, geometry, calculus, number theory) at high-school competition level.
  • Frontier ~85-90%.
  • AIME (American Invitational Math Exam): olympiad-level; the hardest widely-used math benchmark, ~15/30 for GPT-4, up to 90%+ for o1/o3/R1-style reasoning models.
  • Progression: GSM8K → MATH → AIME → IMO-level (still open).
  • Reasoning models trained with RL on verifiable rewards dominate these.
#evaluation#benchmarksPermalink & quiz →

HumanEval / MBPP / SWE-bench — how do they test code?

medium
  • HumanEval (Chen 2021): 164 hand-written Python problems, model writes a function that passes unit tests.
  • Saturated at ~95% for frontier.
  • MBPP (Austin 2021): 974 problems, similar format, slightly easier.
  • Both single-function.
  • SWE-bench (Jimenez 2023): real GitHub issues from popular Python repos — model must produce a PR-worthy patch.
  • Much harder (~40% for top models); measures real-world code editing across a repo.
  • Extended by SWE-bench Verified (human-verified subset) and Aider Polyglot for multi-language.
#evaluation#benchmarksPermalink & quiz →

What is Chatbot Arena and why is it important?

easy
  • LMSYS-run open leaderboard where two anonymous models answer the same user prompt and humans vote which is better; Elo ratings computed from millions of pairwise comparisons.
  • Foundation for a leaderboard less prone to benchmark contamination (fresh prompts every day, human judgments).
  • Limitations: (1) casual users bias toward friendly / verbose outputs; (2) prompt distribution skews toward common tasks; (3) topic mix isn't stable.
  • Standard reference for 'how do humans rank frontier models today'.
#evaluation#benchmarksPermalink & quiz →

What is Arena-Hard-Auto?

medium
  • Auto-benchmark by LMSYS: uses 500 hard prompts drawn from the tail of Chatbot Arena topics, and GPT-4 as a judge to pick winners between two models.
  • Correlates well with human Arena Elo but runs in an hour, not months.
  • Cheap, reproducible proxy for 'how would humans rank this model?'.
  • Free from prompt gaming.
  • Widely used to score new open-source models against frontier baselines.
#evaluation#benchmarksPermalink & quiz →

What is MT-Bench and how does it differ from Chatbot Arena?

medium
  • MT-Bench (LMSYS 2023): 80 multi-turn prompts across 8 categories; GPT-4 judges each response on a 1-10 scale.
  • Fixed prompt set → deterministic, reproducible.
  • Best for comparing models systematically on chat quality.
  • Weaknesses: (1) 80 prompts is small; (2) known prompts get gamed after publication; (3) GPT-4 judge has biases (favors GPT-4-like styles).
  • Arena is broader but slower; MT-Bench is fast and precise.
#evaluation#benchmarksPermalink & quiz →

How reliable is LLM-as-a-judge and how do you validate it?

hard
  • Frontier LLMs correlate 0.6-0.8 with human raters on many pairwise-preference tasks — usable but biased.
  • Known biases: (1) position bias (prefer first response); (2) length bias (prefer longer answers); (3) self-preference (GPT-4 favors GPT-4-style outputs); (4) domain gaps (biology / law require domain-expert judges).
  • Validation: label a small human-annotated set (100-500 examples), compute correlation, adjust prompt / model.
  • Mitigations: randomize position, use pairwise + swap, ensemble across judges, calibrate against humans.
#evaluation#reliabilityPermalink & quiz →

What is LiveBench and why does it exist?

medium
  • LiveBench (Abacus AI, 2024): monthly-refreshed benchmark with contamination-free questions across math, coding, reasoning, data analysis, and language.
  • Prevents benchmark contamination by rotating questions and drawing from recent sources (arXiv preprints, current news, live coding contests).
  • Complements Arena / MMLU by giving a fresh capability read after each model release.
  • Standard tool to check 'is this new frontier claim real, or a contamination artifact?'.
#evaluation#benchmarksPermalink & quiz →

What is EleutherAI's lm-evaluation-harness?

medium
  • Open-source library for running standardized LLM evals against 200+ benchmarks (MMLU, HellaSwag, GSM8K, ARC, TruthfulQA, ...) with consistent prompts, few-shot settings, and scoring rules.
  • Standardizes reported scores across the community — critical because two labs' MMLU numbers can differ 5% due to prompt / normalization differences.
  • Used to run the HuggingFace Open LLM Leaderboard.
  • Also supports vLLM / HF Transformers / OpenAI backends.
  • Essential tool for reproducible LLM evaluation.

How do you evaluate an agent (tool-using LLM)?

hard
  • (1) Task-level success rate on a set of goals with verifiable outcomes (booked flight, generated code that passes tests, delivered file).
  • (2) Trace-level metrics: number of tool calls, tool-call accuracy, dead-ends.
  • (3) Cost per successful task (tokens + tool costs).
  • (4) Human eval on ambiguous / open-ended goals.
  • (5) Regression suite of past failure cases.
  • (6) Benchmarks: SWE-bench (coding agents), AgentBench, WebArena, VisualWebArena, OSWorld.
  • Agents fail in complex ways — always sample real traces during monitoring.
#evaluation#agentsPermalink & quiz →

How do you detect hallucinations in production?

hard
  • (1) Retrieval-grounded: for RAG systems, verify each claim against retrieved context via NLI or LLM-judge; flag unsupported claims.
  • (2) Self-consistency: sample K completions; disagreement → uncertainty → likely hallucination.
  • (3) Verification tools: fact-check via web search, code execution, calculator.
  • (4) Uncertainty signals: high token-level perplexity often correlates with hallucination.
  • (5) User feedback loops: log 'incorrect' flags and cluster them.
  • Combine multiple signals for reliability.
  • No single method is perfect.
#hallucinations#reliability#evaluationPermalink & quiz →

What does TruthfulQA measure?

medium
  • TruthfulQA (Lin 2021): 817 questions on common misconceptions ('Do most people only use 10% of their brain?').
  • The 'trick' is that a plausible-sounding but wrong answer is easy to give; measuring whether the model resists the misconception.
  • Big models are often less truthful (they've learned plausibility, not truth).
  • RLHF and Constitutional AI help.
  • Modern frontier LLMs score 70-90% depending on the format (MCQ vs open).
  • Complementary to accuracy benchmarks — captures 'commits-to-plausible-falsehood' failure mode.
#evaluation#hallucinations#benchmarksPermalink & quiz →

How do you test an LLM for social bias?

medium
  • (1) BBQ (Bias Benchmark for QA): 58k questions probing 9 demographic axes.
  • (2) StereoSet: stereotypical vs anti-stereotypical continuations.
  • (3) HELM's fairness / demographic reps subset.
  • (4) Task-specific tests: name-based CV screening bias, gendered translation defaults ('the doctor said' → 'he').
  • (5) Red-team probes for slurs and stereotypes across languages.
  • Fix via curated preference data, RM training on bias examples, output filters.
  • Zero bias is not achievable, but measurable reduction is.
#safety#evaluationPermalink & quiz →

How do you evaluate LLM apps cheaply at scale?

medium
  • (1) Sampling: eval on a small random slice (100-500) of production traffic.
  • (2) Prioritize hard examples: cluster traffic, sample from each cluster.
  • (3) LLM-judge on the sample: 100-1000× cheaper than human.
  • (4) Regression suite: fixed set of golden examples to run on every release.
  • (5) Automated red-team: adversarial LLM generates jailbreak probes overnight.
  • (6) Statistical significance: with 200 examples per treatment, you can detect ~5% quality differences.
  • Don't try to eval everything — sample + regress.
#evaluation#production#costPermalink & quiz →

How do you build a good golden eval set?

medium
  • (1) Diverse: cover intended tasks (chat, code, extraction), personas, languages, and edge cases (jailbreaks, PII, tricky inputs).
  • (2) Labeled: humans provide expected outputs or acceptance criteria.
  • (3) Realistic: draw from production traffic (with PII scrubbed) — synthetic data is a poor proxy.
  • (4) Small (100-1000) but re-usable across releases.
  • (5) Rotated: retire memorized examples, add new failures found in production.
  • (6) Metrics: exact match where possible, LLM-judge with rubric for open-ended, calibrated to humans.
  • Best investment for any serious LLM team.
#evaluation#productionPermalink & quiz →

How do you measure jailbreak robustness?

hard
  • (1) Attack Success Rate (ASR) against a known adversarial prompt set (HarmBench, AdvBench, JailbreakBench): fraction of attempts where the model produces harmful content.
  • (2) Adaptive attackers: measure ASR when attackers are allowed to iterate.
  • (3) Category-specific ASR (violence vs sexual vs bio-weapons).
  • (4) Time-to-jailbreak: how many attempts to succeed.
  • (5) Compare pre / post safety training and to baseline models.
  • Publish ASR alongside quality scores — safety is a scalar you can trade off.
#safety#red-team#evaluationPermalink & quiz →

How do you evaluate an agent's tool-use accuracy?

medium
  • Per-step: (1) tool selection correct?
  • (2) arguments valid + well-formed?
  • (3) result correctly interpreted?
  • Per-trace: (1) task success rate (verified outcome); (2) number of steps to success; (3) cost per success; (4) recovery from tool errors.
  • Ground truth: hand-labeled successful traces or verified outcomes (e.g., 'the flight was actually booked').
  • Benchmarks: AgentBench, ToolBench, ToolEval, τ-bench, MLE-bench.
  • Analyze failure modes with clustered traces.
#agents#evaluationPermalink & quiz →

How do you evaluate multimodal LLMs?

medium
  • (1) VQA benchmarks: VQAv2, GQA (visual question answering).
  • (2) Complex reasoning: MMMU (multi-modal MMLU), MMBench, ScienceQA.
  • (3) OCR / documents: DocVQA, ChartQA, InfographicVQA, TextVQA.
  • (4) Fine-grained: RealWorldQA, HallusionBench (VLM hallucinations).
  • (5) Video: Video-MME, EgoSchema.
  • (6) Grounding: RefCOCO (predict box for 'the man in a red shirt').
  • Each captures different capabilities.
  • Combine with human eval on real production images.
#multimodal#evaluation#benchmarksPermalink & quiz →

What biases affect LLM-as-a-judge evaluation, and how do you control them?

hard
  • Position bias: the judge favours whichever answer comes first, so swap the order and average, or run both orders and discard disagreements.
  • Verbosity bias: longer answers score higher regardless of quality, so control for length or instruct the judge to ignore it.
  • Self-preference: a model rates its own family's outputs higher, so avoid judging a model with itself.
  • Sycophancy toward assertive phrasing.
  • Controls that work: a concrete rubric instead of 'rate 1-5', few-shot examples of each score, forcing a short justification before the score, and validating the judge against human labels on a sample before trusting it at scale.
#evaluation#benchmarksPermalink & quiz →

You have no evaluation set for a new LLM feature. How do you build one quickly?

medium
  • Start from real traffic or realistic drafts rather than inventing questions.
  • Collect 100 to 200 representative inputs, deliberately oversampling the hard and weird cases, since uniform sampling under-represents exactly what breaks.
  • Write the expected behaviour for each, as a reference answer where one exists or as a checklist of things the answer must contain.
  • Freeze the set and version it.
  • Add regression cases every time a bug is reported, so the set grows into the shape of your actual failure modes.
  • A couple of hundred well-chosen cases catches far more than a public benchmark that does not resemble your task.
#evaluation#productionPermalink & quiz →

Practise LLMs & GenAI