Trialmark
Model acceptance tests for language models. Test models on your own work, decide in advance what result is good enough, and keep a record that anyone can rerun and check.
Choosing a language model is a trade between accuracy, cost and speed. Trialmark makes that choice systematic:
- Your own test set. Cases from your own work, each with a reference answer written by a person and tagged by kind, such as "factual" or "multi-part". The set is hashed, so a later run can prove it used exactly the same cases.
- A pass mark set before the run. For example: "choose the cheapest model within 3 points of the best on correctness, as long as at least 95% of its answers are grounded". The rule is stored with its hash and the time it was set, so it cannot be quietly changed after the results are in.
- Repeats, with the range shown. Models do not give the same answer every time. Each model runs several times, and the report shows the lowest and highest result so that a difference inside the range is read as no difference.
- A report by kind of case. A small model may be as good as a large one on single facts and worse on multi-part questions. The breakdown by tag shows where.
- A run record and a release gate. Every run writes one JSON file with the test set's hash,
the models and their settings, the judge, the pass mark and every result.
trialmark gateexits with 0 or 1, so a pipeline can refuse a model change that fails the pass mark.
Trialmark runs on your own machines. Your test sets, reference answers and records stay with you.
Where it comes from
Trialmark was spun out of the model benchmark in Forge, a governed layer through which organisations delegate work to AI. That benchmark compares models on a fixed set of business-document questions, through Forge's own answer path, with three repeats and accuracy, cost and speed side by side. Trialmark makes the same kind of test available to any developer or team, with or without Forge.
Status
Trialmark is at an early stage. Version 0.1 provides the formats and the decision:
| Built in 0.1 | Planned |
|---|---|
| The test set format, with hashing and tags | Runners that call models directly (Anthropic, OpenAI and others) |
| The pass mark and the decision rule | A reference-answer judge, which grades an answer as correct, partly correct or incorrect and checks that it is grounded |
| The run record, with the pass mark's hash | A field-by-field scorer for extraction and classification |
| The report, with ranges and the breakdown by tag | A runner that tests a model inside Forge, with Forge's retrieval and rules applied |
trialmark gate for pipelines |
Logging runs to MLflow |
In 0.1 you produce the results yourself, with your own code, and Trialmark records, reports and decides on them.
Install
pip install trialmark
Python 3.10 or later. The core has no dependencies.
Try it
The examples folder holds a five-question test set and an illustrative run of three made-up
models. The scores in it are invented to show the format; they are not measurements of any real
model.
trialmark validate examples/testset.json
trialmark report examples/run-record.json --by-tag
trialmark gate examples/run-record.json --model medium-model --test-set examples/testset.json
Use it from Python
from trialmark import ModelEntry, PassMark, Result, RunRecord, load_test_set, text_report
test_set = load_test_set("my-testset.json")
# Fix the decision before any model runs.
pass_mark = PassMark(metric="correct", tolerance_points=3, floors={"grounded": 0.95}, choose="cheapest")
record = RunRecord.start(
test_set,
pass_mark,
[ModelEntry(id="model-a", provider="provider-x"), ModelEntry(id="model-b", provider="provider-y")],
repeats=3,
judge={"model": "judge-model", "prompt_version": "1"},
)
for repeat in range(3):
for model in ("model-a", "model-b"):
for case in test_set.cases:
answer, cost, ms = call_your_model(model, case.input) # your code
score = grade(answer, case.reference) # your code: 0, 0.5 or 1
record.add(Result(
model=model, repeat=repeat, case_id=case.id, tags=list(case.tags),
metrics={"correct": score, "grounded": 1.0},
output=answer, cost_usd=cost, latency_ms=ms,
))
record.save("run-record.json")
print(text_report(record, by_tag=True))
Formats
Test set
{
"name": "contract-questions",
"version": "2026-11-05",
"cases": [
{ "id": "q1", "input": "What is the notice period?", "reference": "Sixty days' written notice.", "tags": ["factual"] }
]
}
The hash covers the cases (their ids, inputs, references and tags), not the name or version.
Pass mark
| Field | Meaning |
|---|---|
metric |
The score the decision rests on, such as correct |
tolerance_points |
How many percentage points below the best model still passes |
floors |
Minimum mean scores on other metrics, such as {"grounded": 0.95} |
choose |
Which passing model to choose: cheapest, fastest or best |
Metrics are whatever your scorer produces, each between 0 and 1. A model's score on a metric is the mean within each repeat; the report shows the mean of those and their range.
Licence
Apache-2.0. See LICENSE.
Metadata
Release files for trialmark 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| trialmark-0.1.0.tar.gz | 17.0 kB | With provenance | Details for trialmark-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trialmark-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for trialmark-0.1.0-py3-none-any.whl |
Total release size: 33.2 kB
Release files / trialmark-0.1.0.tar.gz
| Download URL | trialmark-0.1.0.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53f2122b8ba5f1f4befcfe556c428e53544c6dcc66620b0d799f4567e0f54a46
|
|
BLAKE2b-256 checksum How to use checksums |
dd3159ad6d23d602dc5613623ef4bcc6c1e703f5cd3be9dec19c5129b1e7a05f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / trialmark-0.1.0-py3-none-any.whl
| Download URL | trialmark-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
997286d6efdb3f00e1e673f136780ac4e9bb8b473cca82e1d3de603da66fd2cc
|
|
BLAKE2b-256 checksum How to use checksums |
a6b4fa32606306005c0c673c652e84434e297de312c45ff4ec1702c287f71e34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logSecurity for trialmark 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for trialmark-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.