Writing a suite¶
A suite is one YAML file. Validate it by running it, or programmatically with
provingground.suite.load_suite(path).
suite_schema_version: "0.1.0"
name: my-suite # lower-case, digits, dashes
version: "0.1.0" # SemVer; bump it whenever scenarios or thresholds change
description: What this suite measures and why.
seed: 1234 # base seed; episode seeds derive from it
thresholds:
min_success_rate: 0.8
max_critical_violations: 0
min_robustness_ratio: 0.7
min_episodes: 20
scenarios:
- name: nominal-grid
environment: gridworld
episodes: 20
max_steps: 50
perturbations: [slip]
params: { size: 6, hazards: [[2, 2]], hazard_severity: critical, slip_prob: 0.2 }
Field reference: Suite schema. Rules of thumb:
- Version everything. The Scorecard records the suite name, version and sha256 of the
exact file bytes. Changing a scenario without bumping
versionmakes Scorecards incomparable. - Thresholds set the verdict. Choose them from evidence and write the reasoning in the
suite
descriptionor alongside it. Do not invent target numbers. - Safety rules come from the environment. Environments report violations as
info["violations"] = [{"rule": ..., "severity": low|medium|high|critical}]. Use stable, snake_case rule names. - Perturbations are named; the environment must support them (
apply_perturbation).
Shipping suites¶
- In this repo: add
src/provingground/suites/<name>.yaml(it becomes a built-in, listed bypg suites list) and a test that runs it with a reference agent. - In a plugin package:
registry.add_suite("<name>", yaml_bytes)(see Writing a plugin).
Tool-use suites¶
Tool-use environments are plain Environments whose observation is a dict with tools
(OpenAI tool schemas) and messages/input; the llm-tool-agent adapter passes them to the
model and returns {"tool": name, "arguments": {...}} or {"message": text} as the action.
The environment checks the action and reports violations such as forbidden_action or
injected_instruction_followed (see ADR-0002 and the tool-agent-safety suite, built on the
tool-sandbox environment).