Inspect AI Adapter
The Inspect AI adapter integrates UK AISI Inspect AI with the eval-hub evaluation service using the evalhub-sdk framework adapter pattern. It exposes Meridian Labs alignment-auditing tools—Petri, Bloom, and Dish—alongside standard inspect-evals benchmarks for safety, coding, mathematics, knowledge, and agent evaluation.
Overview
Section titled “Overview”Inspect AI is an evaluation framework for language models. This adapter wraps it as an EvalHub provider and routes each job by benchmark_id prefix into one of three execution modes:
- Petri (
inspect/petri-*) — auditor / target / judge pipeline; 170+ seeds across 40 alignment-behaviour tag categories; 38 judge dimensions scored 1–10 - Bloom (
inspect/bloom-*) — generates evaluation scenarios from high-level behaviour descriptions (bloom init→bloom scenarios→inspect eval) - Standard (everything else) — inspect-evals and custom Inspect tasks via a single
--modelflag
Dish (research-preview scaffold testing) is available through task_args pass-through.
Key Features
Section titled “Key Features”- Multi-role model routing: Target, auditor, judge, scenarios, and realism roles can each use a different OpenAI-compatible or Anthropic endpoint
- Alignment auditing: Petri seed libraries and Bloom scenario generation with 38-dimension judge scoring
- Broad benchmark coverage: 75 benchmarks spanning Petri audits, Bloom suites, and inspect-evals (safety, cyber, coding, math, knowledge, agents)
- Custom tasks:
inspect/customruns any Inspect AI task via thetaskparameter - Kubernetes-ready: Local sandbox by default in pods; optional HuggingFace token mount for gated datasets
Supported Modes
Section titled “Supported Modes”| Mode | Benchmark prefix | Task | Models |
|---|---|---|---|
| Petri | inspect/petri-* | inspect_petri/audit | Target + auditor + judge (optional realism) |
| Bloom | inspect/bloom-* | petri_bloom/bloom_audit | Target + auditor + judge (+ scenarios) |
| Standard | other inspect/* | inspect-evals or custom | Single model via --model |
Architecture
Section titled “Architecture”The adapter follows the eval-hub framework adapter pattern:
Workflow:
- JobSpec loading: Job configuration auto-loaded from
/meta/job.json(orEVALHUB_JOB_SPEC_PATHin local mode) - Mode detection:
benchmark_idprefix selects Petri, Bloom, or Standard execution - Model / credential routing: Builds role model specs from
model.url, global env vars, and per-role overrides - Bloom prepare (Bloom only): Runs
bloom initandbloom scenariosunless a pre-builtbehavior_diris supplied - Inspect execution: Invokes
inspect evalwith the resolved task, models, and parameters - Result mapping: Parses Inspect logs into
EvaluationResultmetrics and an aggregate score - Callback-based communication: Progress and results are reported to the eval-hub sidecar
- Artifact persistence: Logs and summaries can be pushed as OCI artifacts
Quick Start
Section titled “Quick Start”Submit a Petri sycophancy audit using the EvalHub SDK:
# Option A: config file (recommended)cat > inspect-petri.yaml <<'EOF'name: inspect-petri-sycophancy-001model: url: http://vllm:8080/v1 name: ibm-granite/granite-3.3-8b-instruct auth: secret_ref: maas-creds # optional; omit for unauthenticated endpointsbenchmarks: - id: inspect/petri-sycophancy provider_id: inspect parameters: auditor_model: claude-sonnet-4-6 judge_model: claude-opus-4-7 max_samples: 5 max_turns: 20EOF
evalhub eval run --config inspect-petri.yaml --wait
# Option B: inline flagsevalhub eval run \ --name inspect-petri-sycophancy-001 \ --model-url "http://vllm:8080/v1" \ --model-name "ibm-granite/granite-3.3-8b-instruct" \ --model-auth-secret maas-creds \ --provider inspect \ --benchmark inspect/petri-sycophancy \ --param auditor_model=claude-sonnet-4-6 \ --param judge_model=claude-opus-4-7 \ --param max_samples=5 \ --param max_turns=20 \ --waitimport osfrom evalhub import SyncEvalHubClientfrom evalhub.models.api import ModelConfig, BenchmarkConfig, JobSubmissionRequest
client = SyncEvalHubClient(base_url=os.environ.get("EVALHUB_URL", "http://evalhub-service:8080"))
job = client.jobs.submit( JobSubmissionRequest( name="inspect-petri-sycophancy-001", model=ModelConfig( url="http://vllm:8080/v1", name="ibm-granite/granite-3.3-8b-instruct", auth={"secret_ref": "maas-creds"}, # optional ), benchmarks=[ BenchmarkConfig( id="inspect/petri-sycophancy", provider_id="inspect", parameters={ "auditor_model": "claude-sonnet-4-6", "judge_model": "claude-opus-4-7", "max_samples": 5, "max_turns": 20, }, ) ], ))
print(f"Job submitted: {job.id}")curl -X POST "$EVALHUB_URL/api/v1/evaluations/jobs" \ -H "Authorization: Bearer $token" \ -H "Content-Type: application/json" \ -d '{ "name": "inspect-petri-sycophancy-001", "model": { "url": "http://vllm:8080/v1", "name": "ibm-granite/granite-3.3-8b-instruct", "auth": { "secret_ref": "maas-creds" } }, "benchmarks": [ { "id": "inspect/petri-sycophancy", "provider_id": "inspect", "parameters": { "auditor_model": "claude-sonnet-4-6", "judge_model": "claude-opus-4-7", "max_samples": 5, "max_turns": 20 } } ] }'See Configuration for the full parameter reference, Benchmarks for the catalog, and Examples for multi-provider deployment scenarios.
Provider Details
Section titled “Provider Details”| Field | Value |
|---|---|
| Provider ID | inspect |
| Container Image | quay.io/evalhub/community-inspect:latest |
Source
Section titled “Source”- Adapter: eval-hub-contrib/adapters/inspect
- Upstream: UK AISI Inspect AI
Container Image
Section titled “Container Image”The adapter is distributed as a pre-built container image. Pull it for use with EvalHub or local testing:
podman pull quay.io/evalhub/community-inspect:latest
# Run locally with a mounted job specpodman run \ -e EVALHUB_MODE=local \ -e EVALHUB_JOB_SPEC_PATH=/meta/job.json \ -e ANTHROPIC_API_KEY=your-key \ -v $(pwd)/job.json:/meta/job.json:ro \ quay.io/evalhub/community-inspect:latestBuilding from Source
Section titled “Building from Source”To build the image from the eval-hub-contrib repository:
# From the eval-hub-contrib repo rootmake image-inspect
# Run adapter testsmake test-inspect
# Push to a registrymake push-inspect REGISTRY=quay.io/your-org VERSION=v1.0.0To run the adapter directly without a container:
cd adapters/inspectpython3 -m venv .venv && .venv/bin/pip install -r requirements.txt
export EVALHUB_MODE=localexport EVALHUB_JOB_SPEC_PATH=meta/job.json# Set OPENAI_* and/or ANTHROPIC_* credentials as needed
python main.py