Evaluation

Wiki chapters and blog posts about Evaluation.

Wiki

Agent Evaluation: You Are Grading the System, Not the Model

Agent evaluation grades the whole system — model, prompts, tools, loop, environment. An episode is tasks, trials, trajectories, and outcomes; pass^k measures reliability, stateful graders check final states, and cost is accounted per successful task.

Intermediate 13 min read

RAG in Practice: Chunking, Hybrid Retrieval, Reranking and Evaluation

How to build a retrieval-augmented generation system that works: clean and chunk documents, combine dense and BM25 retrieval with RRF, rerank with a cross-encoder, assemble the context, and measure every step with Hit@k and MRR on a small runnable corpus.

Intermediate 42 min read

Benchmark Contamination: How It Happens, How to Detect It, How to Avoid It

Benchmark contamination means evaluation questions, answers or paraphrases of them ended up in a model's training data, so scores measure memory instead of ability. A small experiment with known ground truth measures the dose-response and what n-gram and model-based detectors catch or miss.

Intermediate 44 min read

The Statistics of Evaluation: pass@k, Confidence Intervals and Sample Size

A benchmark score is an estimate from a finite set of questions and carries error. Learn the unbiased pass@k estimator, confidence intervals for accuracy, paired comparison of two models and how many questions detecting a gap takes, with runnable code and interactive widgets.

Intermediate 13 min read

LLM Evaluation Methodology: Benchmarks, Contamination and a Workflow

Evaluating an LLM means estimating its performance on a whole class of tasks from a finite set of questions. This page covers what MMLU, HumanEval, GSM8K and MT-Bench measure, how to detect contamination, why a mature evaluation has four layers, and a workflow you can adopt.

Intermediate 18 min read

Production evaluation for LLMs: replay, canaries, and rollback

Production evaluation connects model quality, system reliability, and user outcomes. Compare versions on paired requests, set release gates for critical slices, and use shadow traffic, canaries, and randomized experiments to answer different release questions.

Intermediate 8 min read

LLM-as-a-Judge: Using a Model as the Grader, Its Biases and Calibration

LLM-as-a-Judge lets a strong model score answers or compare them in pairs: cheap and scalable, but prone to position bias, length bias and misjudged math. Covers the judging modes, bias mitigation, measuring agreement with humans, and Bradley–Terry ranking.

Intermediate 21 min read

Building Evaluation Sets: Question Sources, Label Quality and Item Information

An evaluation set is only as good as its coverage, labels, discrimination and freshness. This page designs one from the decision it supports, then simulates how label errors lower scores and inflate sample sizes, why Cohen's kappa tracks class balance, and which items separate models.

Intermediate 42 min read

Hallucination and Calibration: Why Models Sound Sure and Are Wrong

Hallucination is fluent output that contradicts the facts or the sources a model was given. This page covers two taxonomies, the floor set by facts seen only once, why binary grading rewards guessing, and three runnable simulations of calibration, temperature scaling and abstaining.

Intermediate 38 min read

Blog posts

Does RL expand reasoning capacity? Evidence from pass@k

Using large-k pass@k, this study finds RL improves small-k success while base models often match or exceed coverage at large k, suggesting RL redistributes existing ability more than creating new reasoning.

Paper notes arXiv 2025

Mixtral of Experts: An Open MoE That Matches Llama 2 70B with 13B Active Parameters

Mixtral 8x7B keeps Mistral 7B's architecture but replaces every feed-forward layer with 8 experts and routes each token to 2: about 47B parameters in total, about 13B used per token. This post covers the architecture, the benchmark evidence, the routing analysis and which claims deserve a discount.

Paper notes arXiv 2024

GAIA: A benchmark for tool-using general AI assistants

GAIA contains 466 questions with verifiable answers that require reasoning, web browsing, multimodal understanding and tools. It measures complete task execution rather than isolated knowledge recall.

Paper notes ICLR 2024 2023

Lost in the Middle: Models Use the Start and End of a Long Context Best

Liu et al. (2023) moved the answer around inside long inputs and found a U-shaped curve: accuracy is highest at the start or end and lowest in the middle. With 20 documents GPT-3.5-Turbo loses 22.0 points between its best and worst position. This post recomputes the results and discusses RAG.

Paper notes TACL 2023

QLoRA: Fine-Tuning a 65B Model on One 48 GB GPU by Quantizing the Base to 4 Bits

QLoRA (Dettmers et al., 2023) quantizes a frozen base model to 4-bit NormalFloat and trains LoRA adapters on top, so a 65B model fine-tunes on one 48 GB GPU. This breakdown explains NF4, double quantization and paged optimizers, rebuilds NF4 in code and tests 4-bit data types on Qwen2.5.

Paper notes arXiv 2023

Decision Transformer: Reinforcement Learning as Conditional Sequence Modeling

Decision Transformer (Chen et al., 2021) recasts offline RL as conditional sequence modeling: a causal GPT trained on return, state and action tokens, prompted with a target return. We recompute its tables, rerun its shortest-path toy, and show where return conditioning fails.

Paper notes NeurIPS 2021 2021

Topics