Replayed candidates API
Candidates, on the Stations tab of
a team's Insights page, is read through this endpoint. It answers JSON, and errors are
application/problem+json as on the
resource API.
GET /api/teams/{teamId}/replayed-candidates?period=30dIt answers the station configs that Spotlight's
searches replayed on past tasks in the period,
by station and by replay set, each set with its
baseline: the live config replayed. A
success rate here is a replay's, scored by the candidate's own checks and judge
on past tasks, and says nothing of how live runs went. A replay set contains runs,
and a task may have more than one run in it. Success rates, their intervals
and gains are worked out over the set's runs, each run counted once however
many repeats of it were replayed (see Results).
compared and regressions count the set's runs, and scored counts replay
runs, repeats included.
An interval is { rate, low, high }: the success rate with its 95% interval.
A gain is { gain, low, high, significance, minGain, tasks }: the gain and
its 95% interval as shares, better, worse or within-noise as in
Gains, the line's min_gain, and the
runs compared.
Parameters
| Parameter | Description |
|---|---|
period | 7d, 30d or 90d: whole UTC days up to and including today. Default: 30d. |
A candidate is answered when its search started in the period. Candidates of
replay checks and of replays with the
answer are left out, and the live config is answered only as each set's baseline. A set's
health and baseline are current, whatever the period.
The endpoint reads the team's newest 500 replays started in the period. When
there were more, it answers truncated: true and leaves out the oldest.
Answer
| Field | Type | Description |
|---|---|---|
period | object | { name, from, to }: the period's name, the start of its first UTC day, and the start of the UTC day after today, which it stops short of. RFC 3339 times. |
truncated | boolean | Whether the team replayed more in the period than one answer covers. |
stations | array | Each work station with a candidate replayed in the period, the newest replayed first: { lineId, stationId, sets }. A station removed from its line is still answered. |
Set
Each item of a station's sets, the newest replayed first:
| Field | Type | Description |
|---|---|---|
setId | string | |
stationGone | boolean | Whether its station has left its line. |
health | object | { tasks, runs, oldestRunEndedAt, newestRunEndedAt, lastAddedAt, noise, saturation, judge, checks, oracle, minGain }. runs counts the runs the set contains now, and tasks the different tasks they worked. The three times are when the oldest and the newest of its runs ended, and when a run was last added to it; each is null while there is none. noise, saturation, judge, checks and oracle are the set's health, each null until it is measured; minGain the smallest gain its line counts as real. |
baseline | object or null | Its newest baseline that is queued, running or finished, whatever the period. Null while it has none. See Baseline. |
chartCurrency | string or null | The currency its cost and success chart is drawn in: the baseline's, or else that of its newest replayed candidate. Null with neither. |
candidates | array | The candidates replayed over it in the period, the greatest gainOverLive.gain first and those without one last, the newest replayed first among equals. See Candidate. |
Baseline
| Field | Type | Description |
|---|---|---|
replayId | string | |
state | string | queued, running, finished, stopped or ceiling-reached. |
fingerprint | string or null | The config fingerprint of the live config it replayed. |
scored | number | How many of its runs were scored. |
successRate | number or null | Its success over the whole set, 0 to 1. Null while none was scored. |
interval | object or null | successRate with its 95% interval. |
costPerRun | number or null | What it spent per scored run. Null while any of its spend went unpriced or was in another currency than its ceiling's. |
currency | string | Its ceiling's currency, which costPerRun is in. |
endedAt | string or null | |
chartStatus | string | Whether it is drawn on the set's chart. See Chart status. |
Candidate
| Field | Type | Description |
|---|---|---|
candidateId | string | |
name | string | |
hypothesis | string or null | What the search's agent expected it to improve, and why. |
fingerprint | string or null | Its config fingerprint. |
changes | array | How it differs from the live config, each { part, name, kind, was, now }. part is prompt, harness, model, effort, profile, image, repository, skill, tool, decisions, memories or judge; name names which repository, skill or tool, or the judge's claims, sample or minimum agreement; kind is added, removed or changed. was and now are the values where they can be shown; prompts, skills and claims are compared but not shown. |
replayId | string | Its replay on the searched tasks. |
replayState | string or null | That replay's state, as for a baseline. |
replayedAt | string or null | When that replay started. Null while the replay cannot be found. |
tasks | number | How many different tasks its replay covers: the searched ones. |
runs | number | How many runs of the set its replay covers, each once however many repeats. |
successRate | number or null | Its search score: the replay success, 0 to 1, over the searched runs it was scored on, scored by its own checks and judge. It says nothing of how live runs went. |
interval | object or null | successRate with its 95% interval. |
scored | number | How many of its runs were scored. |
heldOut | object or null | { replayId, state, score, interval, tasks, runs }: its replay on the tasks its search held out, kept apart from successRate. score is its success there, 0 to 1, once that replay finished, else null; tasks is how many different tasks the search held out, and runs how many held-out replay runs, repeats included, it was scored on. Null for a candidate not replayed there. |
costPerRun | number or null | What its replay spent per scored run. Null while any of its spend went unpriced or was in another currency. |
currency | string | The currency costPerRun is in: its search's ceiling's. |
live | object or null | { successRate, interval, costPerRun, currency, usage }: how the set's baseline did on the compared runs alone. currency is the baseline's, and may differ from the candidate's. usage is the baseline's mean run on those runs, as in Run usage. Null without a baseline. |
successRateOnCompared | number or null | The candidate's own success on the compared runs alone, 0 to 1, to set beside live.successRate. Null without a baseline. |
intervalOnCompared | object or null | successRateOnCompared with its 95% interval, to set beside live.interval. Null without a baseline. |
costPerRunOnCompared | number or null | What the candidate spent per run on the compared runs alone, in its own currency, to set beside live.costPerRun. Null without a baseline, and while any of that spend went unpriced. |
usageOnCompared | object or null | The candidate's mean run on the compared runs alone, as in Run usage: cost, tool cost, harness tokens and wall time, to set beside live.usage. Null without a baseline. |
usageChangeOverLive | object or null | { totalCost, meteredCost, tokens, ms }: usageOnCompared less live.usage, negative where the candidate uses less. totalCost and meteredCost are null unless both sides have them in the same currency and every run of both sides has a known price, with pricedRuns equal to runs. Null without a baseline. |
regressions | number or null | How many of the compared runs it regressed on. Null without a baseline. |
compared | number | The compared runs: how many of its runs the baseline replayed too. |
gainOverLive | object or null | Its gain over the baseline on the compared runs, paired run by run, against the line's min_gain. Null without a baseline. |
onFrontier | boolean or null | Whether it is on its search's frontier: no other candidate of the search, nor the live config it started from, succeeds as often for less. |
search | object or null | { searchId, state, objective, startedAt, seed }: the search that proposed it. state is seeding, searching, holding-out, finished or stopped. objective is success or cost, the search's aim, which decides onFrontier. seed is { successRate, interval, costPerRun, scored, chartStatus }: the live config the search started from, scored on the same searched runs as its candidates, with its cost per run in the candidate's currency. Its chartStatus counts it as finished. |
pullRequest | object or null | { id, state, closedBecause, closeFailure, url, reason }: the config pull request Spotlight opened for it, with its state. Null unless Spotlight picked it. |
chartStatus | string | Whether it is drawn on the set's chart. See Chart status. |
shown | object | The figures to set beside the live config. See Shown. |
Chart status
chartStatus says whether a baseline, a candidate or a search's seed is drawn
on its set's chart, in the set's chartCurrency:
chartStatus | When |
|---|---|
unfinished | Its replay has not finished. |
unscored | It has no success rate. |
unpriced | It has no cost per run. |
other-currency | Its cost per run is in another currency than chartCurrency. |
priced | Otherwise: it is drawn. |
The first that applies is answered.
Shown
shown is { basis, costBasis, successRate, interval, liveSuccessRate, runs, costPerRun, liveCostPerRun }:
| Field | Type | Description |
|---|---|---|
basis | string | compared when the candidate has a live and compared is above 0, else overall. |
costBasis | string | compared when basis is and live.currency is the candidate's currency, else overall. |
successRate, interval | number or null, object or null | successRateOnCompared and intervalOnCompared on the compared basis, else successRate and interval. |
liveSuccessRate | number or null | live.successRate on the compared basis, else null. |
runs | number | compared on the compared basis, else scored. |
costPerRun | number or null | costPerRunOnCompared when costBasis is compared, else costPerRun. |
liveCostPerRun | number or null | live.costPerRun when costBasis is compared, else null. |
Who may read
A person on the team or an owner or admin of its workspace, signed in, or a
workspace token of the team's workspace
with the read scope, sent as Authorization: Bearer <token>. Anyone else is
answered 404. See
Team outcomes.
Errors
| Status | Cause |
|---|---|
401 | No session or token, or an unknown token. |
404 | The team is not one the caller may read: Team <teamId> not found. |
422 | period is not 7d, 30d or 90d, or is sent twice: Period must be 7d, 30d or 90d. |