# Benchmark artifact storage contract The archive now stores five kinds of benchmark artifacts alongside evaluation runs. This is a storage and validation contract. It does not download or audit the complete foundation automatically, run models, fit IRT models, verify a third-party fitting algorithm, or establish that a benchmark is scientifically valid. ```text babel-data/ store.json item-banks// artifact.json manifest.json protocols// artifact.json manifest.json model-panels// artifact.json manifest.json runs// manifest.json raw/ records/ attachments/ calibrations// artifact.json manifest.json releases// artifact.json manifest.json derived/ .locks/ .staging/ ``` Registry directories are optional in existing archives. Registering an artifact creates its directory. An artifact folder contains exactly `artifact.json` and `manifest.json`; extra files and symbolic links are rejected. Keep supporting files as registered run attachments or describe their separately managed provenance explicitly in the artifact. ## Identity and immutability Every input artifact is one UTF-8 JSON object with: ```json {"schema_version": 1, "kind": "item-bank", "id": "foundation-v1"} ``` The five permitted `kind` values are `item-bank`, `protocol`, `model-panel`, `calibration`, and `release`. IDs must be safe portable directory names. The fields below are additional required fields for each kind. Unknown JSON fields are preserved for task-specific metadata; they do not acquire validation rules merely by being present. Non-finite numbers and duplicate object keys are rejected throughout the document. Registration validates the artifact and dependencies, writes canonical JSON, and computes a SHA-256 checksum. The reference returned by registration is: ```json {"kind": "item-bank", "id": "foundation-v1", "sha256": "64 lowercase hexadecimal characters"} ``` This example is schematic; real references contain an actual 64-character checksum. References require exactly these three fields. Loading verifies both the declared checksum and the schema. A registered ID cannot be overwritten; changes require a new version ID and a new checksum. Writes use the same archive lock as evaluation runs and publish an entire staged folder atomically. Checksums detect changes relative to a saved reference. They are not digital signatures or an operating-system prohibition against editing files. Keep the Hugging Face commit ID when sharing an archive snapshot. ## Item bank Required top-level fields: `sources` and `items`, both nonempty arrays. Each source has: | Field | Meaning | | --- | --- | | `id` | Unique source identifier within the bank | | `repo_id` | Upstream repository identifier | | `revision` | Exact intended source version; floating `main`, `master`, `HEAD`, and `latest` are rejected | | `split` | Upstream split used, such as `test` | Use upstream immutable commit SHAs for `revision`. The filesystem records the identifier and rejects common floating aliases, but cannot establish that an arbitrary supplied version string actually identifies immutable upstream data. Each item represents **one question in one language and script**: | Field | Meaning | | --- | --- | | `item_id` | Unique identifier for this translated item | | `global_item_id` | Shared question identity across its translations, scoped by `task` | | `task` | Task identifier, such as `belebele` | | `language` | Explicit language identifier used by this bank | | `script` | Four-letter ISO 15924 form, such as `Latn`; syntax is checked | | `source_id` | An entry in `sources` | | `source_item_id` | Question identifier in the source | | `source_revision` | Must equal the referenced source's revision | | `passage_id` | Shared passage/group identifier, or explicit `null` | | `overlap_group_ids` | Array of known shared-material group IDs, possibly empty | | `choices` | At least two nonempty answer strings, in scoring order | | `answer_index` | Zero-based index of the correct choice | | `excluded` | Boolean exclusion decision | | `exclusion_reason` | Nonempty reason when excluded; otherwise `null` | | `input` | Question/passage/task fields as a JSON object | Duplicate `item_id` values and duplicate `(task, global_item_id, language, script)` identities are rejected. Translations may have different wording and answer order, with their own answer keys. Reusing a global ID across tasks does not make those questions equivalent. An optional `audit` object can retain audit findings and decisions. This system does not infer translation equivalence, detect FLORES overlap, populate passage groups, audit language intersections, or guarantee source counts. The researcher must supply those findings. An empty overlap list means no group was recorded; it is not evidence that overlap was investigated or ruled out. ## Evaluation protocol Required fields: ```json { "task": "globalpiqa", "scoring": { "candidate_mode": "answer_text", "normalization": "byte", "tie_break": "first", "candidate_prefix": " ", "candidate_suffix": "" }, "prompt_template": "{question}", "demonstrations": [], "harness": {"version": "PIN_THE_VERSION_USED", "task_config": {}}, "frozen": true } ``` `candidate_mode` is `answer_text` or `answer_label`. Answer-label scoring requires `scoring.candidate_labels`, an ordered list of unique nonempty labels. Labels are forbidden in answer-text mode. Optional prefix/suffix strings default to empty and represent the exact scored continuation text, including spaces. `normalization` is `none`, `byte`, or `token`; the supported deterministic tie rule selects the first maximum. Exact UTF-8 byte lengths include the prefix and suffix. Development protocols may use `frozen: false`. Strict benchmark runs, calibrations, and releases require frozen protocols. A calibration or release contains exactly one frozen protocol for every included bank task. Label counts must match each included question for their task. The artifact stores the prompt template, demonstrations, and harness settings. It does not execute an lm-eval task or prove that an upstream logger used those settings. Strict records must separately retain exact prompts, candidate text, likelihoods, and lengths. ## Model panel `checkpoints` is a nonempty array. Each entry contains `id`, `model`, `revision`, `family`, `split`, and `is_base: true`. `split` is `calibration`, `development`, or `validation`. Checkpoint IDs and `(model, revision)` pairs must be unique. Every checkpoint in the same declared family must use the same split. This detects inconsistent declared splits. The archive does not independently classify model families or establish whether a checkpoint is a base model; those are explicit research metadata. ## Calibration result A calibration stores externally produced fit results. Required fields: - `item_bank`: exact item-bank reference. - `protocols`: exact frozen protocol references, one per included task. - `model_panel`: exact panel reference. - `method`: `hierarchical-1pl` or `regularized-2pl`. - `synthetic`: explicit boolean. - `reference_scale`: nonempty object describing the scale definition and its anchoring/identification choices. - `item_parameters`: one entry per included translated item, with `item_id` and finite `difficulty`. A 2PL result also requires positive `discrimination`. A supplied 1PL discrimination must equal 1. Shared/global effects and other fitter output may be retained as additional fields. - `abilities`: entries with `checkpoint_id`, `task`, `language`, `script`, and finite `ability`; identities must be known and unique. - `diagnostics` and `validation`: nonempty objects containing the externally produced findings and their interpretation. - `run_refs`: exact evaluation evidence references described below. Parameters and abilities may include nonnegative `standard_error`, ordered `interval: [lower, upper]`, and `interval_level` strictly between 0 and 1 when an interval is supplied. These values are checked for type and range, not statistical coverage. Store fitter settings, regularization, posterior samples or covariance, linking checks, and family-level validation metrics explicitly when available. Each `run_refs` entry is: ```json { "run_id": "checkpoint-a-pilot", "sha256": "SHA-256 of the exact sealed run manifest bytes", "role": "calibration" } ``` `role` is `calibration`, `development`, or `validation` and must equal the checkpoint's family split in the panel. References must identify nonempty, sealed, checksum-valid strict runs using the same bank, panel, and compatible protocols. At least one calibration-role run is required. Only calibration-role runs are declared fitting data; other roles preserve development and validation evidence separately. `validation.run_ids`, when present, may name only referenced validation-role runs. Unpinned top-level `run_ids` are rejected. This validates the recorded data split and provenance. It cannot inspect a separate statistical program to prove which responses that program actually used to fit parameters or tune choices. If any referenced bank, protocol, panel, or run is explicitly synthetic, the calibration must be `synthetic: true`. A schema-valid artifact does not constitute an endorsement of a fit or its reported diagnostics. ## Frozen benchmark release Required fields are `item_bank`, `protocols`, `model_panel`, `calibration`, `frozen: true`, an explicit `synthetic` boolean matching the calibration, `limitations` (a nonempty string array), and `aggregation`. Release bank, protocol, and panel references must exactly match the calibration. The calibration must name held-out evaluation evidence in `validation.run_ids`. This is an evidence requirement, not a statistical acceptance threshold or an automatic claim of good generalization. The default aggregation policy is: ```json {"primary": "task-language", "overall": null} ``` To declare an overall score, set `overall` to an object with `task_weights` and `language_weights`. Each is a mapping from every included task or language to a nonnegative numeric weight, and each mapping must sum to one. This prevents an undeclared question-count-weighted overall policy in the release definition. The registry records the policy; it does not calculate calibrated scores, uncertainty, passage-aware resampling, or shortened-test comparisons. ## Python API ```python from babel_fs.artifacts import ( register_artifact, artifact_ref, load_artifact, list_artifacts, validate_artifacts, archive_paths, ) reference = register_artifact(root, "bank-v1.json") reference = artifact_ref(root, "item-bank", "foundation-v1") payload = load_artifact(root, reference) references = list_artifacts(root) report = validate_artifacts(root) paths = archive_paths(root) ``` `load_artifact` returns the original payload, without inserting inferred findings. `validate_artifacts` returns `ok`, `errors`, and the number of discovered `artifacts`. `archive_paths` returns only validated artifact and manifest files for the Hub transfer allowlist. A failed dependency blocks the artifact and release rather than silently substituting another version.