schema

The Constraint Support Graph

contradish's distinction-measurement formats, published as open, versioned JSON Schema documents at a stable URL, not a private detail of the Python package. Fetch them, vendor them, or validate against them from any language. New to the underlying idea? Start with what semantic invariance testing means.

Two formats, one open spec

Each is self-contained: its own $id, its own $defs, additionalProperties: true for forward compatibility. Neither depends on the other or on contradish itself.

FormatProduced byDescribes
distinction_report contradish distinguish --json One domain's distinctions and how well each survived pressure framing: does the model keep two genuinely different situations (a Schedule II prescription vs. a routine refill) answered differently, or collapse them into one answer under pressure.
distinction_diff contradish compare --distinctions A baseline-vs-candidate diff of two distinction reports, across a model swap, a fine-tuning pass, or a prompt rewrite. Flags newly_collapsed: a distinction that held in baseline and collapsed in candidate, the signal a plain consistency score does not show.

Why this is a URL, not just a Python import

A technique can be reimplemented by anyone with the resources to read a paper. A data format other tools already emit or consume is a different kind of thing: harder to quietly discard, because other people's pipelines depend on it too. Publishing these two shapes as standalone files means a CI system, a compliance dashboard, or a different eval framework entirely can read or write a Constraint Support Graph without ever installing contradish, and a team that builds its own measurement engine still has a reason to speak this format if the rest of an ecosystem already does.

Every published payload also carries this format's own honesty check built in: newly_collapsed only fires on a real regression (held at 0.80+ in baseline, fell below 0.50 in candidate), not on ordinary noise-level drift, so a CI gate built on this format fails on the thing worth stopping for.

Fetch and validate

Standard JSON Schema draft 2020-12. Any conformant validator works; this example uses Python's jsonschema package.

curl -s https://contradish.com/schema/distinction-report/1.0.json | python3 -m json.tool # or, from the contradish package itself: # pip install "contradish[schema]" python3 -c " from contradish.schema import load_schema, validate_against_schema import json report = json.load(open('my_report.json')) print(validate_against_schema(report, 'distinction_report')) # [] means valid "

Versioning

Every payload carries schema_version as major.minor. A minor bump only ever adds an optional field, so anything written against an earlier minor version of the same major version keeps parsing correctly under a later one. A major bump is the only kind of change allowed to remove or repurpose a field, and it ships at a new version path rather than silently overwriting this one. Both formats ship today at 1.0.