TOOL WIKI · EVALUATION & TESTING

Inspect AI

Provides a framework for defining and executing evaluations of AI systems.

Download example files Code + setup + checks in a ZIP
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

WHAT IT ISEvaluation framework
WHERE IT FITSEvaluation & testing
SEE HOW THE SYSTEM FITS TOGETHERSELECT A COMPONENT
executeobservationsresultsreviewimproveRepresentative datasetNormal + boundary casesCandidate systemPinned configurationInspect AIEvaluation frameworkFailure examplesConcrete observationsRelease gateQuality + cost limitsProduction feedbackNew regression cases
  1. Keep fixtures and expected outcomes separate from candidate inputs.

  2. Record code, prompts, model settings, and tool schemas for this run.

  3. Building structured evaluations with task definitions and scoring. Use controlled environments and bounded tool permissions in evaluation runs.

  4. Inspect the failing task and trace rather than relying only on an aggregate score.

  5. Block a release on critical permission failures and unacceptable task regression.

    Result or stopping point
  6. Convert confirmed production failures into reviewed, versioned fixtures.

Inspect AI

Building structured evaluations with task definitions and scoring. Use controlled environments and bounded tool permissions in evaluation runs.

Follow the arrows, then select a component to inspect its responsibility. On mobile, downward arrows connect the next step; bent arrows identify branches and return paths. Select a destination to jump to that component.

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.
Shell
python3 -m venv .venv
source .venv/bin/activate
pip install inspect-ai
export OPENAI_API_KEY="YOUR_KEY"

Try a small integration

orders.py

Python · 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

Shell
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

AI agent evaluation: frameworks, tools and an exampleAn evaluation gate for agent releases

Explore the same layer

promptfoogarakRagasDeepEval

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.