PRML pre-registration integration for Giskard scenario results
Project description
falsify-giskard
PRML pre-registration for Giskard scenario results.
Commit a Giskard eval claim (a metric and threshold) to a SHA-256 before the run, then verify the realised
ScenarioResultagainst it.
Why
Giskard runs a scenario of checks and reports pass/fail plus per-check metrics. But the report records what happened, not what was promised before the run. Pre-registering the claim means quietly relaxing a threshold or swapping a model after seeing results breaks the hash, so a passing scenario becomes tamper-evident.
This is the Giskard counterpart to falsify-inspect and uses the same PRML v0.1 manifest format.
Install
pip install falsify-giskard
Quickstart
from falsify_giskard import preregister, verify_scenario_result
# 1. Before the run — commit the claim (real PRML v0.1 manifest)
h, manifest = preregister(
metric="pass_rate", # or the name of a Giskard Metric (e.g. "groundedness")
threshold=0.9,
threshold_direction=">=", # PRML `comparator`
dataset="support-qa-v1", # PRML `dataset.id`
dataset_hash="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", # PRML `dataset.hash`, 64 lowercase hex
seed=42,
producer_id="acme/eval-bot", # PRML `producer.id`
giskard_scenario="grounded-answers",
output_path="grounded.prml.yaml",
)
print(h) # 64-char canonical PRML SHA-256
# 2. Run your Giskard scenario as usual
result = await scenario.run()
# 3. After the run — verify (pass the lock-time hash for tamper-evidence)
verdict = verify_scenario_result(result, "grounded.prml.yaml", expected_hash=h)
assert verdict["status"] == "PASS" # PASS / FAIL / TAMPERED
Metrics
metric="pass_rate"verifies the fraction of (non-skipped) checks that passed.metric="<name>"verifies the value of a GiskardMetricwith thatname(for example asemantic_similarityorgroundednessscore).
Verdicts
- PASS — the manifest hash matches and the observed metric satisfies the committed threshold.
- FAIL — the hash matches but the observed metric misses the threshold.
- TAMPERED — the manifest no longer matches the lock-time hash passed as
expected_hash(it was altered after commit). Withoutexpected_hash, the hash is taken from the file itself, so only PASS/FAIL is evaluated — passexpected_hashfor real tamper-evidence.
For durable tamper-evidence, commit the returned hash to git or to the public registry at registry.falsify.dev right after pre-registration, so the claim is anchored somewhere immutable.
License
MIT. The PRML specification is CC BY 4.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file falsify_giskard-0.2.0.tar.gz.
File metadata
- Download URL: falsify_giskard-0.2.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99cc48f278e8853c76853da0de2e69f3f91950b87732943bea0ca15965dce970
|
|
| MD5 |
176bf728718902ed4fe2f978b80b6af4
|
|
| BLAKE2b-256 |
b3a5ce555191277208a1c7fdcb9f3bf223ecdceb7c8e1604315822c2ab8e6862
|
Provenance
The following attestation bundles were made for falsify_giskard-0.2.0.tar.gz:
Publisher:
publish.yml on studio-11-co/falsify-giskard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
falsify_giskard-0.2.0.tar.gz -
Subject digest:
99cc48f278e8853c76853da0de2e69f3f91950b87732943bea0ca15965dce970 - Sigstore transparency entry: 1854637547
- Sigstore integration time:
-
Permalink:
studio-11-co/falsify-giskard@59ebbd5b1584b1913c479463681609359227de47 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/studio-11-co
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@59ebbd5b1584b1913c479463681609359227de47 -
Trigger Event:
push
-
Statement type:
File details
Details for the file falsify_giskard-0.2.0-py3-none-any.whl.
File metadata
- Download URL: falsify_giskard-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
987bcccba5bc8e50e6ac2adc2eae521de803b3b7bf5820a59edda33ed283720f
|
|
| MD5 |
617d769bb38564db33855975ddb08259
|
|
| BLAKE2b-256 |
1c9b2d6db691b628ead1344f5bb489b2d4534a4195074de072420c7f2a86f300
|
Provenance
The following attestation bundles were made for falsify_giskard-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on studio-11-co/falsify-giskard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
falsify_giskard-0.2.0-py3-none-any.whl -
Subject digest:
987bcccba5bc8e50e6ac2adc2eae521de803b3b7bf5820a59edda33ed283720f - Sigstore transparency entry: 1854637554
- Sigstore integration time:
-
Permalink:
studio-11-co/falsify-giskard@59ebbd5b1584b1913c479463681609359227de47 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/studio-11-co
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@59ebbd5b1584b1913c479463681609359227de47 -
Trigger Event:
push
-
Statement type: