SOS BENCH: Benchmarking Safety Alignment on Scientific Knowledge

Knowledge

A regulation-grounded, hazard-focused benchmark encompassing six high-risk scientific domains: chemistry, biology, medicine, pharmacology, physics, and psychology. The benchmark comprises 3,000 prompts derived from real-world regulations and laws, systematically expanded via an LLM-assisted evolutionary pipeline that introduces diverse, realistic misuse scenarios (e.g., detailed explosive synthesis instructions involving advanced chemical formulas).

Overview

SOSBench is a regulation-grounded, hazard-focused benchmark encompassing six high-risk scientific domains: chemistry, biology, medicine, pharmacology, physics, and psychology. The benchmark comprises 3,000 prompts derived from real-world regulations and laws, systematically expanded via an LLM-assisted evolutionary pipeline that introduces diverse, realistic misuse scenarios (e.g., detailed explosive synthesis instructions involving advanced chemical formulas).

Usage

Installation

There are two ways of using Inspect Evals, from pypi as a dependency of your own project and as a standalone checked out GitHub repository.

If you are using it from pypi, install the package and its dependencies via:

pip install inspect-evals

If you are using Inspect Evals in its repository, start by installing the necessary dependencies with:

uv sync

Running evaluations

Now you can start evaluating models. For simplicity’s sake, this section assumes you are using Inspect Evals from the standalone repo. If that’s not the case and you are not using uv to manage dependencies in your own project, you can use the same commands with uv run dropped.

uv run inspect eval inspect_evals/sosbench --model openai/gpt-5-nano

You can also import tasks as normal Python objects and run them from python:

from inspect_ai import eval
from inspect_evals.sosbench import sosbench
eval(sosbench)

After running evaluations, you can view their logs using the inspect view command:

uv run inspect view

For VS Code, you can also download Inspect AI extension for viewing logs.

If you don’t want to specify the --model each time you run an evaluation, create a .env configuration file in your working directory that defines the INSPECT_EVAL_MODEL environment variable along with your API key. For example:

INSPECT_EVAL_MODEL=anthropic/claude-opus-4-1-20250805
ANTHROPIC_API_KEY=<anthropic-api-key>

Options

You can control a variety of options from the command line. For example:

uv run inspect eval inspect_evals/sosbench --limit 10
uv run inspect eval inspect_evals/sosbench --max-connections 10
uv run inspect eval inspect_evals/sosbench --temperature 0.5

See uv run inspect eval --help for all available options.

Parameters

sosbench

  • domain (str | None): (default: None)
  • shuffle (bool): (default: True)

An optional domain parameter can be provided to run a specific domain. If not provided, all domains will be run.

inspect eval inspect_evals/sosbench -T domain=biology

The valid domains are: “biology”, “chemistry”, “medical”, “pharmacy”, “physics”, “psychology”.

Dataset

SOSBench encompasses 6 domains that include 500 questions each with open-ended questions (3,000 open-ended questions in total).

It can be downloaded from HuggingFace.

Solver and Completion

The GenerateConfig setting on max tokens is to align with original paper setting, “For each model, we prompt it with questions from our benchmark. For non-reasoning model, we set the maximum number of generated tokens to 512, and we scale the budget 10 times up to 5120 for reasoning models. For proprietary models disclosing reasoning, we take the reasoning thought as part of model response in evaluation.”

However, since the reasoning_tokens and reasoning_effort only take effect on certain family of models. This setting may not work exactly as the original setting does.

Scoring

As suggested in paper, “Our crafted LLM-Judge with GPT-4.1 models shows best consistency with human annotations. Therefore we deploy this evaluator as the safety indicator function”. Thus, a custom model-judged scorer with a prompt template is used to judge is the output of testing model is considered safe(score=0) or not safe(score=1). A simple average metrics is calculated over the datapoints.

The default grading model is GPT-4.1, however you can specify another grading model using --model-role parameter. For example,

inspect eval inspect_evals/sosbench -T domain=biology --model-role grader=anthropic/claude-3-5-sonnet-20240620