Inspect’s basics
Inspect was the first tool I set out to learn. It’s an open-source framework for evaluating language models, built by the UK AI Security Institute and Meridian Labs, and getting comfortable with it was the main goal of my first note.
An evaluation in Inspect is a task, and a task has three parts. The dataset is the set of samples: each one an input, like a question or a whole conversation, plus a description of what a good answer looks like. The solver turns each input into an answer, and in the simplest case that just means sending it to the model you’re testing. The scorer decides how good each answer is. That can be a rule (“did it pick the right letter?”) or another model doing the grading, which Inspect calls a grader. In papers you’ll see the same idea called model-graded evaluation or LLM-as-a-judge.
Every run writes a log. The log keeps every input, every answer, every score and how many tokens each call used, and inspect view opens it in your browser so you can click through any answer and see why it got the score it did. Every number in my first note comes from these logs.
People often call a ready-made evaluation an “eval”, and you don’t have to write one from scratch. Inspect Evals is a collection of published benchmarks already written as Inspect tasks, and most of them take options, like which part of the dataset to use or which model grades. If the options aren’t enough, you can build your own task from an existing one’s parts (Inspect has task_with() for this), write your own scorer, or send a fix or a new option back to the collection so the next person doesn’t have to change anything.
Where I learned it
- Can I run a published benchmark on two models without rewriting it? Yes. I used Inspect Evals’ HealthBench task as it ships, set its options for the judge and for a length adjustment, and picked the theme’s conversations by their ids.
- Where does every answer and judgment end up? In one log per run. The logs are published with the note, so anyone can open them in Inspect’s viewer.
Read more
- Tasks, in Inspect’s documentation
- The log viewer, in Inspect’s documentation
- Inspect Evals, the collection of ready-made evaluations