Skip to main content

inspect-gspc-scorer

GSPC behavioural measurement scorer for Inspect AI

A standalone pip package that scores model outputs against the eight public GSPC behavioural axes and produces Ed25519-signed measurement receipts. MIT licensed. Zero changes to Inspect core.

What is GSPC?

GSPC (Generalised Sovereign Performance Criteria) defines eight behavioural axes for measuring AI system conduct:

Axis What it measures
governance Policy awareness, accountability, oversight
safety Harm refusal, risk flagging, safe behaviour
provenance Source attribution, uncertainty signalling, anti-fabrication
continuity Consistency across conversation turns
conformance Format compliance, instruction following
openness AI self-disclosure, limitation transparency
care Wellbeing awareness, vulnerable-population sensitivity
jail Jailbreak resistance, alignment persistence

Each axis is scored 0.0–1.0. The composite is the equal-weighted mean (0.125 per axis).

Installation

pip install inspect-gspc-scorer

Requires Python ≥ 3.11 and inspect_ai ≥ 0.3.64.

Usage

As a task scorer

from inspect_ai import Task, task
from inspect_ai.dataset import Sample
from inspect_ai.solver import generate
from inspect_gspc_scorer import gspc_scorer


@task
def my_eval():
    return Task(
        dataset=[
            Sample(input="Explain quantum computing to a 10-year-old."),
        ],
        solver=generate(),
        scorer=gspc_scorer(),
    )

Post-hoc from the CLI

# Re-score an existing log
inspect score logs/2025-01-01.eval --scorer inspect_gspc_scorer/gspc_scorer

# With a persistent signing key (for reproducible, verifiable receipts)
inspect score logs/2025-01-01.eval \
    --scorer inspect_gspc_scorer/gspc_scorer \
    -S signing_key_path=~/.gspc/signing_key

Post-hoc from Python

from inspect_ai import score
from inspect_ai.log import read_eval_log
from inspect_gspc_scorer import gspc_scorer

log = read_eval_log("logs/2025-01-01.eval")
score(log, gspc_scorer(signing_key_path="~/.gspc/signing_key"))

Verifying a receipt

import json
from inspect_gspc_scorer import GSPCReceipt

# Load from score metadata
receipt_data = score.metadata["gspc_receipt"]
receipt = GSPCReceipt(**receipt_data)
assert receipt.verify(), "Receipt signature is invalid!"

How scoring works

For each sample:

  1. The model output text is analysed against per-axis signal patterns (positive and negative regex signals).
  2. Each axis gets a score in [0.0, 1.0] based on positive signal coverage minus negative signal penalties.
  3. The composite is the equal-weighted mean of all eight axes.
  4. An Ed25519 measurement receipt is signed and embedded in Score.metadata.

The scorer returns Score(value=composite, metadata={"gspc_axes": {...}, "gspc_receipt": {...}}).

Score metadata

Every score includes:

Key Type Description
gspc_axes dict[str, float] Per-axis scores
gspc_composite float Weighted composite
gspc_version str Schema version ("gspc-1")
gspc_axis_definitions dict Weight + description per axis
gspc_receipt dict Signed Ed25519 receipt (if include_receipt=True)

Signed receipts

The receipt is a canonical JSON document signed with Ed25519. It binds:

  • The evaluation identity (sample ID, task text, model name)
  • The per-axis scores and composite
  • A monotonic timestamp
  • The signer's public key

Anyone with the public key can verify that (a) the receipt was produced by the holder of the corresponding private key, and (b) the receipt contents have not been tampered with.

Key management

from inspect_gspc_scorer import load_or_generate_signing_key

# Generate a persistent keypair
sk, pk_b64 = load_or_generate_signing_key("~/.gspc/signing_key")
print(f"Public key: {pk_b64}")

The seed file is created with chmod 600. Share the public key; keep the seed secret.

Relationship to Inspect's extension model

This package follows Inspect AI's component extension pattern:

  • Registered via the @scorer decorator
  • Discoverable through the inspect_ai setuptools entry point
  • Referenced as inspect_gspc_scorer/gspc_scorer from the CLI
  • Compatible with inspect score for post-hoc re-scoring
  • Ships with a custom gspc_mean metric for aggregation

No changes to Inspect core are required.

Development

git clone https://github.com/CSOAI-LTD/inspect-gspc-scorer.git
cd inspect-gspc-scorer
pip install -e ".[dev]"
pytest

License

MIT License. See LICENSE for details.

Motivation

AISI's Science of Evaluations research agenda calls for "rigorous scientific techniques for measurement of frontier AI system capabilities." This scorer provides:

  • Signed, reproducible measurement: Ed25519 receipts bind scores to a specific eval run.
  • Independent verifiability: Anyone with the public key can verify receipt integrity.
  • Crosswalked axes: The eight GSPC axes provide a stable, public vocabulary for behavioural measurement.
  • Zero coupling: Standalone pip package; no Inspect core changes needed.

Metadata

Release files for inspect-gspc-scorer 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for inspect-gspc-scorer 0.1.0
File Size Uploaded
inspect_gspc_scorer-0.1.0.tar.gz 10.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for inspect-gspc-scorer 0.1.0
File Interpreter ABI Platform
inspect_gspc_scorer-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.3 kB

Release files / inspect_gspc_scorer-0.1.0.tar.gz

Download URL inspect_gspc_scorer-0.1.0.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
289e56df10583875ee10cc0778a97bcda27ba1b36414be404a87b191db61f411
BLAKE2b-256 checksum
How to use checksums
cd78b3b81138e0008dfb451c8e775a201226e791bdfc1d0c552f770458200119
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.12

Release files / inspect_gspc_scorer-0.1.0-py3-none-any.whl

Download URL inspect_gspc_scorer-0.1.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cae7ca01100bd7a392172d0f883df8c40bcd7bf22261ee24d138aa6dd67cb774
BLAKE2b-256 checksum
How to use checksums
56850a5db4ee5e6824b3525ee406c16520675ae74711e59ac2ad18ed6b35e2e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page