TOOL WIKI · EVALUATION & TESTING
Inspect AI
Provides a framework for defining and executing evaluations of AI systems.
Jump to a section 10 sections
EXAMPLE USE CASE
Benchmark a model on two explicit status contracts
A developer needs repeatable cases and explicit grading before changing a prompt, model or agent implementation.
- Input
- Two samples with known/missing orders, a generate solver and exact scorer.
- Expected output
- Evaluation logs and per-sample exact-match results.
- Success check: Two samples produce an evaluation log and exact-match scores.
- Try a failure: A fluent sentence instead of the required single status should fail this exact-output contract.
Example scope: Actual model evaluation; exact matching suits the small status output, not general answer prose.
Official reference · Inspect AI
Keep fixtures and expected outcomes separate from candidate inputs.
executeTo 02 · Candidate systemRecord code, prompts, model settings, and tool schemas for this run.
observationsTo 03 · Inspect AIBuilding structured evaluations with task definitions and scoring. Use controlled environments and bounded tool permissions in evaluation runs.
resultsTo 04 · Failure examplesInspect the failing task and trace rather than relying only on an aggregate score.
reviewTo 05 · Release gateBlock a release on critical permission failures and unacceptable task regression.
Result or stopping pointConvert confirmed production failures into reviewed, versioned fixtures.
Building structured evaluations with task definitions and scoring. Use controlled environments and bounded tool permissions in evaluation runs.
When to consider it
- Building structured evaluations with task definitions and scoring.
A design decision to make
- Use controlled environments and bounded tool permissions in evaluation runs.
Prerequisites and setup
- Use synthetic fixtures and a dedicated evaluation environment. Model-based judges and managed reporting can incur usage.
python3 -m venv .venv
source .venv/bin/activate
pip install inspect-ai
export OPENAI_API_KEY="YOUR_KEY"Try a small integration
orders.py
from inspect_ai import Task, task
from inspect_ai.dataset import Sample
from inspect_ai.solver import generate
from inspect_ai.scorer import exact
@task
def orders():
return Task(dataset=[
Sample(input="Fixture: A104=packed. Reply with only A104's status.", target="packed"),
Sample(input="Fixture: A104=packed. Reply not_found if A999 is absent. One token only.", target="not_found"),
], solver=generate(), scorer=exact())Run and check the result
inspect eval orders.py --model openai/YOUR_ENABLED_MODEL --limit 2- Two samples produce an evaluation log and exact-match scores.
- Exact match is appropriate for the small status contract; it is too strict for general prose quality.
Common failures
- A passing score on one fixture is not evidence of general reliability; include missing-data, permission and adversarial cases.
- A judge timeout or parser error must be reported separately from a low-quality answer.
Production decisions
- Version the dataset, prompt, model, tool schema and scorer together; keep a held-out set separate from tuning examples.
- Gate releases on critical failures as well as aggregate quality, latency and cost. Review false positives and grader disagreement.
Keep exploring
Explore the same layer
Compare candidates on your own workload. This entry describes a product’s role; it is not a claim that products in the category are interchangeable.