eval-dashboards docs

Type to search.

    v1 pages

    Artifact Format

    @icodenet/eval-dashboards consumes versioned JSON artifacts. The first contract is eval-report/v1.

    In this repo, eval-report/v1 means “version 1 of the eval report JSON contract”. It is the value written into schemaVersion so the CLI, validators, reporters, gates, and future migration tools know which artifact shape they are reading. An eval runner can be Jest, Vitest, a Python script, an agent harness, or a host-application-specific script; as long as it emits this JSON shape, eval-dashboards can validate it and render the same reports.

    Think of it as the shared handoff file between eval execution and reporting:

    1. A runner evaluates cases and writes JSON with schemaVersion: 'eval-report/v1'.
    2. eval-dashboards reads that artifact from .evals_output/ or another configured input directory.
    3. The package produces checks, history, summaries, and static dashboards from the normalized fields below.

    Why These Fields Exist

    • Logs are ephemeral and hard to query; artifact rows are durable and gateable.
    • Config drift is a common root cause for live-eval instability; snapshots improve reproducibility.
    • Judge/rubric drift can appear as regressions without product changes; governance metadata prevents false narratives.

    Schema source-of-truth and drift guard

    • Source model: src/model/eval-report-v1.ts
    • Published schema: schemas/eval-report-v1.schema.json
    • Generate/sync command: pnpm schema:generate
    • CI drift guard command: pnpm schema:check

    schema:check regenerates the schema and fails if schemas/eval-report-v1.schema.json differs from the committed file.

    Validation error contract (stable)

    When artifact validation fails, runtime consumers expose a stable structured issue shape:

    type ValidationIssue = {
      code: 'VALIDATION_ERROR';
      path: string;    // e.g. 'rows[0].trace.traceId'
      message: string; // human-readable validation message
    };

    Notes:

    • path is deterministic when the validator can infer a specific field path.
    • Top-level shape failures use path: '$'.
    • Callers can use the first issue path for concise error prefixes while keeping full messages for debugging.

    Check heartbeat output contract (eval-check-heartbeat/v1)

    When eval-dashboards check is run with --heartbeat-out=<path>, it writes a machine-readable heartbeat JSON payload:

    {
      "schemaVersion": "eval-check-heartbeat/v1",
      "gateRunStatus": "ran",
      "generatedAt": "2026-01-01T00:00:00.000Z",
      "exitCode": 0,
      "runId": "optional-run-id",
      "baselineRunId": "optional-baseline-run-id",
      "message": "optional failure message"
    }

    gateRunStatus values:

    • ran: gate logic executed and produced a normal gate verdict
    • skipped: check could not run due to missing/no artifacts (exit 3)
    • errored: invalid config/artifact or runtime failure (typically exit 2)

    Minimal valid artifact

    The smallest file that passes lint and check has five required parts: schemaVersion, run.id, run.generatedAt (an ISO date string), suites[] and rows[]. The row list is called rows, not cases.

    {
      "schemaVersion": "eval-report/v1",
      "run": { "id": "run-1", "generatedAt": "2026-10-01T00:00:00Z" },
      "suites": [{ "id": "smoke", "total": 1, "passed": 1, "failed": 0 }],
      "rows": [{ "id": "case-1", "suite": "smoke", "passed": true }]
    }

    Common validation errors

    Every file in the input folder must be an eval-report/v1 artifact. A bad file stops the command with exit code 2 and names the file and the field.

    Message (exact text) Cause Fix
    [run.generatedAt] run.generatedAt must be an ISO date string. run.generatedAt is missing or not a date Add "generatedAt": "2026-10-01T00:00:00Z"
    [rows] rows must be an array. The list is called cases, results or something else Rename it to rows
    [schemaVersion] schemaVersion must be eval-report/v1. run must be an object. suites must be an array. rows must be an array. A file that is not an artifact is in the input folder Move the other JSON file out, or point --input at a folder with only artifacts
    [rows[0].suite] rows[0].suite must reference a declared suite. A row names a suite that is not in suites[] Add the suite to suites[] or fix the row’s suite
    Duplicate run ID "r1" in a.json and b.json. Two files share one run.id Give each run a unique run.id

    What To Emit

    • A dedicated preflight suite with deterministic probe rows.
    • A sanitized run.configSnapshot block that never contains secrets.
    • Judge/rubric identity fields (judgeModel, rubricId, promptVersion, rubricContracts).

    Check result output contract (eval-check-result/v1 and /v2)

    eval-dashboards check --json-out=<path> writes eval-check-result/v1: schemaVersion, gateRunStatus, runId, baselineRunId?, passed, failures[], diagnostics[], baselineCompatibility?, newlyFailingRows[], notifications?. This shape is unchanged and remains the default for existing consumers.

    eval-dashboards check --json-v2-out=<path> additionally writes eval-check-result/v2: every v1 field, plus full audit provenance so an auditor can read a single file and determine which thresholds were in force, against which dataset/rubric versions, for which commit, without reading workflow YAML at that commit:

    {
      "schemaVersion": "eval-check-result/v2",
      "gateRunStatus": "ran",
      "runId": "run-002",
      "passed": true,
      "failures": [],
      "diagnostics": [],
      "newlyFailingRows": [],
      "resolvedGateConfig": { "minPassRate": 0.9 },
      "suiteProvenance": [
        { "suite": "answer-quality", "datasetVersion": "1.2.0", "rubricVersion": "agent-quality-v1" }
      ],
      "artifactDigests": [
        { "path": "examples/basic-json/run-002.json", "sha256": "..." }
      ],
      "subject": { "commit": "abc123", "release": "build-42" },
      "ciEnvironment": { "provider": "github-actions", "runId": "12345", "runUrl": "https://github.com/org/repo/actions/runs/12345", "actor": "octocat" }
    }

    --json-v2-out is additive: it is written alongside (not instead of) --json-out, and existing v1 consumers/pipelines are unaffected whether or not --json-v2-out is passed.

    How To Emit It Safely

    • Put probe outcomes in rows[] rather than only CI logs.
    • Set run.configSnapshot.redacted=true when emitting environment-derived values.
    • Restrict run.configSnapshot.values to non-sensitive scalar values (string, number, boolean, null).
    • Keep rubric guidance consistent across runs and version changes explicitly.
    export type EvalReportV1 = {
      schemaVersion: 'eval-report/v1';
      run: {
        id: string;
        generatedAt: string;
        project?: string;
        team?: string;
        kind?: string;
        branch?: string;
        commit?: string;
        buildId?: string;
        sourceUrl?: string;
        experimentId?: string;
        variantLabel?: string;
        configSnapshot?: {
          redacted?: boolean;
          source?: string;
          values: Record<string, string | number | boolean | null>;
        };
      };
      suites: EvalSuiteSummary[];
      rows: EvalRow[];
      suiteManifests?: SuiteManifest[];
      rubricContracts?: SuiteRubricContract[];
      baselineCompatibility?: BaselineCompatibilityResult;
      datasetChangelog?: DatasetChangelogEntry[];
      metadata?: Record<string, unknown>;
      tags?: Record<string, string>;
    };

    EvalSuiteSummary (per-suite roll-up counts, one entry per suite name present in rows[]; id is required and must match rows[].suite / suiteManifests[].name):

    export type EvalSuiteSummary = {
      id: string;
      name?: string;
      total: number;
      passed: number;
      failed: number;
      passRate?: number;
    };

    run.experimentId / run.variantLabel (both optional strings, validated leniently with no format constraint): a grouping key for clustering 3+ variant runs (e.g. prompt v1/v2/v3) for side-by-side comparison, beyond the single baseline-vs-current model. experimentId identifies the experiment; variantLabel is a human-readable label for this run’s variant within it. Purely descriptive — no gate reads these fields. Echoed in the HTML report’s run banner and run-metadata card, and in the markdown reporter’s run table.

    run.kind conventions:

    • calibration: marks a calibration-evidence artifact (for example, judge-calibration rows) and excludes that run from automatic baseline selection (--baseline-strategy) so calibration-only artifacts do not become report/check baselines.
    • Other values are currently free-form and tool-specific.

    tags (top-level, optional): free-form Record<string, string> for ad hoc CI context beyond the fixed run.branch / run.commit / run.buildId fields — e.g. { "pr": "42", "model": "gpt-4o" }. Purely descriptive; no gate reads this field. Echoed in the HTML report’s run-metadata card, in the markdown report’s metadata table, and in --json-out.

    Rows are runner-agnostic:

    export type EvalRow = {
      id: string;
      suite: string;
      kind?: 'deterministic' | 'agent' | 'llm-judge' | 'human-review';
      name?: string;
      question?: string;
      datasetId?: string;
      scenarioId?: string;
      rubricId?: string;
      rubricVariant?: string;
      judgeModel?: string;
      judgeVerdict?: boolean;
      judgeCategory?: string;
      judgeReasoning?: string;
      promptVersion?: string;
      agentChannel?: string;
      agentVersion?: string;
      agentReasoning?: string;
      groundTruthVerdict?: boolean;
      groundTruthCategory?: string;
      groundTruthAnnotation?: string;
      groundTruthAxisScores?: Record<string, number>;
      humanReviews?: Array<{
        reviewer: string;
        verdict: string;
        category?: string;
        note?: string;
        decidedAt?: string;
      }>;
      reviewAgreement?: number; // 0-1
      repeated?: {
        runs: number;
        passes: number;
        aggregation: 'mean' | 'majority' | 'all';
        samplingDesign?: 'fixed-independent' | 'unknown';
      };
      checks?: Array<{
        type: string;
        expected?: unknown;
        actual?: unknown;
        threshold?: number;
        pass: boolean;
        weight?: number;
      }>;
      input?: string;
      output?: string;
      expected?: string;
      turns?: Array<{
        role: 'user' | 'assistant' | 'system' | 'tool';
        content: string;
        toolCall?: { name: string; args: Record<string, unknown> };
        toolResult?: string;
        timestamp?: string;
        durationMs?: number;
      }>;
      toolCalls?: Array<{
        name: string;
        args?: Record<string, unknown>;
        result?: string;
        resultIsError?: boolean;
        durationMs?: number;
      }>;
      trace?: {
        traceId?: string;
        spanId?: string;
        traceUrl?: string;
        spanUrl?: string;
        spanType?: string;
      };
      axisScores?: Record<string, number>;
      /** Optional per-axis judge reasoning, one explanation string per axis key. */
      axisReasoning?: Record<string, string>;
      passed: boolean;
      score?: number;
      severity?: 'none' | 'low' | 'medium' | 'high' | 'critical';
      category?: string;
      reason?: string;
      durationMs?: number;
      usage?: {
        promptTokens?: number;
        completionTokens?: number;
        totalTokens?: number;
        costUsd?: number;
        model?: string;
      };
      metadata?: Record<string, unknown>;
      complianceRefs?: string[];
    };

    Agent and LLM judge reports should use the first-class optional judge fields instead of hiding core report semantics in metadata:

    • kind: identifies deterministic checks, agent checks, LLM judge checks, or human review rows.
    • datasetId: stable dataset identifier for trend and baseline grouping.
    • scenarioId: stable scenario identifier inside a dataset.
    • rubricId: rubric or criterion identifier applied to the row.
    • judgeModel: model or judge engine name used to score the row.
    • judgeVerdict: raw judge verdict before any row-level calibration or outcome mapping.
    • judgeCategory: judge-assigned failure or success category.
    • judgeReasoning: short explanation from the judge, suitable for report display.
    • promptVersion: version of the evaluated prompt, policy, or agent instructions.
    • agentChannel: channel, environment, or release lane for an evaluated agent.
    • agentVersion: version of the evaluated agent or workflow.
    • groundTruthVerdict, groundTruthCategory, and groundTruthAnnotation: labelled calibration evidence for judge evals.
    • trace.traceId, trace.spanId: portable trace/span identifiers when available.
    • trace.traceUrl, trace.spanUrl: optional deep links to trace evidence that reporters can render as clickable links.
    • trace.spanType: optional free-form, runner-defined label for the pipeline stage this span represents (e.g. "retrieval", "generation", "tool", "agent"). No enum lock-in; purely a label for grouping evidence by pipeline stage. HTML/markdown reporters show it next to trace links when present; no change when absent.
    • complianceRefs: opaque, free-form compliance/regulatory reference ids this row is evidence for (e.g. "owasp:llm:01", "nist:ai:measure:1.1", "eu:ai-act"). Not validated against a canonical list — harnesses own classification, this package only stores and groups/filters by whatever strings are provided. suiteManifests[].complianceFrameworks?: string[] is the analogous suite-level field. HTML/markdown/JSON reporters render a “Compliance coverage” grouping by these tags only when at least one row or manifest declares one; there is no UI change when both are absent.

    When using judge-based groundedness/relevance suites, ensure rubric guidance does not penalize extra details that remain consistent with reference/context.

    Trace-first evidence pattern

    For failure triage, prefer carrying both portable IDs and clickable links:

    {
      "id": "agent/tool-timeout-001",
      "suite": "agent",
      "passed": false,
      "severity": "high",
      "category": "tool-timeout",
      "trace": {
        "traceId": "4f5c7c55f9da4b4a",
        "spanId": "a1e243fbe90c9f5d",
        "traceUrl": "https://traces.example.local/trace/4f5c7c55f9da4b4a",
        "spanUrl": "https://traces.example.local/trace/4f5c7c55f9da4b4a/span/a1e243fbe90c9f5d",
        "spanType": "tool"
      }
    }

    End-to-end maintained example:

    • Artifact: examples/basic-json/run-trace-links.json
    • Generate report: eval-dashboards report --input=examples/basic-json --run-id=run-trace-links --reporter=html --report-dir=eval-report
    • Triage flow: open row agent/tool-timeout-001 in eval-report/index.html and follow the rendered trace/span links.

    Suite Governance

    Suites can carry opinionated but portable governance metadata:

    export type SuiteManifest = {
      name: string;
      target: 'agent' | 'conversation' | 'judge' | 'custom';
      owner?: string;
      datasetSource: 'synthetic' | 'labelled-synthetic' | 'production-sample' | 'manual' | 'custom';
      datasetVersion: string;
      rubricVersion?: string;
      riskArea:
        | 'compliance'
        | 'pii'
        | 'content-safety'
        | 'prompt-safety'
        | 'tone-of-voice'
        | 'factuality'
        | 'response-quality'
        | 'tool-use'
        | 'tool-routing'
        | 'groundedness'
        | 'relevance'
        | 'custom';
      graders: Array<
        | 'deterministic-assertions'
        | 'human-labelled-calibration'
        | 'llm-judge'
        | 'tool-call-check'
        | 'custom'
      >;
      datasetPath?: string; // optional source file/URL
      gate: { mode: 'blocking' | 'report-only'; thresholds: Record<string, number> };
      description?: string;
      complianceFrameworks?: string[];
      scoreScale?: { min: number; max: number };
      scoreDirection?: 'higher-is-better' | 'lower-is-better';
      graderVersion?: string;
    };

    rubricVersion remains optional for compatibility, but is required for governance-critical suites: when gate.mode is blocking, or when graders includes llm-judge.

    Use target: 'agent' for live agent behavior, tool use, channel, prompt, and version checks. Use target: 'judge' for judge calibration suites where the evaluated subject is the judge itself.

    For fail-fast live pipelines, define a dedicated preflight suite (target: 'custom') with deterministic probe rows and gate it via required suite pass checks.

    complianceFrameworks (optional): opaque, free-form compliance/regulatory framework tags this suite maps to, e.g. ["owasp:llm", "nist:ai:measure:1.1", "eu:ai-act"]. Deliberately not a canonical enum — classification is harness territory. Combined with rows[].complianceRefs, reporters group/filter a “Compliance coverage” view; both fields are additive and produce no UI change when omitted.

    scoreScale (optional, 4F.18): a declared, non-normalized score range for this suite’s rows, { min: number; max: number }, e.g. { min: 0, max: 3 } for a 0-3 Likert rubric. One per suite, not per row — rows[].score values for rows in this suite are assumed to fall within [min, max]. The HTML reporter uses it to render row score bars/gauges proportionally to the declared scale; suites without it keep the existing default 0-1 assumption, so this is additive with no behavior change when omitted.

    scoreDirection (optional): higher-is-better or lower-is-better. Omitted means unknown for comparison analytics; a positive raw delta must not automatically be described as improvement. Supply scoreScale and the same direction in both runs to classify score changes.

    graderVersion (optional): a non-empty immutable version of the suite’s grader implementations and scoring configuration, distinct from the dataset and rubric versions. Change it when the measurement process changes. Comparison eligibility requires matching dataset, rubric, and grader versions plus the same grader kinds. Judge-scored pairs also require the same declared judgeModel. The application model and prompt may vary as experiment factors.

    All additions remain optional in eval-report/v1; older artifacts are valid but their comparison eligibility can be unknown. See cohort and telemetry semantics.

    Rubric contracts describe the axes used by judge and human-review rows:

    export type SuiteRubricContract = {
      suiteName: string;
      rubricVersion: string;
      rubrics: Array<{ axis: string; version: string; sourcePath?: string; summary?: string }>;
    };

    Baseline Compatibility

    When a run is compared with a previous run, @icodenet/eval-dashboards can assess whether the comparison is meaningful:

    Blocking suite threshold keys supported by check include:

    • Pass rate: passRate, pass_rate, passrate (minimum pass rate)
    • Critical count: maxCriticalFailures (maximum critical failing rows)
    • Critical rate: criticalFailureRate (maximum critical failure ratio)
    • Calibration sample: minCalibrationRows (minimum paired judgeVerdict and groundTruthVerdict rows; positive safe integer). Snake-case and kebab-case aliases are accepted. In source after 0.11.0, this optional numeric threshold uses the existing gate.thresholds map; no new schema version is needed.
    • Calibration agreement: minJudgeAgreementRate, maxJudgeDisagreementRate and shared-axis error maxAxisScoreDelta; see calibration gates.
    • Calibration kappa: minJudgeKappa (optional minimum unweighted Cohen’s kappa, finite from -1 to 1). An unavailable metric fails a configured blocking bar. See statistics and category semantics.

    The contract stays vendor-independent: these fields describe evaluation evidence, not a specific model provider, runner, or hosting platform.

    Dataset Changelog (Optional)

    For governed eval programs, artifacts can carry an optional datasetChangelog array that records why comparability changed:

    type DatasetChangelogEntry = {
      suiteName: string;
      datasetVersion: string;
      rubricVersion: string;
      changedAt: string;
      changeType: 'initial-baseline' | 'patch' | 'minor' | 'major';
      summary: string;
      rowChanges: {
        added: number;
        updated: number;
        removed: number;
        relabelled: number;
      };
    };

    This field is optional and additive. When present, reports can show dataset/rubric evolution without requiring external changelog files.

    Row Provenance & Lifecycle Conventions

    rows[].metadata remains extensible, but eval-report/v1 now documents optional portable conventions for row governance:

    type RowMetadata = {
      // legacy cost field, tolerated for backward compatibility — prefer
      // rows[].usage.costUsd (see "Usage Metrics" above) for new emitters
      costUsd?: number;
      // tolerated aliases accepted by reporters/importers for compatibility:
      // costUSD, usdCost, cost.usd, pricing.costUsd
      provenance?: {
        source:
          | 'synthetic'
          | 'labelled-synthetic'
          | 'production-review'
          | 'incident'
          | 'regression'
          | 'custom';
        addedBy?: string;
        reason?: string;
        sourceRef?: string;
      };
      lifecycle?: {
        status: 'proposed' | 'active' | 'deprecated' | 'quarantined' | 'custom';
        since?: string;
        note?: string;
      };
      // additional runner-specific metadata fields are still allowed
    };

    These fields are optional and additive. Existing artifacts remain valid; runners can adopt them incrementally for auditability and dataset stewardship.

    Usage Metrics (Tokens/Cost/Latency)

    rows[].usage (4D.2) is the first-class, schema-validated home for token and cost usage. Latency continues to be reported via the sibling rows[].durationMs field:

    type RowUsageMetrics = {
      promptTokens?: number;
      completionTokens?: number;
      totalTokens?: number;
      // canonical cost field for cost-quality frontier reporting, in USD
      costUsd?: number;
      model?: string;
    };

    All fields are optional and additive. Reporters read usage.costUsd first and fall back to the legacy metadata.costUsd (and its aliases) so existing artifacts keep working. New emitters should populate usage directly instead of stashing tokens/cost under metadata. The HTML/markdown reporters surface per-row usage in the row detail view and artifact-wide totals (“Total cost”, “Total tokens”) in the run metadata section when any row has usage data.

    Human Adjudication Bundle Flow (Optional)

    For reviewer-loop workflows (Phase 4B.7), the CLI supports an optional export/import sidecar bundle:

    eval-dashboards adjudicate export --input=.evals_output --out=eval-report/adjudication-bundle.json
    eval-dashboards adjudicate import --input=.evals_output --bundle=eval-report/adjudication-bundle-reviewed.json --out=eval-report/adjudicated-run.json

    Use --run-id=<id> on either action when the input directory contains multiple runs. export bundles rows that do not match their expected outcome. By default it skips such rows when they passed; add --include-passed to include them too (for example, an expected failure that unexpectedly passed). import needs at least two valid reviewer verdicts per row and skips rows with fewer. --allow-single-reviewer accepts one verdict per row instead; it is an escape hatch that lowers review rigor, so use it only when a second reviewer is not available. Keep adjudicated outputs outside the artifact input directory to avoid duplicate run ids in discovery.

    Bundle contract:

    type AdjudicationBundleV1 = {
      schemaVersion: 'eval-adjudication-bundle/v1';
      bundleId: string;
      generatedAt: string;
      source: { runId: string; generatedAt: string };
      rows: Array<{
        id: string;
        suite: string;
        unresolvedReason: 'expectation-mismatch';
        currentPassed: boolean;
        expectedOutcome?: 'pass' | 'fail';
        severity?: 'none' | 'low' | 'medium' | 'high' | 'critical';
        category?: string;
        reason?: string;
        input?: string;
        output?: string;
        expected?: string;
        judgeVerdict?: boolean;
        judgeCategory?: string;
        judgeReasoning?: string;
        groundTruthVerdict?: boolean;
        groundTruthCategory?: string;
        groundTruthAnnotation?: string;
        review?: {
          verdict?: 'pass' | 'fail';
          reviewer?: string;
          category?: string;
          note?: string;
          decidedAt?: string;
        };
      }>;
    };

    On import, reviewer decisions merge into rows[] (for example passed, groundTruthVerdict, groundTruthCategory, groundTruthAnnotation) and append a provenance trail under report.metadata.adjudication.imports[] and row-level metadata.adjudicationTrail[]. If a row already has metadata.provenance, import preserves it; otherwise import adds metadata.provenance.source='production-review' with bundle linkage.

    Identity and measurement integrity

    Each row must reference a declared suite (its ID or name), and quality gates require (suite, id) pairs to be unique within a run. Legacy importers may preserve duplicate explicit IDs for display, but those ambiguous runs cannot pass check. Use the repeated aggregation record for repeated evaluations instead of duplicating identities. Runtime validation rejects negative suite counts, durations, token counts, and usage costs. Zero measurements remain valid. These checks align numeric measurements with the published schema; unknown optional metadata stays supported.

    Repeated-trial sampling and uncertainty

    repeated.passes counts trial-level passed: true outcomes before the row’s aggregation rule is applied. For intentional negative cases (expectedOutcome: 'fail'), analysis uses runs - passes as the number of outcomes matching the expectation. Counts are not reconstructed from the aggregate row boolean.

    samplingDesign: 'fixed-independent' declares that the trial count was chosen before observing results and trials were independent under stable case and grading conditions. Leave it absent or use unknown when that is not justified, including adaptive stopping or dependent retries. Older artifacts remain valid. The generic runner adapter preserves both repeated and expectedOutcome.

    summary.json.analytics.repeatedTrials reports per-case observed rates and conservative 95% Hoeffding bounds. Missing design leaves the interval unknown; it never implies zero uncertainty. The implementation also refuses unsafe integer counts. A matching-case change is estimated only for unique identities, compatible measurement versions, unchanged grouping, and declared designs in both runs. Its difference bound allocates half the error probability to each run, then subtracts interval endpoints (a union bound). It does not require independence between the two runs or infer paired trial identities.

    These are within-case trial estimates, not a release verdict or a pooled model accuracy estimate. Cases are not pooled; trial counts never increase the paired gate’s independent group count. Bounds do not correct for searching many cases or inspecting results repeatedly. HTML, Markdown, and text display the same shared calculation as JSON. Counts cover all current repeated-case identities; the deterministic evidence list includes at most 20, sorted by suite and ID. Cases removed from the current run appear in the cohort summary instead.

    The Hoeffding bound for bounded independent observations supplies the per-run interval. With error probability alpha, its half-width for Bernoulli trials is sqrt(log(2 / alpha) / (2 * runs)). For a difference, each run uses alpha / 2; subtracting the displayed individual 95% intervals would not give the same joint 95% guarantee. See examples/repeated-trials/README.md for synthetic inputs.

    Reports show repeated-trial evidence only when current repeated cases exist. JSON still includes explicit counts for the shared analysis. Intervals describe uncertainty under the declared design; they do not establish causality.

    Named judge and human labels

    A judge can choose “fully answered” while a person chooses “partially answered”. To preserve that distinction, a suite may declare an optional labelScale:

    {
      "labels": ["fully answered", "partially answered", "not covered", "wrong"],
      "passLabels": ["fully answered"]
    }

    Set rows[].judgeLabel and rows[].groundTruthLabel to exact names from that suite’s list. Names are case-sensitive, unique and non-empty. Declare at least two. passLabels is a required, explicit subset, which may be empty. It says which labels mean Pass. If a corresponding judgeVerdict or groundTruthVerdict is also supplied, its boolean must agree with this mapping. passed remains the runner’s required result; validation and reporting do not rewrite it.

    JSON Schema describes the optional fields. Runtime validateEvalReport also checks label membership, suite references and consistency with optional booleans. Existing boolean-only artifacts keep their behavior. Do not put outcome labels in failure category, judgeCategory or groundTruthCategory fields.

    For a suite with a declared scale, calibration agreement, minimum sample size and kappa gates use pairs of named labels. Missing either label does not count; boolean verdicts cannot fill the gap. Kappa is nominal: class order and the Pass/Fail mapping do not change exact-label agreement. Undefined scores stay unavailable. A target suite with a scale requires calibration evidence with the same labels and Pass mapping. Reordering names is harmless. Update the rubric version when label meanings change.

    Reports preserve boolean statistics and add separate analytics.calibration.classSummaries for declared scales, with counts and judge/category breakdowns. Different suites are not pooled. The public summarizeClassCalibration(report) gives those results; measureClassCalibration(rows, scale) measures one declared scale. Class-only reports display named-label results without inventing boolean decisions.

    Human-review exports include a copy of the row’s scale and labels. For those rows, reviewers fill reviews[].label; an optional verdict must agree with the mapping. Two matching labels are required by default. Two different labels that both map to Fail still disagree. Import checks against the target report’s scale, records the selected label and derives the existing boolean decision. Editing the scale in a review bundle does not change the target’s mapping. Boolean-only review bundles keep their existing workflow.

    Try the runnable four-class example. These additive fields keep eval-report/v1; they are after published npm 0.11.0.

    Optional baseline version keys

    A result can look better because a model improved, because a prompt changed, or because it ran with different tools or settings. Record version identifiers so a reviewer can tell what was compared. Each suite may declare:

    {
      "comparisonKeys": {
        "modelDigest": "sha256:example-model-id",
        "promptHash": "sha256:example-prompt-id",
        "toolContract": "tools-v2",
        "instanceConfig": "sha256:example-config-id"
      },
      "comparisonTreatments": {
        "modelDigest": "Compare the new model with the existing model."
      }
    }

    The four optional keys are opaque, non-empty strings compared exactly. Use stable IDs or hashes, not secrets or raw settings. The package does not compute or verify their contents. Unknown key names and blank values are invalid. comparisonTreatments is an optional explanation for each deliberately varied key. Each explanation needs a current value; it applies only when both runs record different values. It cannot replace missing evidence or waive dataset and rubric checks. An experiment ID or display label alone does not authorize a changed version.

    baselineCompatibility.versionKeys and shared comparison analytics record each key as match, changed, unknown or treatment, with both observed values and a reason. A missing value on either side is unknown, never a verified match. An unexplained difference blocks a blocking suite’s baseline comparison, and is a warning for a report-only suite. A declared planned change remains visible without being treated as uncontrolled drift. This is a declaration of intent, not proof of a controlled experiment or of which change caused an improvement.

    When neither run records any extra keys, existing dataset/rubric gate behavior and matched-case eligibility stay unchanged. The added evidence still says those optional versions are unknown. One-sided recorded metadata makes that comparison unknown for paired statistical evidence; unexplained differences make it incompatible. Reports prioritize changed and missing versions before their display limit, and JSON retains every result. A matching compatible status covers the recorded comparison rules; it does not prove that every possible condition was held fixed.

    Try the runnable version comparison. These optional fields keep eval-report/v1 and require source after npm 0.11.0.