Skip to content
Development
Agent

experiments

An experiment is one run of a prompt or pipeline over every example in a dataset.

From plugin
phoenix
12k18 skills18 agents1 MCP

Claude Code

> /plugin marketplace add arize-ai/phoenix
> /plugin install arize-phoenix@arize-phoenix

Agent definition

experiments.md

Experiment, ExperimentRun

An experiment is one run of a prompt or pipeline over every example in a dataset.

Reaching an experiment

There is **no `getExperimentById`** — reach an `Experiment` via `node(id:)`, `Dataset.experiments`, or `compareExperiments`.

`Dataset.experiments` is newest-first by default and paginated, so a **user-facing experiment number** (the 1-based, oldest-first `sequenceNumber`) is not necessarily on the first page — the lowest numbers are the farthest from it. Do **not** read the first page and guess; resolve a number exactly with:

  • `experiments(sequenceNumbers: [Int!])` — returns only the experiments with the given `sequenceNumber`s, without paging. Prefer this whenever the user names experiments by number (e.g. "compare experiment 5 and 7" → `sequenceNumbers: [5, 7]`).
  • `experiments(sort: {col: sequenceNumber | createdAt, dir: asc | desc})` — reorder the connection; e.g. `{col: sequenceNumber, dir: asc}` puts sequences `1..N` on the first page.

Before reporting on a fetched experiment, confirm its `sequenceNumber` matches the number the user asked for.

query ExperimentsByNumber($datasetId: ID!, $sequenceNumbers: [Int!]!) {
  node(id: $datasetId) {
    ... on Dataset {
      experiments(sequenceNumbers: $sequenceNumbers) {
        edges { node { id name sequenceNumber } }
      }
    }
  }
}

Experiment fields

  • `name`, `description`, `sequenceNumber`, `repetitions`, `isEphemeral`
  • `dataset`, `datasetVersion`, `project`
  • `runs(first, after, sort: ExperimentRunSort)` — **forward-only** (no `last`/`before`)
  • `runCount`, `expectedRunCount`
  • `errorRate`, `averageRunLatencyMs`, `costSummary`, `costDetailSummaryEntries`
  • `annotationSummaries { annotationName meanScore minScore maxScore count errorCount }`

ExperimentRun fields

  • `output`, `latencyMs`, `error`, `startTime`, `endTime`
  • `annotations(first, after)` — connection; node has `name`, `label`, `score`, `explanation`
  • `example { id revision { input output metadata } }` — the dataset example this

run executed. There is **no** `datasetExample` field, and `input`/`output`/ `metadata` live on `example.revision`, not on `example` itself.

Comparison

For candidate comparison prefer `compareExperiments(baseExperimentId: GlobalID!, compareExperimentIds: [GlobalID!]!, first, after, filterCondition)` over fetching each experiment's runs separately. Related: `experimentRunMetricComparisons(baseExperimentId, compareExperimentIds)` and `validateExperimentRunFilterCondition(condition, experimentIds)`.

Examples

Note: if the experiment came from a playground run driven through `execute_browser_action`, prefer the `playground.experiment.readResults` UI operation over hand-writing this query — it returns the same scores-plus-failures shape in one call.

Metrics only:

query ExperimentMetrics($id: ID!) {
  node(id: $id) {
    ... on Experiment {
      name
      sequenceNumber
      runCount
      errorRate
      averageRunLatencyMs
      annotationSummaries { annotationName meanScore count errorCount }
    }
  }
}

Scored results with per-run inputs/outputs — the shape for "which examples failed and why" (filter on `annotations`/`error` client-side with jq):

query ExperimentResults($id: ID!) {
  node(id: $id) {
    ... on Experiment {
      id name runCount expectedRunCount errorRate averageRunLatencyMs
      job { status }
      costSummary { total { cost tokens } }
      annotationSummaries { annotationName meanScore count errorCount }
      runs(first: 50) {
        edges { node {
          id output latencyMs error
          annotations { edges { node { name label score explanation } } }
          example { id revision { input output metadata } }
        } }
      }
    }
  }
}
Read more
@arize-ai
Ships withphoenix

AI Observability & Evaluation

12k10 skills18 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
12.1k
Star history of arize-ai/phoenix on GitHub, a chart by star-history.com

Other agents on phoenix.

bug-fixer

bug-fixer

Agent

Leads one Phoenix bug from report to draft PR - reproduce, fix, review, revise.

@arize-ai@arize-aiInstall Agent
bug-reproducer

bug-reproducer

Agent

Reproduces a reported Phoenix bug as a failing automated test. Give it the issue number, labels, the bootstrap report and the…

@arize-ai@arize-aiInstall Agent
cloud-triage

cloud-triage

Agent

Reads a day of Phoenix Cloud production errors from Datadog, decides which are bugs a maintainer should fix, and makes sure each…

@arize-ai@arize-aiInstall Agent
docs-writer

docs-writer

Agent

Makes one Phoenix documentation change, grounded in the current code, and opens a draft PR.

@arize-ai@arize-aiInstall Agent
feature-analyst

feature-analyst

Agent

Analyst that turns a Phoenix feature request into an implementation plan grounded in the existing code, starting with a probe…

@arize-ai@arize-aiInstall Agent

More agents from other plugins.

a11y-architect
Auto-invoked

a11y-architect

Agent

Accessibility Architect specializing in WCAG 2.2 compliance for Web and Native platforms. Use PROACTIVELY when designing UI…

ecc12d293k
@affaan-m@affaan-mInstall Agent
analyze-pass-impact

analyze-pass-impact

Agent

Analyzes how a specific topic affects a group of compiler passes. Used by the /plan-update skill to parallelize research across…

react1d252k
@facebook@facebookInstall Agent
orchestrator

orchestrator

Agent

- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as…

codex1d135k
@openai@openaiInstall Agent
cavecrew-builder

cavecrew-builder

Agent

Surgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard…

caveman2d119k
@juliusbrussee@juliusbrusseeInstall Agent

Questions about experiments.

Which coding agents can use experiments?
experiments installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.