---
title: "Compare two Experiments over the honest intersection of their pinned rows."
method: GET
path: "/api/{org_id}/experiments/compare"
tags: ["Experiments"]
---

# Compare two Experiments over the honest intersection of their pinned rows.

`GET /api/{org_id}/experiments/compare`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/experiments/compare`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/experiments/compare/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `org_id` string, required

## Query parameters

- `baselineId` string, required
- `candidateId` string, required
- `threshold` number, double, nullable
- `outcomeDimensions` string, nullable

## Response `200`

Baseline/candidate comparison

- ExperimentComparisonResponseBody
  - `assignmentRule` string, required
  - `baselineId` string, required
  - `baselineScoringStatus` string, required
  - `candidateId` string, required
  - `candidateScoringStatus` string, required
  - `counts` ExperimentComparisonCountsBody, required
    - `baselineRows` integer, required
    - `candidateRows` integer, required
    - `commonRows` integer, required
    - `improved` integer, required
    - `inconclusive` integer, required
    - `missing` integer, required
    - `new` integer, required
    - `regressed` integer, required
    - `unchanged` integer, required
  - `datasetId` string, required
  - `dimensions` ExperimentComparisonSummaryDimensionBody[], required
    - `assignment` 'regressed' | 'improved' | 'unchanged' | 'descriptive' | 'baseline_only' | 'candidate_only' | 'unavailable', required
    - `baseline` number, double, nullable
    - `baselineLabel` string, nullable: Original category names when every value represented by that side's aggregate has the same label; `null` otherwise.
    - `baselineOnlyRowCount` integer, required
    - `baselineSampleCount` integer, required
    - `canAffectOutcome` boolean, required
    - `candidate` number, double, nullable
    - `candidateLabel` string, nullable
    - `candidateOnlyRowCount` integer, required
    - `candidateSampleCount` integer, required
    - `comparableRowCount` integer, required
    - `dataType` 'numeric' | 'categorical' | 'boolean'
    - `delta` number, double, nullable
    - `gating` boolean, required
    - `id` string, required
    - `kind` 'score' | 'cost' | 'latency', required
    - `name` string, required
    - `normalized` boolean, required
    - `orientedDelta` number, double, nullable: Aggregate change in the better direction over comparable rows.
    - `scoreConfigId` string, nullable
    - `scoreConfigName` string, nullable
    - `scoreConfigVersion` string, nullable
  - `outcomeDimensions` string[], required
  - `partial` boolean, required: One or both sides are still being scored. The comparison is readable, but it is provisional: it cannot serve as a CI result, and its Experiments cannot be made a Baseline until scoring is terminal.
  - `rows` ExperimentComparisonRowBody[], required
    - `baselineRowId` string, nullable
    - `bucket` 'regressed' | 'improved' | 'unchanged' | 'inconclusive' | 'new' | 'missing', required
    - `candidateRowId` string, nullable
    - `dimensions` ExperimentComparisonDimensionBody[], required
      - `assignment` 'regressed' | 'improved' | 'unchanged' | 'descriptive' | 'baseline_only' | 'candidate_only' | 'unavailable', required
      - `baseline` number, double, nullable
      - `baselineDispersion` number, double, nullable: Normalized trial dispersion per side, present only where the side ran more than one trial and the dimension has a normalized key.
      - `baselineLabel` string, nullable: Original category names for categorical dimensions when each side has one unambiguous label; `null` otherwise.
      - `baselineSampleCount` integer, required
      - `canAffectOutcome` boolean, required: Whether this dimension has a comparison policy and can be selected.
      - `candidate` number, double, nullable
      - `candidateDispersion` number, double, nullable
      - `candidateLabel` string, nullable
      - `candidateSampleCount` integer, required
      - `dataType` 'numeric' | 'categorical' | 'boolean'
      - `delta` number, double, nullable
      - `gating` boolean, required: Whether this dimension is selected and can vote on the outcome.
      - `id` string, required
      - `kind` 'score' | 'cost' | 'latency', required
      - `name` string, required
      - `normalized` boolean, required: Whether `orientedDelta` is a fraction of the configured range rather than raw units, which is how the threshold should be read.
      - `orientedDelta` number, double, nullable: Change in the better direction; positive always means improved.
      - `scoreConfigId` string, nullable
      - `scoreConfigName` string, nullable
      - `scoreConfigVersion` string, nullable
      - `withinNoise` boolean, required: The delta is smaller than the trial noise on both sides. Render it de-emphasized with a `~`; the bucket it belongs to is unaffected.
    - `input` unknown, required
    - `logicalId` string, required
    - `trials` ExperimentComparisonTrialBody[], required
      - `baselineOutput` unknown
      - `candidateOutput` unknown
      - `trialIndex` integer, required
  - `threshold` number, double, required

## Other responses

- `400`: Invalid threshold, outcome dimensions, or cross-dataset comparison
- `403`: One or both Experiments are not accessible
- `404`: One or both Experiments were not found

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
