RAG COMPARE

LOCAL CONTRACT / VERSION 1

Small files. Exact IDs.

Read a local JSON file or paste it into the workbench. Reading is local; it is not an upload. Validation must succeed before the current workspace is replaced. Use the same document IDs and corpus revision in both runs.

{
  "version": 1,
  "corpus": "Fictional corpus v1",
  "runA": "Baseline",
  "runB": "Candidate",
  "queries": [
    {
      "id": "worked",
      "a": [
        "a",
        "b",
        "c"
      ],
      "b": [
        "b",
        "d",
        "a"
      ],
      "judgments": {
        "a": 0,
        "b": 1,
        "c": 0,
        "d": 1
      },
      "complete": true
    }
  ]
}

Required fields

version must equal 1. corpus, runA and runB are nonempty labels up to 160 characters. queries has 1–100 entries. Each query needs a unique id, arrays a and b, a binary judgments object, and Boolean complete.

Order in a or b defines rank. An empty array is supported. Each run has at most 200 unique IDs, each 1–80 characters without whitespace. A judgment of 1 means relevant; 0 means not relevant. Do not infer relevance from the ranking itself. Include relevant IDs that neither run retrieved so recall has the right denominator.

Completeness is your declaration

complete: true asserts that every relevant ID in this corpus for this query is declared. It does not change missing judgments into zero. false withholds Recall and nDCG. Unknown top-k IDs withhold all three metrics for that run.

Two explicit exports

Dataset JSON follows this contract and can be re-imported. The calculation report has kind: retrieval-replay-report and includes k, policy, applied dataset, per-query numbers and macro numbers. N/A values are JSON null. Reports are evidence artifacts, not dataset imports: use their nested dataset separately if needed.

Unknown imported fields are discarded on successful import; exports contain only the supported contract. Duplicate JSON object keys are rejected; author judgments with unique keys. No CSV, TREC run file, graded relevance or remote URL import is supported. Input is capped at 1 MiB; no full document text is needed.

Open workbench →

Privacy