LeetLLM
My PlanLearnGlossaryTracksPracticeBlog
LeetLLM

Your go-to resource for mastering AI & LLM systems.

Product

  • Learn
  • Glossary
  • Tracks
  • Practice
  • Blog
  • RSS

Legal

  • Terms of Service
  • Privacy Policy

© 2026 LeetLLM. All rights reserved.

All Topics
Your Progress
0%

0 of 196 articles completed

🛠️Computing Foundations0/9
Git, Shell, Linux for AIDocker for Reproducible AIPython for AI EngineeringNumPy and Tensor ShapesCUDA for ML TrainingMPS & Metal for ML on MacData Structures for AISQL and Data ModelingAlgorithms for ML Engineers
📊Math & Statistics0/9
Gradients and BackpropVectors, Matrices & TensorsLinear Algebra for MLAdam, Momentum, SchedulersProbability for Machine LearningBayesian Inference from EvidenceStatistics and UncertaintyDistributions and SamplingHypothesis Tests, Intervals, and pass@k
📚Preparation & Prerequisites0/13
Neural Networks from ScratchCNNs from ScratchTraining & BackpropagationSoftmax, Cross-Entropy & OptimizationRNNs, LSTMs, GRUs, and Sequence ModelingAutoencoders and VAEsThe Transformer Architecture End-to-EndLanguage Modeling & Next TokensFrom GPT to Modern LLMsPrompt Engineering FundamentalsCalling LLM APIs in ProductionFirst AI App End-to-EndThe LLM Lifecycle
🧮ML Algorithms & Evaluation0/15
Linear Regression from ScratchLogistic Regression and MetricsDecision Trees, Forests, and BoostingReinforcement Learning BasicsValidation and LeakageStatistical Learning and GeneralizationConformal Prediction and UncertaintyClustering and PCAProbabilistic Generative ModelsCore Retrieval AlgorithmsDecoding AlgorithmsExperiment Design and A/B TestingCausal Inference and CounterfactualsPyTorch Training LoopsDataset Pipelines and Data Quality
📦Production ML Systems0/6
Feature Engineering for Production MLBatch and Streaming Feature PipelinesGradient Boosted Trees in ProductionRanking and Recommendation SystemsForecasting and Anomaly DetectionMonitoring Predictive Models
🧪Core LLM Foundations0/8
The Bitter Lesson & ComputeBPE, WordPiece, and SentencePieceStatic to Contextual EmbeddingsPerplexity & Model EvaluationFile Ingestion for AIChunking StrategiesLLM Benchmarks & LimitationsInstruction Tuning & Chat Templates
🧰Applied LLM Engineering0/25
Dimensionality Reduction for EmbeddingsCoT, ToT & Self-Consistency PromptingFunction Calling & Tool UseMCP & Tool Protocol StandardsContext EngineeringPrompt Injection DefenseResponsible AI GovernancePrivacy-Preserving Machine LearningData Labeling and Human FeedbackEvaluating AI AgentsProduction RAG PipelinesHybrid Search: Dense + SparseReranking and Cross-Encoders for RAGRAG Evaluation for Reliable AnswersLLM-as-a-Judge EvaluationBias & Fairness in LLMsHallucination Detection & MitigationLLM Observability & MonitoringExperiment Tracking with MLflow and W&BPrompt Optimization with DSPyModel Versioning & DeploymentSemantic Caching & Cost OptimizationLLM Cost Engineering & Token EconomicsModel Gateways, Routing, and FallbacksDesign an Automated Support Agent
🎓Portfolio Capstones0/9
Capstone: Delivery ETA PredictionCapstone: Product RankingCapstone: Demand ForecastingCapstone: Image Damage ClassifierCapstone: Production ML PipelineCapstone: Document QACapstone: Eval DashboardCapstone: Fine-Tuned ClassifierCapstone: Reproducible ML Study
🧠Transformer Deep Dives0/8
Sentence Embeddings & Contrastive LossEmbedding Similarity & QuantizationScaled Dot-Product AttentionVision Transformers and Image EncodersPositional Encoding: RoPE & ALiBiLayer Normalization: Pre-LN vs Post-LNMechanistic InterpretabilityDecoding Strategies: Greedy to Nucleus
🧬Advanced Training & Adaptation0/17
Scaling Laws & Compute-Optimal TrainingPre-training Data at ScaleBuild GPT from Scratch LabJAX for PyTorch ResearchersContinued Pretraining for Domain ShiftSynthetic Data PipelinesSupervised Fine-Tuning PipelineMixed Precision TrainingDistributed Training: FSDP & ZeROLoRA & Parameter-Efficient TuningTraining Run OperationsReward Modeling from Preference DataRLHF & DPO AlignmentConstitutional AI & Red TeamingRLVR & Verifiable RewardsKnowledge Distillation for LLMsModel Merging and Weight Interpolation
🤖Advanced Agents & Retrieval0/16
Vector DB Internals: HNSW & IVFAdvanced RAG: HyDE & Self-RAGGraphRAG & Knowledge GraphsRAG Security & Access ControlStructured Output GenerationReAct & Plan-and-ExecuteGuardrails & Safety FiltersCode Generation & SandboxingComputer-Use / GUI / Browser AgentsHuman-in-the-Loop Agent ArchitectureAI Coding Workflow with AgentsAgent Memory & PersistenceAgent Failure & RecoveryRecursive Language Models (RLM)Multi-Agent OrchestrationCapstone: Production Agent
⚡Inference & Production Scale0/31
Inference: TTFT, TPS & KV CacheMulti-Query & Grouped-Query AttentionKV Cache & PagedAttentionPrefix Caching and Prompt CachingFlashAttention & Memory EfficiencyContinuous Batching & SchedulingScaling LLM InferenceModel Parallelism for LLM InferenceAccelerator Architecture Field GuideCorrect GPU Profiling and BenchmarkingGPU Kernel Performance Engineering LabGPU Parallel Primitives LabGPU Compilers and Kernel LanguagesGEMM From Naive CUDA to Tensor CoresLow-Precision GPU ProgrammingGPU Runtime Execution LabAI-Generated Kernel EngineeringModel Quantization: GPTQ, AWQ & GGUFLocal LLM DeploymentSLM Specialization & Edge DeploymentSpeculative DecodingLong Context Window ManagementMixture of Experts ArchitectureMamba & State Space ModelsReasoning & Test-Time ComputeAdvanced MLOps & DevOps for AIGPU Serving & AutoscalingGPU Failure OperationsDistributed Inference Data PlaneServing Benchmark EngineeringA/B Testing for LLMs
🏗️System Design Capstones0/9
Content Moderation SystemCode Completion SystemMulti-Tenant LLM PlatformLLM-Powered Search EngineVision-Language Models & CLIPMultimodal LLM ArchitectureDiffusion Models: Images & TextReal-Time Voice AI AgentReasoning Agent System Design
🎤AI Lab Interviewing0/4
AI Lab Coding Interview: Python SystemsAI Lab System Design InterviewAI Lab Behavioral InterviewAI Lab Technical Presentation
🔬Project Deep Dives0/17
Deep Dive - vLLMDeep Dive - SkyRLDeep Dive - FlashAttentionDeep Dive - FlashInferDeep Dive - DeepGEMMDeep Dive - NCCLDeep Dive - MegatronDeep Dive - DeepSpeedDeep Dive - RayDeep Dive - MLflowDeep Dive - PyTorchDeep Dive - TransformersDeep Dive - SGLangDeep Dive - slimeDeep Dive - DeepEPDeep Dive - TinkerDeep Dive - Light-PEFT
Back to Topics
LearnCore LLM FoundationsLLM Benchmarks & Limitations
📊MediumEvaluation & Benchmarks

LLM Benchmarks & Limitations

Build an evaluation suite for a policy-answering LLM: score evidence use, understand public benchmark contracts, control judge bias, and make release decisions from private tests.

26 min read
Learning path
Step 59 of 196 in the full curriculum
Chunking StrategiesInstruction Tuning & Chat Templates

Personalize this lesson

Adapt explanations and teaching visuals to your background and preferred voice.

The chunking chapter made deploy-policy evidence retrievable. Now CodeAssist, a developer assistant built around a large language model (LLM), is about to answer a release question. Its retriever returned this exact rule:

Retrieved evidence: Production deploys during a freeze require incident commander approval.

One candidate preserves that rule: "During a freeze, get incident commander approval before deploying." A second candidate says: "Any on-call engineer can deploy during a freeze." The second answer sounds helpful, but it invents permission that the evidence never granted.

That is the release problem: a fluent answer can still be unsafe. Before replacing a deployed model, you need evidence that its answers are more reliable without breaking latency, cost, or output contracts. You'll build that evidence from a private evaluation set, deterministic checks, calibrated model judges, and explicit release thresholds. Along the way, you'll separate public benchmark claims from product evidence and decide when code-generation pass@k belongs in the report.

The same freeze-deploy policy chunk scored against two CodeAssist answers: the grounded reply keeps freeze and incident commander approval and passes, while the fluent unsupported reply adds any on-call engineer can deploy and fails.
The retrieved freeze clause is the same for both answers. The grounded reply keeps `freeze` and `incident commander approval`. The fluent miss invents on-call deploy permission, so the deterministic check fails even though the sentence reads smoothly.

Start with questions you must answer correctly

A benchmark is a collection of tasks plus a scoring procedure. For CodeAssist, that means a private set whose rows mirror the policy questions the service must answer. For freeze-deploy, the test asks whether an answer preserves the retrieved commander-approval clause, not whether the model can answer unrelated public multiple-choice questions.

Start with a small private evaluation set. The policy statements are fictional platform rules for this lab, not general deployment advice.

Before reading the rows, ask two questions: which fact must a release engineer trust, and which extra claim would create risk? Each row records both answers.

CaseDeveloper questionRetrieved policy evidenceAnswer must includeAnswer must not add
freeze-deploy"Can I deploy payment-service during the freeze?"Production deploys during a freeze require incident commander approval.freeze, incident commander approvalany on-call engineer can deploy
rollback-runbook"What do I do after error rate crosses rollback threshold?"If p95 errors exceed the rollback threshold, execute the rollback runbook.rollback threshold, rollback runbookkeep deploying
secret-rotation"How long can an exposed token stay active?"Exposed production tokens must be revoked within 15 minutes.15 minutes, revoked24 hours

These rows are more useful than a generic "answer quality" prompt because each one names the behavior that passes and the risky extra claim that fails.

Before scoring a model, validate the evaluation set itself. A duplicated ID can silently overwrite a result, and a required phrase absent from its cited evidence creates an impossible test. If you duplicated freeze-deploy or required a phrase missing from its evidence, the validator should stop before any model answer is scored.

validate-private-eval-set.py
1rows = [ 2 { 3 "id": "freeze-deploy", 4 "evidence": "Production deploys during a freeze require incident commander approval.", 5 "required": ("freeze", "incident commander approval"), 6 }, 7 { 8 "id": "rollback-runbook", 9 "evidence": "If p95 errors exceed the rollback threshold, execute the rollback runbook.", 10 "required": ("rollback threshold", "rollback runbook"), 11 }, 12 { 13 "id": "secret-rotation", 14 "evidence": "Exposed production tokens must be revoked within 15 minutes.", 15 "required": ("15 minutes", "revoked"), 16 }, 17] 18 19ids = [row["id"] for row in rows] 20assert len(ids) == len(set(ids)), "evaluation IDs must be unique" 21 22for row in rows: 23 evidence = row["evidence"].lower() 24 missing = [phrase for phrase in row["required"] if phrase not in evidence] 25 assert not missing, f"{row['id']} has unsupported gold facts: {missing}" 26 print(f"{row['id']:20} valid required={len(row['required'])}") 27 28print(f"validated_cases={len(rows)}")
Output
1freeze-deploy valid required=2 2rollback-runbook valid required=2 3secret-rotation valid required=2 4validated_cases=3

A score is only meaningful with its contract

The earlier perplexity lesson made this point for next-token fit: a number without a protocol isn't a comparison. Product evaluation needs that same contract, then adds retrieval, output schema, and operational gates.

When a model card says "86%," the number is incomplete without the task and harness that produced it. Record five parts so another engineer can reproduce the result:

Contract partQuestion to recordCodeAssist policy example
DatasetWhich cases were scored, and at which version?deploy-policy-golden-v3, 120 reviewed developer questions
Input pathWhat context reached the model?top-3 chunks from the index, with policy version IDs
Output contractWhat must the response look like?concise answer plus cited source_page
ScorerHow is success computed?required facts, forbidden claims, schema validity, human audit
Release barWhat result permits deployment?no critical policy misses, plus latency and cost bounds

Chunking solved the evidence handoff. Evaluation starts after retrieval, so follow the request from left to right:

Diagram showing 1. Private cases question + expected facts, 2. Retrieve evidence policy chunks, 3. Generate answer with source ID, and 4. Score behavior facts + risk + format.
1. Private cases question + expected facts, 2. Retrieve evidence policy chunks, 3. Generate answer with source ID, and 4. Score behavior facts + risk + format.

When step 4 reports a miss, trace it upstream before blaming the model. If the required fact never reached the context, retrieval failed. If the context contains it but the answer contradicts or omits it, inspect generation or instruction following.

First gate: preserve policy evidence

Begin with deterministic checks whenever the answer has explicit requirements. This isn't a complete semantic evaluator. It's a fast test that catches answers missing required policy terms or adding known unsafe claims.

This lab uses three fixture answers. It also asserts that the evaluation rows themselves are valid: every required phrase must be present in the cited evidence.

Predict the output before running the check. freeze-deploy and secret-rotation should pass; rollback-runbook should fail because its answer drops both required policy terms and adds an unsafe instruction.

score-grounded-policy-answers.py
1from dataclasses import dataclass 2 3@dataclass(frozen=True) 4class EvalCase: 5 case_id: str 6 evidence: str 7 required_phrases: tuple[str, ...] 8 forbidden_phrases: tuple[str, ...] 9 10cases = [ 11 EvalCase( 12 "freeze-deploy", 13 "Production deploys during a freeze require incident commander approval.", 14 ("freeze", "incident commander approval"), 15 ("any on-call engineer can deploy",), 16 ), 17 EvalCase( 18 "rollback-runbook", 19 "If p95 errors exceed the rollback threshold, execute the rollback runbook.", 20 ("rollback threshold", "rollback runbook"), 21 ("keep deploying",), 22 ), 23 EvalCase( 24 "secret-rotation", 25 "Exposed production tokens must be revoked within 15 minutes.", 26 ("15 minutes", "revoked"), 27 ("24 hours",), 28 ), 29] 30 31answers = { 32 "freeze-deploy": "During a freeze, get incident commander approval before deploying.", 33 "rollback-runbook": "Keep deploying and watch the graph.", 34 "secret-rotation": "Exposed production tokens must be revoked within 15 minutes.", 35} 36 37def evaluate(case: EvalCase, answer: str) -> tuple[list[str], list[str]]: 38 evidence = case.evidence.lower() 39 text = answer.lower() 40 assert all(phrase in evidence for phrase in case.required_phrases) 41 missing = [phrase for phrase in case.required_phrases if phrase not in text] 42 unsupported = [phrase for phrase in case.forbidden_phrases if phrase in text] 43 return missing, unsupported 44 45passed = 0 46for case in cases: 47 missing, unsupported = evaluate(case, answers[case.case_id]) 48 status = "PASS" if not missing and not unsupported else "FAIL" 49 passed += status == "PASS" 50 print(f"{case.case_id:20} {status} missing={missing} unsupported={unsupported}") 51 52print(f"summary: grounded_policy_pass={passed}/{len(cases)}")
Output
1freeze-deploy PASS missing=[] unsupported=[] 2rollback-runbook FAIL missing=['rollback threshold', 'rollback runbook'] unsupported=['keep deploying'] 3secret-rotation PASS missing=[] unsupported=[] 4summary: grounded_policy_pass=2/3

The failed rollback-runbook answer is fluent, but it omits both required terms and invents a dangerous continuation. A helpful-sounding response isn't enough when an engineer may act on unsupported policy.

This split between retrieved context and generated answer also appears in RAG evaluation research. Ragas names faithfulness for support by retrieved context and answer relevance for addressing the question, rather than collapsing both failures into one vague score.[1]Reference 1RAGAS: Automated Evaluation of Retrieval Augmented Generation.https://arxiv.org/abs/2309.15217

Diagnose retrieval and generation separately

Suppose an answer omits incident commander approval. That observation alone doesn't identify the failing component. Compare the gold requirement with both the retrieved context and the generated answer:

Predict the label first: a missing phrase in retrieved context points to bad_retrieval; a missing phrase after successful retrieval points to bad_generation.

attribute-rag-failures.py
1cases = [ 2 { 3 "id": "good-answer", 4 "required": ("freeze", "incident commander approval"), 5 "retrieved": "Production deploys during a freeze require incident commander approval.", 6 "answer": "During a freeze, get incident commander approval before deploying.", 7 }, 8 { 9 "id": "retrieval-miss", 10 "required": ("freeze", "incident commander approval"), 11 "retrieved": "General deploy checklist. Run tests and update the changelog.", 12 "answer": "Run tests and update the changelog.", 13 }, 14 { 15 "id": "generation-miss", 16 "required": ("freeze", "incident commander approval"), 17 "retrieved": "Production deploys during a freeze require incident commander approval.", 18 "answer": "During a freeze, coordinate with the on-call engineer.", 19 }, 20] 21 22def failure_stage(case: dict[str, object]) -> str: 23 required = case["required"] 24 retrieved = str(case["retrieved"]).lower() 25 answer = str(case["answer"]).lower() 26 if any(term not in retrieved for term in required): 27 return "bad_retrieval" 28 if any(term not in answer for term in required): 29 return "bad_generation" 30 return "pass" 31 32for case in cases: 33 print(f"{case['id']:16} {failure_stage(case)}")
Output
1good-answer pass 2retrieval-miss bad_retrieval 3generation-miss bad_generation

Why check that required phrases occur in the evidence before evaluating model answers?

Answer

An incorrect golden row can make a correct answer look wrong or reward an unsupported claim. Evaluation data is part of the product and needs its own validation.

Public benchmarks answer narrower questions

Private tests tell you whether your application meets its contract. Public benchmarks help compare capabilities under standardized tasks, but each family measures a different property.

MMLU (Massive Multitask Language Understanding) evaluates multiple-choice accuracy across 57 academic and professional subjects.[2]Reference 2Measuring Massive Multitask Language Understanding (MMLU).https://arxiv.org/abs/2009.03300 That breadth can reveal knowledge differences under a stated prompt protocol. It can't prove that a policy assistant quotes the right deploy-freeze clause.

The HLE paper motivates a harder closed-ended exam by pointing to models above 90% on popular benchmarks such as MMLU.[3]Reference 3Humanity's Last Examhttps://arxiv.org/abs/2501.14249 MMLU-Pro keeps the exam format but expands each question from four answer options to ten and removes trivial or noisy items, making chance guessing less useful when MMLU scores plateau.[4]Reference 4MMLU-Pro: A More Robust and Challenging Multi-Task Language Understanding Benchmarkhttps://arxiv.org/abs/2406.01574

Stanford's HELM, a multidimensional foundation-model evaluation suite, scores models across standard taxonomies covering accuracy, calibration, robustness, fairness, and bias under fixed prompt formats.[5]Reference 5Holistic Evaluation of Language Models (HELM).https://arxiv.org/abs/2211.09110 That standardization helps compare foundation models, but HELM still can't evaluate proprietary policy retrieval or system-level service commitments.

GPQA (Graduate-Level Google-Proof Question Answering) narrows the task to difficult expert questions. Its 448 multiple-choice questions were written by domain experts in biology, physics, and chemistry.[6]Reference 6GPQA: A Graduate-Level Google-Proof Q&A Benchmark.https://arxiv.org/abs/2311.12022 Skilled non-expert validators scored 34% with unrestricted web access, which explains the name. A strong GPQA result can signal expert science question-answering ability under that harness, but it still doesn't prove that a developer workflow follows policy.

Math benchmarks narrow the question further. GSM8K (Grade School Math 8K) uses grade-school word problems, while MATH uses harder competition-style problems. Both help when a workflow must produce checkable mathematical answers, but neither measures open-ended support quality.[7]Reference 7Training Verifiers to Solve Math Word Problems (GSM8K).https://arxiv.org/abs/2110.14168[8]Reference 8Measuring Mathematical Problem Solving with the MATH Dataset.https://arxiv.org/abs/2103.03874

At the harder frontier, HLE's initial preprint described 3,000 questions, while the project later finalized a public set of 2,500; FrontierMath targets research-level mathematics.[3]Reference 3Humanity's Last Examhttps://arxiv.org/abs/2501.14249[9]Reference 9Humanity's Last Examhttps://lastexam.ai/[10]Reference 10FrontierMath: A Benchmark for Evaluating Advanced Mathematical Reasoning in AIhttps://arxiv.org/abs/2411.04872 ARC-AGI-2, the second Abstraction and Reasoning Corpus for artificial general intelligence, asks systems to infer novel transformations from small visual-grid demonstrations rather than recall subject matter.[11]Reference 11ARC-AGI-2: A New Challenge for Frontier AI Reasoning Systemshttps://arxiv.org/abs/2505.11831 These benchmarks answer different research questions. A model isn't "better at reasoning" in every product merely because it improves on one of them.

HumanEval provides 164 handwritten Python functions with unit tests and introduced functional-correctness reporting with repeated samples and pass@k.[12]Reference 12Evaluating Large Language Models Trained on Code (HumanEval).https://arxiv.org/abs/2107.03374 SWE-bench moves from isolated functions to real GitHub issues whose patches are tested in repository environments.[13]Reference 13SWE-bench: Can Language Models Resolve Real-World GitHub Issues?.https://arxiv.org/abs/2310.06770

The commonly reported SWE-bench Verified subset contains 500 human-filtered tasks. Official leaderboards also split results by agent scaffold, so a resolved rate describes a whole system, not a raw-model score.[14]Reference 14SWE-bench Official Leaderboardshttps://www.swebench.com/ These benchmarks matter when your system edits code, but neither evaluates developer-facing policy truthfulness.

For open-ended responses, MT-Bench uses a model judge, while Chatbot Arena collects blind pairwise human preferences and estimates rankings with Bradley-Terry-style models.[15]Reference 15Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena.https://arxiv.org/abs/2306.05685[16]Reference 16Chatbot Arena: An Open Platform for Evaluating LLMs by Human Preference.https://arxiv.org/abs/2403.04132 These methods can compare tone, fluency, or perceived helpfulness, but they still measure preference rather than policy truth.

Using familiar Elo-scaled ratings, the probability that model AAA beats model BBB with latent ratings RAR_ARA​ and RBR_BRB​ is:

P(A≻B)=11+10(RB−RA)/400P(A \succ B) = \frac{1}{1 + 10^{(R_B - R_A) / 400}}P(A≻B)=1+10(RB​−RA​)/4001​

The equation turns a pairwise vote into a relative ranking. User preference still doesn't measure factual ground truth: an answer can win because it sounds polite or confident while citing an unsupported policy.

Evaluation familyScored unitTypical metricUseful signalMissing deployment proof
Broad knowledgeMMLU or MMLU-Pro questionmultiple-choice accuracyacademic/professional task coverageevidence grounding and tool behavior
Multi-metric foundationsHELM scenariomulti-axis score (accuracy, robustness, fairness)standardized multi-metric foundation comparisonproprietary policy and system SLAs
Expert STEM QAGPQA questionmultiple-choice accuracydifficult biology, physics, and chemistry QAproduction workflow behavior
Checkable mathematicsGSM8K or MATH problemparsed final-answer accuracymathematical answer execution under a fixed harnessgrounded deploy-policy answers
Frontier reasoning researchHLE, FrontierMath, or ARC-AGI-2 itembenchmark-specific correctnessexpert-question or novel-task performance in that suitegeneral deployment reliability
Executable codeHumanEval function or SWE-bench Verified patchpass@k or resolved rate under a named scaffoldprograms that satisfy testsdeploy-policy answer compliance
Open-ended preferenceMT-Bench or Arena comparisonjudge score or Bradley-Terry Elostyle and perceived helpfulnessfactual ground truth
Private application evalquestion, retrieved clause, response, tracepolicy pass rate plus gatesbehavior on your release pathcapability outside your covered slices

Compare results only when the dataset, input path, output contract, prompt, temperature and other sampling settings, tools, and scorer match. 84% on a multiple-choice set and 42% on repository fixes aren't competing measurements of the same property.

Encode that rule as a field-by-field equality check. Before reading the output, predict the result: A and B share one harness, while C sees five chunks instead of three and should be incomparable.

check-harness-comparability.py
1runs = { 2 "candidate-a": { 3 "dataset": "policy-golden-v3", 4 "retriever": "chunks-v2/top3", 5 "prompt": "support-answer-v4", 6 "output_contract": "answer-with-source-page-v2", 7 "toolset": ("policy-search-v2",), 8 "temperature": 0.0, 9 "max_tokens": 180, 10 "scorer": "facts-v2", 11 "score": 0.97, 12 }, 13 "candidate-b": { 14 "dataset": "policy-golden-v3", 15 "retriever": "chunks-v2/top3", 16 "prompt": "support-answer-v4", 17 "output_contract": "answer-with-source-page-v2", 18 "toolset": ("policy-search-v2",), 19 "temperature": 0.0, 20 "max_tokens": 180, 21 "scorer": "facts-v2", 22 "score": 0.99, 23 }, 24 "candidate-c": { 25 "dataset": "policy-golden-v3", 26 "retriever": "chunks-v2/top5", 27 "prompt": "support-answer-v4", 28 "output_contract": "answer-with-source-page-v2", 29 "toolset": ("policy-search-v2",), 30 "temperature": 0.0, 31 "max_tokens": 180, 32 "scorer": "facts-v2", 33 "score": 1.00, 34 }, 35} 36 37contract_fields = ( 38 "dataset", 39 "retriever", 40 "prompt", 41 "output_contract", 42 "toolset", 43 "temperature", 44 "max_tokens", 45 "scorer", 46) 47 48def comparable(left: dict[str, object], right: dict[str, object]) -> bool: 49 return all(left[field] == right[field] for field in contract_fields) 50 51print("A vs B comparable:", comparable(runs["candidate-a"], runs["candidate-b"])) 52print("A vs C comparable:", comparable(runs["candidate-a"], runs["candidate-c"])) 53print("C differs because its retriever sees more chunks.")
Output
1A vs B comparable: True 2A vs C comparable: False 3C differs because its retriever sees more chunks.

A model is stronger on MMLU than another model is on SWE-bench. Which model should answer deploy-policy questions?

Answer

You can't decide from those two numbers. They score different tasks and neither measures your policy-answer contract. Run both candidates on the private policy set with the same retrieval and generation harness.

pass@k: measure a workflow that can test several drafts

For code generation, one answer isn't always the real workflow. A developer may generate several candidates and run tests until one passes. HumanEval's pass@k estimator measures the probability that at least one of kkk selected samples is correct, given nnn generated programs and ccc correct programs.[12]Reference 12Evaluating Large Language Models Trained on Code (HumanEval).https://arxiv.org/abs/2107.03374

Suppose a config-parser task generated 100 candidates and tests accepted 20. One random candidate succeeds with probability 0.20. Before looking at the formula, predict what happens when the workflow can test 10 distinct candidates: the all-miss risk should shrink, but the metric should still describe this test-and-select workflow, not the model's one-shot accuracy.

pass⁡@k=1−(n−ck)(nk)\operatorname{pass}@k = 1 - \frac{\binom{n-c}{k}}{\binom{n}{k}}pass@k=1−(kn​)(kn−c​)​

Here, nnn is the number of generated programs, ccc is the number that pass tests, and kkk is the number you're allowed to try. Chen et al. warn against estimating the same quantity as 1−(1−p^)k1-(1-\hat{p})^k1−(1−p^​)k from the empirical pass@1. That form treats the kkk draws as independent with replacement; the combinatorial estimator is the unbiased one used on HumanEval.

estimate-pass-at-k.py
1from math import comb 2 3def pass_at_k(total_samples: int, correct_samples: int, k: int) -> float: 4 if not 0 <= correct_samples <= total_samples: 5 raise ValueError("correct_samples must be inside the sampled set") 6 if not 1 <= k <= total_samples: 7 raise ValueError("k must be between 1 and total_samples") 8 if total_samples - correct_samples < k: 9 return 1.0 10 return 1.0 - comb(total_samples - correct_samples, k) / comb(total_samples, k) 11 12p_hat = 20 / 100 13print("k biased 1-(1-p)^k unbiased estimator") 14for k in (1, 5, 10, 20): 15 biased = 1.0 - (1.0 - p_hat) ** k 16 unbiased = pass_at_k(100, 20, k) 17 print(f"{k:<3} {biased:.4f} {unbiased:.4f}") 18 19assert abs(pass_at_k(100, 20, 1) - 0.20) < 1e-12 20assert abs(pass_at_k(100, 20, 10) - 0.9049) < 5e-5
Output
1k biased 1-(1-p)^k unbiased estimator 21 0.2000 0.2000 35 0.6723 0.6807 410 0.8926 0.9049 520 0.9885 0.9934

At k=10, the shortcut is 0.8926 and the unbiased estimator is 0.9049. The gap is modest because 100 generated samples leave a large pool outside the 10 tested draws. It grows when n is closer to k.

A 10 by 10 grid of 100 generated programs with 20 passing candidates beside a pass-at-k probability chart, where success rises from 20.0 percent at k equals 1 to 99.3 percent at k equals 20 as all-miss risk collapses.
With 20 passing programs among 100 generated candidates, testing distinct drafts raises workflow success from 20.0% at `k=1` to 68.1% at `k=5`, 90.5% at `k=10`, and 99.3% at `k=20`. First-draft quality stays at 20%.

This distinction matters at the product boundary. Multiple tested drafts make sense for a generated parser because unit tests select a passing implementation. For a developer-facing policy answer, sampling more drafts and choosing the most confident-looking one isn't a correctness test unless a policy-grounded scorer selects the winner.

Open-ended answers need controlled judgment

Deterministic checks catch explicit clauses, but they don't settle every question. Two answers can both cite the correct deadline while differing in clarity or empathy. For that remainder, teams often use humans or an LLM judge.

The choice of rubric changes what the judge can see. Point-wise scoring rates one answer on a 1-to-5 scale and often compresses scores near the top. Pairwise comparison ranks candidate A against candidate B and can discriminate more sharply, but presentation order can sway the result. Ground either approach with explicit reference criteria: pass the retrieved policy text into the judge prompt, name the facts the response must contain, and flag forbidden or unsupported claims.

The MT-Bench study found that capable LLM judges can approximate human preferences in its setting, but also documents position bias, verbosity bias, and cases where a judge favored its own model family.[15]Reference 15Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena.https://arxiv.org/abs/2306.05685 A judge result is measurement output, not ground truth.

Position bias is the failure this lab measures: most judges in that study preferred whichever answer appeared first. Verbosity bias lets a longer rewrite win even when it adds no facts. Self-enhancement was harder to isolate from style, so treat a same-family judge as a risk to control, not as proof that its generator wins.

The small simulation below gives a toy judge an explicit position bias: when two answers contain the same required facts, it chooses whichever appears first. Predict the result before running it. The equivalent pair should become unstable after swapping; the factual miss should leave the grounded answer ahead in both orders.

detect-position-biased-judge.py
1def biased_judge(answer_a: str, answer_b: str, required: tuple[str, ...]) -> str: 2 score_a = sum(term in answer_a.lower() for term in required) 3 score_b = sum(term in answer_b.lower() for term in required) 4 if score_a > score_b: 5 return "A" 6 if score_b > score_a: 7 return "B" 8 return "A" # Deliberate position bias for equal-quality answers. 9 10def swap_checked(answer_a: str, answer_b: str, required: tuple[str, ...]) -> dict[str, object]: 11 first_order = biased_judge(answer_a, answer_b, required) 12 swapped_order = biased_judge(answer_b, answer_a, required) 13 normalized_swapped = {"A": "B", "B": "A"}[swapped_order] 14 if first_order != normalized_swapped: 15 return {"winner": "needs_human_review", "stable": False} 16 return {"winner": first_order, "stable": True} 17 18required = ("freeze", "incident commander approval") 19concise = "During a freeze, get incident commander approval before deploying." 20friendly = "I know the deploy is urgent. During the freeze, get incident commander approval first." 21unsupported = "Any on-call engineer can deploy during the freeze." 22 23print("equivalent:", swap_checked(concise, friendly, required)) 24print("factual miss:", swap_checked(concise, unsupported, required))
Output
1equivalent: {'winner': 'needs_human_review', 'stable': False} 2factual miss: {'winner': 'A', 'stable': True}

An unstable comparison isn't a failure of either candidate. It means the measurement can't distinguish them reliably under its current rubric. Send such cases to a human reviewer or improve the rubric before aggregating a winner.

Two order-swapped pairwise judge experiments: equally grounded concise and friendly answers both win when placed in slot A, so their normalized winners conflict and require review, while a grounded answer beats an unsupported answer in both orders after normalization.
Raw `A` and `B` votes name positions, not original candidates. Normalize both order-swapped runs before comparing them: a winner that flips needs review, while a factual winner that survives both orders is stable.

Public test sets can lose their meaning

A public benchmark is reproducible because everyone can access its tasks. That visibility creates a second property to manage: questions or solutions may appear in training corpora. Once a model has encountered a test item during training, its score no longer describes performance on a genuinely unseen example.

When a static public benchmark becomes the primary release target, Goodhart's Law takes over: when a measure becomes a target, it ceases to be a good measure. Teams can optimize prompt formats, synthetic fine-tuning mixes, and post-training data for leaderboard points. Over time, a high score may reflect benchmark-specific overfitting rather than task generalization.

Don't jump from risk to accusation. A public score alone doesn't prove contamination in a particular model. It does mean that a report should state its decontamination checks, while high-stakes selection should add fresh or private tasks.

LiveCodeBench was designed around this problem. It continually collects coding tasks released over time and evaluates models on problems that appear after their stated training cutoff.[17]Reference 17LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codehttps://arxiv.org/abs/2403.07974 LiveBench applies a similar idea more broadly: it adds and updates questions monthly from recent sources and scores them against objective answers, so a static public dump is less useful as training leakage.[18]Reference 18LiveBench: A Challenging, Contamination-Limited LLM Benchmarkhttps://arxiv.org/abs/2406.19314 Time splits reduce exposure risk, although they still depend on accurate cutoff information and a stable harness.

Static public benchmark items shown across web copies, uncertain training overlap, and evaluation reuse beside a time-split timeline where a March 31, 2026 tuning snapshot moves the February 10 policy case to regression and keeps three April and May cases as fresh holdout evidence.
Possible overlap in a static public set is a risk to check, not proof of contamination. A March 31 tuning snapshot moves the February 10 case to regression and preserves the April 8, April 21, and May 3 cases as fresh holdout evidence.

For public benchmarks, document the decontamination check instead of assuming the training corpus is clean. GPT-3's evaluation analysis, for example, used n-gram overlap checks between benchmark examples and training data and reported limitations when overlap remained.[19]Reference 19Language Models are Few-Shot Learners.https://arxiv.org/abs/2005.14165 Treat that overlap as a lower bound on exposure: paraphrase, translation, and reordering can leak task content while looking "clean."

A time split reduces exposure risk from older public copies. A private holdout covers the workload you'll deploy, so high-stakes selection still needs fresh or private tasks even when public decontamination reports look good.

For the CodeAssist policy assistant, keep private policy cases separate from prompt examples, demo transcripts, few-shot packs, synthetic seed rows, SFT data, retrieval fixtures, human-rater instructions, and internal runbooks that may later be used for tuning.

If an evaluation case becomes a training example, appears in a few-shot pack, seeds synthetic data, enters a judge rubric that quotes gold answers, or is indexed for retrieval, retire it from the holdout set. Keep it as regression evidence, but stop calling it unseen generalization.

Private golden questions and answers are also a retrieval contamination surface. Never ingest eval fixtures into the production policy index: a retriever that can look up the test is no longer measuring generalization. Keep an eval/ corpus checksum-blocked from the production index, separate fixture IDs from indexable document IDs, and treat index membership the same way you treat holdout membership. Regression suites may intentionally include known cases; holdout claims may not.

A time-split suite also helps when new policy versions arrive. A model tuned using cases created through March shouldn't be evaluated as "unseen" on those same cases. Hold out cases authored after the tuning snapshot. With the snapshot below, predict the split: the February case belongs in regression, while the April and May cases remain fresh holdout evidence.

make-time-split-holdout.py
1from datetime import date 2 3tuning_snapshot = date.fromisoformat("2026-03-31") 4policy_cases = [ 5 ("freeze-approval-rule", "2026-02-10"), 6 ("rollback-threshold-runbook", "2026-04-08"), 7 ("secret-rotation-sla", "2026-04-21"), 8 ("break-glass-access-review", "2026-05-03"), 9] 10 11training_visible = [] 12fresh_holdout = [] 13for case_id, created_at in policy_cases: 14 destination = fresh_holdout if date.fromisoformat(created_at) > tuning_snapshot else training_visible 15 destination.append(case_id) 16 17print("known before tuning:", training_visible) 18print("fresh holdout:", fresh_holdout) 19assert "rollback-threshold-runbook" in fresh_holdout
Output
1known before tuning: ['freeze-approval-rule'] 2fresh holdout: ['rollback-threshold-runbook', 'secret-rotation-sla', 'break-glass-access-review']

Turn results into a release gate

Your evaluation is useful when it changes an engineering decision. One model may give grounded answers but miss your p95 latency target for live chat. Another may be fast and cheap, but fail critical policy cases. Define the bar before comparing models, then make each failure route explicit.

Developer-assistant release-gate matrix: fast-small misses policy and rejects, balanced clears policy latency and cost so it ships, and slow-specialist clears quality but misses latency and cost so it routes.
Schema gate passes for all three. `fast-small` misses policy, `balanced` clears every bar, and `slow-specialist` clears quality but misses latency and cost, so route it for escalations.

The fixture values below represent measurements from a fictional private evaluation run. Predict the decisions before reading the code: fast-small should be rejected for policy quality, balanced should ship, and slow-specialist should route because it misses an online gate. The code makes the release gate explicit: a candidate that misses policy or schema quality is rejected, while a correct but expensive model may be routed only to difficult cases.

apply-release-gates.py
1candidates = [ 2 { 3 "name": "fast-small", 4 "policy_pass_rate": 0.91, 5 "schema_pass_rate": 1.00, 6 "p95_latency_ms": 420, 7 "cost_per_case": 0.002, 8 }, 9 { 10 "name": "balanced", 11 "policy_pass_rate": 0.99, 12 "schema_pass_rate": 1.00, 13 "p95_latency_ms": 680, 14 "cost_per_case": 0.008, 15 }, 16 { 17 "name": "slow-specialist", 18 "policy_pass_rate": 1.00, 19 "schema_pass_rate": 1.00, 20 "p95_latency_ms": 1800, 21 "cost_per_case": 0.031, 22 }, 23] 24 25minimum_policy = 0.98 26minimum_schema = 0.995 27online_latency_limit_ms = 900 28online_cost_limit = 0.015 29 30def decision(candidate: dict[str, float | str]) -> str: 31 if candidate["policy_pass_rate"] < minimum_policy: 32 return "reject: policy quality below bar" 33 if candidate["schema_pass_rate"] < minimum_schema: 34 return "reject: output contract below bar" 35 if candidate["p95_latency_ms"] > online_latency_limit_ms: 36 return "route: reserve for escalations because latency is high" 37 if candidate["cost_per_case"] > online_cost_limit: 38 return "route: reserve for escalations because cost is high" 39 return "ship: passes online gates" 40 41for candidate in candidates: 42 print(f"{candidate['name']:15} {decision(candidate)}")
Output
1fast-small reject: policy quality below bar 2balanced ship: passes online gates 3slow-specialist route: reserve for escalations because latency is high

The public benchmark shortlist never appears inside decision. That's intentional. Public scores help decide which candidates deserve testing; the release gate uses measurements from the workload you're about to serve.

Inspect failure slices, not the average alone

An aggregate score can hide the category with the largest operational impact. The run below clears four of six cases overall, but freeze-deploy answers fail most often. Predict which number should govern a release when that slice is critical: the slice, not the average.

report-failure-slices.py
1from collections import defaultdict 2 3results = [ 4 ("freeze-deploy", True), 5 ("freeze-deploy", False), 6 ("freeze-deploy", False), 7 ("rollback-runbook", True), 8 ("rollback-runbook", True), 9 ("secret-rotation", True), 10] 11 12by_slice: dict[str, list[bool]] = defaultdict(list) 13for category, passed in results: 14 by_slice[category].append(passed) 15 16overall = sum(passed for _, passed in results) / len(results) 17print(f"overall={overall:.2%}") 18for category in sorted(by_slice): 19 values = by_slice[category] 20 rate = sum(values) / len(values) 21 print(f"{category:20} pass_rate={rate:.2%} cases={len(values)}")
Output
1overall=66.67% 2freeze-deploy pass_rate=33.33% cases=3 3rollback-runbook pass_rate=100.00% cases=2 4secret-rotation pass_rate=100.00% cases=1

That report should block a release if deploy-freeze policy mistakes are critical, even when the average seems acceptable. Slices turn a vague quality miss into a routing or remediation decision.

Small samples need an uncertainty margin

Three passing examples make a good tutorial, not a production release argument. Earlier statistics lessons introduced confidence intervals for estimated rates. Before running the next check, predict which rows clear a 0.95 floor: only the large sample should have enough evidence. For a binary pass metric, a Wilson lower bound gives a conservative view of the pass rate supported by a finite sample:

require-confidence-before-release.py
1from math import sqrt 2 3def wilson_lower_bound(successes: int, total: int, z: float = 1.96) -> float: 4 proportion = successes / total 5 denominator = 1 + z**2 / total 6 center = proportion + z**2 / (2 * total) 7 margin = z * sqrt((proportion * (1 - proportion) + z**2 / (4 * total)) / total) 8 return (center - margin) / denominator 9 10release_floor = 0.95 11for successes, total in ((3, 3), (49, 50), (990, 1000)): 12 lower = wilson_lower_bound(successes, total) 13 status = "PASS" if lower >= release_floor else "COLLECT_MORE_OR_FIX" 14 print(f"{successes:>3}/{total:<4} lower_bound={lower:.3f} {status}")
Output
13/3 lower_bound=0.438 COLLECT_MORE_OR_FIX 2 49/50 lower_bound=0.895 COLLECT_MORE_OR_FIX 3990/1000 lower_bound=0.982 PASS

Even perfect performance on three examples has a weak lower bound. Build a sufficiently large, risk-stratified holdout before claiming a system clears a production-quality bar.

Write down enough to reproduce the claim

Evaluation reports should let another engineer rerun the comparison and inspect its failures. Without the input path, scorer, and holdout history, a ranking can't be reproduced or diagnosed. Record these fields before sharing it:

Report fieldWhy it mattersExample entry
Dataset version and holdout policyprevents accidental training leakagepolicy-golden-v3, never used for prompt tuning
Retrieval setupseparates missing evidence from bad answerschunker version, top-k, index snapshot
Prompt and chat formatinstruction formatting changes outputssystem prompt hash, template version
Model and sampling settingsoutput variance depends on decodingmodel ID, temperature, max tokens
Scorer and judge controlsmetrics can hide biasdeterministic gates, order swap, audit sample
Failure slicesaverages conceal unsafe casesdeploy freezes, rollbacks, multilingual queries
Latency and costa correct system still needs to runp50/p95 latency, cost per successful case

That prompt-and-chat-format row points to the next lesson. If a model regularly omits required structure or speaks in the wrong role, evaluation has exposed a behavior gap. You then need to understand how instruction tuning and chat templates teach the interaction contract.

Failure patterns to diagnose

SymptomLikely causeFirst fix to test
Answer omits the deadline although policy chunk contains itgeneration or prompt contract failurerequire cited facts and inspect prompt/template
Answer sounds confident but cites a clause absent from contextunsupported generationadd forbidden-claim checks and human review slice
Two published model scores reverse under a new harnessincomparable prompt or scoring setuprerun identical harness and publish configuration
Judge selects whichever answer appears firstposition biasscore both orders and reject unstable comparisons
Judge prefers the longer rewrite of the same factsverbosity biascap length, penalize repetition, or require a factual rubric
Holdout cases answer perfectly only after retrievaleval gold or near-duplicates entered the policy indexchecksum-block eval IDs; rebuild index without fixtures
Holdout score collapses after few-shot or SFT refreshleaked holdout rows in packs, SFT, or judge goldmove cases to regression; refresh holdout after the snapshot
Public n-gram clean but private tasks lagparaphrase or reordering still exposed the public settrust private/fresh tasks over public decontamination alone
Public score rises while private cases stagnatetask mismatch or contaminated public signalprioritize fresh private holdout and failure analysis
Correct model misses live latency targetoperational bottleneckroute difficult cases or select a faster candidate

Mastery check

Key concepts

  • Evaluation contracts and private golden sets
  • Grounded answer checks for RAG
  • Benchmark families and harness comparability
  • HumanEval and pass@k
  • Judge bias controls
  • Contamination and time-split holdouts
  • Quality, latency, and cost release gates

Evaluation rubric

  • Foundational: Explains why public benchmark scores can't replace a private policy-answer evaluation contract.
  • Intermediate: Builds a grounded-answer check that attributes retrieval versus generation failures.
  • Intermediate: Explains when pass@k is appropriate and why it doesn't equal policy-answer accuracy.
  • Advanced: Designs judge-order, failure-slice, uncertainty, latency, and cost controls for a release decision.

Common pitfalls

  • Treating a public benchmark gain as evidence that policy answers are grounded.
  • Comparing model scores produced by different prompts, tools, or scoring rules.
  • Accepting an LLM judge result without checking position bias or factual anchors.
  • Releasing on a mean quality score while ignoring critical slices, latency, or cost.

Follow-up questions

Why does the evaluation set include retrieved evidence as well as expected answers?

Answer

A RAG system can fail before or after generation. Keeping the evidence lets you tell a retrieval miss from an answer that ignored or contradicted an available clause.

Why can't pass@10 be treated as the same claim as policy-answer accuracy?

Answer

pass@10 assumes you can generate several code candidates and select one with executable tests. A developer-facing policy response needs its own grounding and safety checks; sampling more unscored answers doesn't establish correctness.

When should an LLM judge comparison be sent to human review?

Answer

When the winner changes after answer-order swaps, factual anchors disagree, or the case carries a risk that the rubric doesn't safely score. Instability is evidence about the evaluator, not permission to pick a convenient winner.

Practice extension

Add a fourth policy case whose retrieved context is intentionally wrong. Extend score-grounded-policy-answers.py to label failures as bad_retrieval or bad_generation. Then add a source_page field to the candidate response and reject answers whose citation doesn't match the evidence row. You have now built the first slice of an evaluation dashboard for a RAG assistant.

Complete the lesson

Mastery Check

Answer every question, then check your score. Score 75% or higher to mark this lesson complete.

1.A golden row cites If p95 errors exceed the rollback threshold, execute the rollback runbook, but requires rollback threshold and keep deploying. What should happen before candidate answers are scored?

Correct answer: Reject or repair the row because keep deploying isn't supported by its cited evidence.

Evaluation data has its own contract. A gold requirement absent from the cited evidence can penalize a grounded answer or reward an invented policy, so the row must be fixed before model scoring.

2.A policy case requires freeze and incident commander approval. Retrieved evidence contains both phrases, but the answer says During a freeze, coordinate with the on-call engineer. How should the failure be attributed?

Correct answer: bad_generation, because the evidence supplied both required facts and the answer omitted one.

Compare the requirement with retrieved context first. Since both facts reached the model, retrieval supplied the needed clause. The answer then failed its contract, so the first failure is generation or instruction following.

3.Model A reports 86% on MMLU and Model B reports 42% resolved on SWE-bench. What evidence can support choosing one for a deploy-policy assistant?

Correct answer: Run both on the same private policy holdout with identical retrieval, prompt, tools, sampling, output contract, and scorer.

MMLU and SWE-bench have different tasks, harnesses, and metrics. A product decision needs matched system conditions on the workload that matters, with the input path and scoring contract held constant.

4.A code task generates n=100 candidates, tests find c=20 passing programs, and the workflow can test k=10 distinct candidates. What does pass@10 estimate?

Correct answer: About 0.9049, the chance that at least one tested candidate passes, using the without-replacement estimator.

The estimator is 1 - comb(80, 10) / comb(100, 10), approximately 0.9049. The 0.8926 shortcut assumes independent with-replacement draws. pass@k measures a tested code-selection workflow, not one unverified policy answer.

5.Two policy answers contain the required freeze and incident commander approval facts. The judge picks A for (concise, friendly), then picks A again after the order is swapped to (friendly, concise). What should the evaluator do?

Correct answer: Normalize slot labels back to candidate identity and send the pair to review when the winner changes.

A refers to a different candidate after the swap. Normalization reveals opposite candidate choices, so the comparison is order-sensitive. It isn't safe to declare a winner until the rubric or human review resolves the instability.

6.A private policy case created before a March 31 tuning snapshot was used in prompt tuning and is still labeled unseen holdout. How should it be classified?

Correct answer: Move it to regression and replace it with a fresh post-snapshot holdout case.

Tuning exposure means the row no longer measures unseen generalization. It remains useful for regression detection, while a fresh post-snapshot case is needed for a holdout claim. Retrieval fixtures and judge gold can contaminate a holdout too.

7.A public benchmark shortlist contains MMLU, GPQA, and SWE-bench. CodeAssist answers internal deploy policy questions from retrieved evidence. Which interpretation of public scores is defensible?

Correct answer: Use public scores to shortlist capability candidates, then measure policy grounding and system behavior on a private matched harness.

Each public benchmark has a narrower task contract. Public results can guide which candidates deserve product testing, but they don't measure retrieval, policy evidence use, output schema, latency, or cost on CodeAssist's path.

8.A candidate has policy pass rate 1.00, schema pass rate 1.00, p95 latency 1,800 ms, and cost USD 0.008. The live-chat gate requires quality at least 0.98, schema at least 0.995, p95 at most 900 ms, and cost at most USD 0.015. What route follows?

Correct answer: Reserve it for escalations or offline work, because quality and cost pass but live-chat p95 latency fails.

Policy, schema, and cost clear their thresholds. Latency is a separate operational gate, so the candidate may fit a slower lane but not normal live chat. The latency miss shouldn't be mislabeled as a policy-quality failure.

9.A model passes 98.5% of all private cases, but only 70% of freeze-deploy cases. The release contract requires every critical slice to pass at least 95%. What decision is justified?

Correct answer: Block release and fix or route around freeze-deploy cases, because the critical slice misses its own gate.

A high aggregate can hide concentrated risk. The declared critical slice is at 70%, well below its 95% floor, so broad release isn't authorized even though other slices raise the overall average.

10.A model passes all three evaluation cases, but its 95% Wilson lower bound is 0.438 and the release floor is 0.95. What conclusion follows?

Correct answer: Collect more risk-stratified cases; a 0.438 lower bound doesn't support a 0.95 release floor.

Three successes are a weak production claim even with no observed failures. The Wilson lower bound summarizes uncertainty, not an exact true rate. More representative cases are needed before the 0.95 floor is supported.

10 questions remaining.

Next Step
Continue to Instruction Tuning & Chat Templates

You can now tell a grounded policy answer from a fluent miss, and you know when a public score isn't a release argument. Next you'll teach that grounded behavior with supervised examples and a chat template, then keep the same freeze-deploy holdout out of training.

PreviousChunking Strategies
Share this article
XFacebookLinkedInBlueskyRedditHacker NewsEmail
References

RAGAS: Automated Evaluation of Retrieval Augmented Generation.

Es, S., et al. · 2023 · arXiv preprint

https://arxiv.org/abs/2309.15217

Measuring Massive Multitask Language Understanding (MMLU).

Hendrycks, D., et al. · 2021 · ICLR 2021

https://arxiv.org/abs/2009.03300

Humanity's Last Exam

Center for AI Safety, Scale AI, and HLE Contributors Consortium · 2025 · arXiv preprint

https://arxiv.org/abs/2501.14249

MMLU-Pro: A More Robust and Challenging Multi-Task Language Understanding Benchmark

Wang, Y., et al. · 2024

https://arxiv.org/abs/2406.01574

Holistic Evaluation of Language Models (HELM).

Liang, P., et al. · 2023 · TMLR

https://arxiv.org/abs/2211.09110

GPQA: A Graduate-Level Google-Proof Q&A Benchmark.

Rein, D., et al. · 2023

https://arxiv.org/abs/2311.12022

Training Verifiers to Solve Math Word Problems (GSM8K).

Cobbe, K., et al. · 2021

https://arxiv.org/abs/2110.14168

Measuring Mathematical Problem Solving with the MATH Dataset.

Hendrycks, D., et al. · 2021 · NeurIPS 2021

https://arxiv.org/abs/2103.03874

Humanity's Last Exam

Center for AI Safety and Scale AI · 2025

https://lastexam.ai/

FrontierMath: A Benchmark for Evaluating Advanced Mathematical Reasoning in AI

Glazer, E., et al. (Epoch AI) · 2024

https://arxiv.org/abs/2411.04872

ARC-AGI-2: A New Challenge for Frontier AI Reasoning Systems

Chollet, F., et al. · 2025

https://arxiv.org/abs/2505.11831

Evaluating Large Language Models Trained on Code (HumanEval).

Chen, M., et al. · 2021 · arXiv preprint

https://arxiv.org/abs/2107.03374

SWE-bench: Can Language Models Resolve Real-World GitHub Issues?.

Jimenez, C. E., et al. · 2024 · ICLR 2024

https://arxiv.org/abs/2310.06770

SWE-bench Official Leaderboards

SWE-bench Team · 2026

https://www.swebench.com/

Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena.

Zheng, L., et al. · 2023 · NeurIPS 2023

https://arxiv.org/abs/2306.05685

Chatbot Arena: An Open Platform for Evaluating LLMs by Human Preference.

Chiang, W. L., et al. · 2024

https://arxiv.org/abs/2403.04132

LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code

Jain, N., et al. · 2024

https://arxiv.org/abs/2403.07974

LiveBench: A Challenging, Contamination-Limited LLM Benchmark

White, C., et al. · 2024

https://arxiv.org/abs/2406.19314

Language Models are Few-Shot Learners.

Brown, T., et al. · 2020 · NeurIPS 2020

https://arxiv.org/abs/2005.14165

Discussion

Questions and insights from fellow learners.

Discussion loads when you reach this section.