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=30d

It 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

ParameterDescription
period7d, 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

FieldTypeDescription
periodobject{ 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.
truncatedbooleanWhether the team replayed more in the period than one answer covers.
stationsarrayEach 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:

FieldTypeDescription
setIdstring
stationGonebooleanWhether its station has left its line.
healthobject{ 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.
baselineobject or nullIts newest baseline that is queued, running or finished, whatever the period. Null while it has none. See Baseline.
chartCurrencystring or nullThe currency its cost and success chart is drawn in: the baseline's, or else that of its newest replayed candidate. Null with neither.
candidatesarrayThe 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

FieldTypeDescription
replayIdstring
statestringqueued, running, finished, stopped or ceiling-reached.
fingerprintstring or nullThe config fingerprint of the live config it replayed.
scorednumberHow many of its runs were scored.
successRatenumber or nullIts success over the whole set, 0 to 1. Null while none was scored.
intervalobject or nullsuccessRate with its 95% interval.
costPerRunnumber or nullWhat it spent per scored run. Null while any of its spend went unpriced or was in another currency than its ceiling's.
currencystringIts ceiling's currency, which costPerRun is in.
endedAtstring or null
chartStatusstringWhether it is drawn on the set's chart. See Chart status.

Candidate

FieldTypeDescription
candidateIdstring
namestring
hypothesisstring or nullWhat the search's agent expected it to improve, and why.
fingerprintstring or nullIts config fingerprint.
changesarrayHow 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.
replayIdstringIts replay on the searched tasks.
replayStatestring or nullThat replay's state, as for a baseline.
replayedAtstring or nullWhen that replay started. Null while the replay cannot be found.
tasksnumberHow many different tasks its replay covers: the searched ones.
runsnumberHow many runs of the set its replay covers, each once however many repeats.
successRatenumber or nullIts 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.
intervalobject or nullsuccessRate with its 95% interval.
scorednumberHow many of its runs were scored.
heldOutobject 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.
costPerRunnumber or nullWhat its replay spent per scored run. Null while any of its spend went unpriced or was in another currency.
currencystringThe currency costPerRun is in: its search's ceiling's.
liveobject 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.
successRateOnComparednumber or nullThe candidate's own success on the compared runs alone, 0 to 1, to set beside live.successRate. Null without a baseline.
intervalOnComparedobject or nullsuccessRateOnCompared with its 95% interval, to set beside live.interval. Null without a baseline.
costPerRunOnComparednumber or nullWhat 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.
usageOnComparedobject or nullThe 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.
usageChangeOverLiveobject 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.
regressionsnumber or nullHow many of the compared runs it regressed on. Null without a baseline.
comparednumberThe compared runs: how many of its runs the baseline replayed too.
gainOverLiveobject or nullIts gain over the baseline on the compared runs, paired run by run, against the line's min_gain. Null without a baseline.
onFrontierboolean or nullWhether 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.
searchobject 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.
pullRequestobject or null{ id, state, closedBecause, closeFailure, url, reason }: the config pull request Spotlight opened for it, with its state. Null unless Spotlight picked it.
chartStatusstringWhether it is drawn on the set's chart. See Chart status.
shownobjectThe 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:

chartStatusWhen
unfinishedIts replay has not finished.
unscoredIt has no success rate.
unpricedIt has no cost per run.
other-currencyIts cost per run is in another currency than chartCurrency.
pricedOtherwise: it is drawn.

The first that applies is answered.

Shown

shown is { basis, costBasis, successRate, interval, liveSuccessRate, runs, costPerRun, liveCostPerRun }:

FieldTypeDescription
basisstringcompared when the candidate has a live and compared is above 0, else overall.
costBasisstringcompared when basis is and live.currency is the candidate's currency, else overall.
successRate, intervalnumber or null, object or nullsuccessRateOnCompared and intervalOnCompared on the compared basis, else successRate and interval.
liveSuccessRatenumber or nulllive.successRate on the compared basis, else null.
runsnumbercompared on the compared basis, else scored.
costPerRunnumber or nullcostPerRunOnCompared when costBasis is compared, else costPerRun.
liveCostPerRunnumber or nulllive.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

StatusCause
401No session or token, or an unknown token.
404The team is not one the caller may read: Team <teamId> not found.
422period is not 7d, 30d or 90d, or is sent twice: Period must be 7d, 30d or 90d.

On this page