Skip to content

Evals

Last updated: 2026-11-27T01:31:49-03:00 (UTC-3)

Before you switch models or prompts, prove that the change is an improvement. Evals run a dataset against a model and a prompt, score the responses with judges (an LLM, a rule or a person) and compare the results with the baseline, item by item. They also evaluate real traffic, by sampling. Everything is native to the platform.

Flag What it turns on
evals Datasets, evaluators, experiments, comparison, score analytics and annotation queues. Requires PostgreSQL, ui and chat_completions
evals_public_api Experiments from code and in CI, with a team key
eval_capture Capture and evaluation of real traffic; requires the control plane encryption key
content_capture_evaluation One capture policy for audit and evaluation: rules judge chat, Messages, Responses and generateContent requests, streams included, from the team’s content capture; requires content_capture
evaluation_results Scores become evaluation results on spans, traces and sessions: pass/fail assessments, typed values (JSON included), error results, evaluator versions, edit history, encrypted judge reasoning, the /evaluations API and results on the request log, the trace drawer and sessions
experiment_traces Experiments as traces: each experiment item one trace with its judges nested, dataset version history with diff and restore, a run on an older version, Add to dataset from a span, judging a past run again, experiment_finished; requires evaluation_tracing
regression_suites Regression suites with a CI verdict; requires experiment_traces
remote_experiments Remote experiments: the team’s own endpoint executes the items; requires experiment_traces
experiment_summaries Comparison summaries through the team’s chosen alias; requires experiment_traces
agent_evaluations Agent evaluations: tasks × targets × trials run by the client-side runner, each trial one trace, and a scorecard per target; requires experiment_traces and evals_public_api
evaluation_tracing Judge calls as linked, labelled traffic: each judge run in its own trace linked both ways to what it judged, judge trace, request and ledger cost on results, the origin of every request (app, evaluation, experiment, playground, helper, shadow) as a log, usage and cost dimension, evaluator health and 7-day cost; requires evaluation_results

Everything belongs to a team: the global admin sees and operates everything, a team_admin operates the teams they administer, and the other roles can only read. Interactive reference at /docs/swagger/, tag Evals.

Concept What it is
Score config Defines a score by name: numeric (range), boolean, categorical (2–20 categories) or text. The type does not change
Score A value on a target: a request (request_id), a session (X-Gateway-Session-Id) or an experiment item. It is validated immediately against the config; once accepted, it is never discarded later
Dataset Items with input, expected_output and metadata. The optional JSON Schema is enforced on every write. Each change is a new version, and ?as_of= reads the dataset as of a point in time. Items are added one by one (the item form takes the input, the expected output and an optional metadata JSON object, which judges read as metadata), by CSV or from traffic captures. Datasets are listed by name and items by ID, in the API and the console
Evaluator (LLM-as-judge) A prompt with {{input}}, {{output}} and {{expected}}, a chat alias as the judge and the output (boolean, numeric range or categories). The response is strict JSON Schema; an invalid response is retried once, and 429/5xx get backoff. Editing creates a new version. Other {{variables}} read input, output, expected or metadata, whole or by path ($.messages[-1].content), with a preview in the console
Experiment Dataset × model × prompt from the registry (published revision) × evaluators

The judge can be a decision alias (TypeSafe Jev, Cloudflare Clef via System One): a boolean score becomes the probability of “yes”, and a categorical one becomes the most likely category.

Besides the LLM judge, an evaluator can be a deterministic rule (equality, contains, regex, valid JSON, JSON field, length) that scores without calling a model, in experiments, on live traffic and in the sample test.

The experiment runs in the background, through the gateway itself, as the dataset’s team (principal eval:<run>). This means:

  • routing, fallbacks, quotas, budget, ledger and logs all apply;
  • the judge does not need its own credential.

Execution details:

  • an item missing a prompt variable fails without calling the model;
  • the run records the dataset’s point in time, the prompt revision and the evaluator versions;
  • the prompt is its published revision, or with prompt_tracking any stored revision you choose (prompt_revision, 1–100, in POST /evals/runs; the prompt page’s Run experiment fills it in);
  • a restart resumes pending items;
  • the id of each judge score is deterministic, so repeating does not duplicate.

Because every model call and every judge call goes through the gateway, the request log already prices them. The experiment list shows a Cost column, and the run detail shows the run’s cost and each item’s cost, read from that log:

Request Request ID
The item’s model call eval.<run>.<item> (an API run uses the request ID the client linked)
Each judge call of the item eval.<run>.<item>.judge.<evaluator>.<attempt>

How to read the amount:

Shown Meaning
US$0.00000436 Every request of the run or item has a known price; the amount is exact
US$0.00000186 (partial) Some requests have no known price (for example a fallback whose first provider is not in the price book). The amount is the known part; the tooltip says how many requests are not valued
Unknown No request has a known price. Unknown is never shown as zero
— No request of the run or item is in the request log (an item that failed before calling the model)

The comparison of several runs shows the same amounts: a Cost column per run in the summary and each run’s cost on every item, next to its input and output tokens.

Costs are shown only when usage_valuation is on and your role has analytics:read, the same rule the request journey follows. The amounts come from the valuation the gateway recorded for each request; to get one, give the models a price (automatic pricing). In the API, GET /api/v1/admin/evals/runs and GET /api/v1/admin/evals/runs/{id} return cost on the run and on each item, and GET /api/v1/admin/evals/compare returns it on each compared run and on each run’s item cell: state (known, partial or unknown), known_usd (exact decimal string), requests and unvalued_requests.

Every request ID on the Evals screens is a link to its entry in Logs → Requests, which opens the request journey: the item’s model call in the run detail, each judged request in an evaluator’s execution log, each capture on the Captures tab, request targets on the Scores tab and in annotation queues. The link is the request journey permalink (#/logs/request/<id>), so it opens only for people who can see that request. Long IDs are shortened in the middle; hover for the whole ID, or use the copy button next to it.

In Evals → Experiments, select 2 to 5 runs of the same dataset and click Compare runs; selections survive paging, so runs on different pages can be compared. The equivalent API is GET /api/v1/admin/evals/compare?runs=a,b,c.

In the run list, a latest chip marks the most recent run of each dataset, and a baseline chip marks the run the comparison measures against (while you pick, the oldest picked run, which becomes the default baseline). The experiment list’s Scores column shows every score’s average and count, and for a categorical score every label with its count, for example topic billing 10 · other 30 · support 20.

The default baseline is the oldest run, and you can change it with the Baseline field or Make baseline next to a compared run. The comparison shows:

  • Per run: completed and failed items, average latency, p50 and p95, input and output tokens, the cost (see What a run costs) and the average of each score (or the label distribution). Next to each average of a compared run is its difference from the baseline’s average, over all items: 0.77 (60) −0.03 vs baseline reads “an average of 0.77 over 60 scores, 0.03 below the baseline”.
  • Per score, against the baseline: how many items improved, got worse, stayed the same, changed label or ended up without a score (an item or judge that failed).
  • Per item, side by side: each run’s output, the scores and the delta, its latency, input and output tokens and cost, and its request ID, which links to the request journey (see From an evaluation to its request).
  • Charts (Charts box): the average of each score per run, the distribution of each score and of latency in bins that are the same for all runs, and tokens. They cover every item, even with a filter. Each run keeps its color when the baseline changes, and each chart has a Data table. In a narrow card the distribution is drawn sideways, one labelled row per bin.
  • On a phone the summary and the items are cards, one per run or item, each value labelled with its run. On a wide screen a comparison of many runs scrolls sideways with the first column pinned.

Comparison rules:

  • Higher is better for numbers and booleans.
  • Regression is a drop in score or an item that failed where the baseline completed.
  • Filters: Regressions only and Changes only apply before pagination.
  • Filter by score: keep the items whose score passes a condition, for example correct = false or helpfulness > 4. Pick the score, an operator and a value, and optionally the run it applies to (by default an item matches when any compared run passes). Numbers and booleans (true/false) take =, ≠, >, ≥, < and ≤; labels and text take = and ≠. An item without that score in a run does not match there, also for ≠. The score filter combines with Regressions only and Changes only, and like them applies before pagination.
  • Edited item: when the runs read different versions of an item, the item is flagged and the comparison warns you. The responses are not comparable.

The address of the page holds the comparison, so reloading it or sending the link opens the same comparison, with its baseline and filters:

#/evals/compare?runs=<run>,<run>[,…]&baseline=<run>[&items=regressed|changed][&score=<name>&op=eq|ne|gt|gte|lt|lte&value=<value>[&score_run=<run>]]

For example https://gateway.example.com/ui/#/evals/compare?runs=run_a,run_b&baseline=run_a&items=regressed&score=correct&op=eq&value=false. The link carries run IDs only: whoever opens it sees the comparison only if they can read those runs, and the costs only under the rule above. Opening a comparison adds a browser history entry, so Back returns to the run list.

Parameter Default What it does
runs required 2 to 5 run IDs of one dataset, comma separated
baseline the first run The run the others are measured against; one of runs
filter all regressed or changed keep only those items
score none A score name (up to 80 characters); turns on the score filter
score_op eq eq, ne, gt, gte, lt or lte; the last four need a number or true/false
score_value required with score The value to compare with, up to 200 characters; true and false read as 1 and 0
score_run any run Apply the score filter to one of runs only
limit, offset 100, 0 Item page, 1–500 items, after every filter

The response has total_items after the filters, score_filter echoing the score filter (absent without one), and on each compared run avg_delta (per score with an average in both runs: this run’s average minus the baseline’s, over all items; absent on the baseline) and cost. Each item’s run cell has request_id, input_tokens, output_tokens and cost.

The Experiments, Datasets, Evaluators, Scores and Score configs lists share one toolbar:

Control What it does
Search and filters Narrow the rows: text search on Experiments, Datasets, Evaluators and Score configs, plus status, kind or archive filters; on Scores, the exact score name, the source and the target type, applied by the server
Columns Show or hide columns. The name column and the actions always show; some columns (dataset, creation time, IDs, versions) are hidden until you show them
View and Save view Save the current columns, filters and rows per page under a name, and apply it later; Delete view removes it
Export CSV Downloads every row that matches the filters, not only the page on screen, with the visible columns and the values the list shows. Amounts are exact decimals in USD (0.00000622, 0.00000186 (partial), unknown); a text that a spreadsheet would run as a formula starts with an apostrophe. Scores are read from the server 500 at a time, up to 10,000 rows; narrow the filters for more
Pages 25, 50 or 100 rows per page, Previous and Next, and the range shown, for example 26–50 of 260

Columns, rows per page and saved views are kept in this browser for each console user and list. They are a convenience: a private window or blocked site data starts from the defaults, and nothing about them is stored on the server.

The Scores tab counts every score your teams can read, not the first page. The list is paged by the server:

Terminal window
curl -s "https://gateway.example.com/api/v1/admin/evals/scores?source=annotation&limit=50&offset=50" \
-H "Authorization: Bearer $ADMIN_TOKEN"
{"data": [{"id": "score_1", "name": "helpfulness", "value": 4, "source": "annotation", "target_type": "request", "target_id": "req_…"}], "total": 260, "offset": 50, "limit": 50, "has_more": true}

limit is 1–500 (any other value reads 100, as before paging), offset is 0–100000 (anything else is 400 invalid_request; narrow the filters to reach older scores). total counts the scores that match the filters among the teams you can read, and has_more says whether a later page has rows. Scores are ordered newest first.

When a list is empty, the screen says what the object is and links its section of this guide.

Evals → Analytics (or GET /api/v1/admin/evals/score-analytics?team_id=…&name=…) shows one team’s score over a period, with source, target and type filters:

Type What appears
Numeric Count, mean, standard deviation, range and an exact 10-bin histogram
Boolean Count and true rate
Categorical Count per label and mode
Text Count and trend only
  • Trend: the series goes by hour, day or week, with zeros in periods with no score, drawn with a time axis and a count axis; hover or focus a period to read its count and average. A period with the only scores is drawn as a labelled point. The default period is the last 30 days by the database clock.
  • Mixed types: a name with values of more than one type (no score config) asks you to choose the type.
  • Agreement: stays on the same tab, now with RMSE and macro F1.

New evaluator → Start from a template fills in the evaluator with a ready-made rubric:

Template Measures
correctness Agreement with the reference
faithfulness Absence of unsupported claims
helpfulness Usefulness, from 1 to 5
relevance Relevance, from 1 to 5
conciseness Conciseness, from 1 to 5
safety Absence of toxic or dangerous content
tone Tone: rude, neutral or courteous
language_match Response in the user’s language
  • Edit and test before saving. The template is only a starting point.
  • Higher is always better, so the comparison counts drops as regressions.
  • Expected output: templates that read {{expected}} need datasets with an expected output. Live traffic does not have one.
Terminal window
curl -s https://gateway.example.com/v1/scores -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
-d '{"id":"fb-123","name":"thumbs","data_type":"boolean","value":1,"target":{"type":"request","id":"<X-Request-Id from the response>"}}'

The key needs the scores:write scope. The target must be a request, a session or a run item belonging to the key’s team. Repeating the same id updates the score. With evaluation_results on, the same call also takes span, trace and join-key targets, assessments, statuses, JSON values, end-user feedback with its submitter and batches of up to 1000: see Evaluation results.

With the evals_public_api flag (requires evals), a team key runs experiments from code, the usual pattern for experiments in CI.

Scope What it allows
evals:read GET /v1/datasets, /v1/datasets/{name}, /v1/datasets/{name}/items, /v1/datasets/{name}/runs and /runs/{run}
evals:write POST /v1/dataset-runs and POST /v1/dataset-run-items
scores:write POST /v1/scores with a run_item target

The flow of a CI script:

  1. Open the run: POST /v1/dataset-runs with dataset_name and name. The run pins the dataset version in dataset_as_of.
  2. Read the items: GET /v1/datasets/{name}/items?as_of=<dataset_as_of>&page=1&limit=50, page by page.
  3. Run the application on each item. If it calls the model through the gateway, keep the X-Request-Id from the response.
  4. Link the result: POST /v1/dataset-run-items with run_id, item_id, output and request_id. With request_id, latency and tokens come from the ledger. Without it, send latency_ms if you want.
  5. Score: POST /v1/scores with target {"type":"run_item","id":"<the item's score_target>"}.
  6. Compare: in the console (Evals → Experiments, where the runs appear tagged API) or at GET /v1/datasets/{name}/runs/{run}.
from openai import OpenAI
import json, urllib.request
GW, KEY = "https://gateway.example.com", "<key with route:chat, evals:read, evals:write, scores:write>"
def api(method, path, body=None):
req = urllib.request.Request(GW + path, data=body and json.dumps(body).encode(), method=method,
headers={"Authorization": "Bearer " + KEY, "Content-Type": "application/json"})
return json.load(urllib.request.urlopen(req))
run = api("POST", "/v1/dataset-runs", {"dataset_name": "capitals", "name": "prompt-v2", "metadata": {"commit": "abc123"}})
items = api("GET", f"/v1/datasets/capitals/items?limit=100&as_of={run['dataset_as_of']}")["data"]
client = OpenAI(base_url=GW + "/v1", api_key=KEY)
for item in items:
raw = client.chat.completions.with_raw_response.create(model="gpt-4o-mini", messages=[{"role": "user", "content": item["input"]}])
answer = raw.parse().choices[0].message.content
linked = api("POST", "/v1/dataset-run-items", {"run_id": run["id"], "item_id": item["id"], "output": answer,
"request_id": raw.headers["x-request-id"]})
api("POST", "/v1/scores", {"name": "correct", "value": int(item["expected_output"] in answer),
"target": {"type": "run_item", "id": linked["item"]["score_target"]}})

Rules that apply to CI:

  • Everything belongs to the key’s team. Datasets, runs and requests of another team respond as if they did not exist.
  • The dataset is read-only through the key. Items are created and edited in the console.
  • Opening by name also works: dataset_name + run_name in dataset-run-items opens the run on first use and reuses it afterwards. API run names are unique per dataset (409 duplicate on POST /v1/dataset-runs).
  • Relinking an item replaces the result (200 instead of 201). Repeating a CI step duplicates nothing.
  • Console runs do not accept links (409 invalid_state).
  • A run can be partial. total counts the items linked so far; dataset_items is the size of the dataset version the run pinned. A run with total below dataset_items did not run every item, and the console shows it as incomplete (“1 of 4 items linked”).
  • Higher is better. The comparison counts a drop as a regression. A score where lower is better (words, cost) shows up as an “improvement” when it gets worse. Send the inverse, or a range where higher is better.
  • Linking right after the answer: the usage ledger row is written after the response leaves, so POST /v1/dataset-run-items waits up to 3 seconds for the request to appear before answering 400 request_not_found (the same wait and the same answer for another team’s request and for an unknown one). A stream’s row lands when the stream ends: read the whole response first.

With the eval_capture flag (requires evals and the control plane encryption key), each team decides whether to capture a sample of its own chat traffic. The policy (sampling rate, optional models, retention) is configured in Evals → Captures or with PUT /api/v1/admin/evals/capture-policies/{team}; choosing a team in the form loads its saved policy, and when you have only one team the form loads it for you. Save policy stays disabled until the saved policy has loaded, so saving never replaces it with the form’s defaults. The Captures tab lists the most recent captures (up to 200), 25 per page.

With content_capture_evaluation on, the capture policy is the team’s content capture policy. An administrator adds the evaluation purpose to it under Governance → Content capture; the Captures tab shows which teams are captured for evaluation and no longer has a policy form, and PUT /api/v1/admin/evals/capture-policies/{team} answers 409 capture_policy_moved. What changes for evaluation:

Without the flag With content_capture_evaluation
Requests judged Buffered Chat Completions Chat Completions, Messages, Responses and generateContent, buffered or streamed, cache hits included
What the judge reads The messages after guardrail masking and the answer The same: the request’s sent view (after the input guardrails) and the answer; never the request as received
Who else reads it People with evals:manage in the team The same people, for every record the policy keeps for evaluation; each read is audited
Sampling By request_id, in the evaluation policy The content policy’s sample_rate (random per request), then its evaluation.sample_rate (by request_id), then each evaluator’s own sampling
Retention 1 to 90 days The content policy’s evaluation.retention_days, or its retention_days
Encryption The control plane key The content key, one data key per record
A matched request that cannot be judged No result A skipped result: content_not_captured (kept for audit alone, or no text answer) or content_truncated (longer than max_bytes)

An evaluator reads the records the policy keeps for evaluation. Existing evaluation policies are moved for you, and captures already stored stay readable until they expire: see the upgrade. The rest of this section applies either way.

Aspect How it works
Policy A deterministic sampling rate by request_id, optional models and retention from 1 to 90 days
Content The messages after guardrail masking and the response, encrypted with the control plane key. They are deleted when they expire. Reading the content requires evals:manage and content_sent:read of the team (the content ladder): the built-in administrator and team administrator hold both
What is excluded Streaming responses and responses served from the cache. Traffic from the judges and experiments themselves is never captured, so there is no evaluation of evaluation
Evaluators Evaluators judge the captured requests: each owns its scope, its filter, its sampling and its status, and runs as a job of a durable queue in PostgreSQL shared by the replicas with SKIP LOCKED (a claimed job carries a five-minute lease; only jobs whose lease expired go back to the queue; a draining replica claims none, and a job it stops before judging returns without spending an attempt)
Reasoning for the judge An evaluator with include_reasoning: true (Include the model’s reasoning in the evaluator form; false by default) also gives its judge the model’s reasoning, after the prompt and labelled as not part of the answer. It needs content_capture_reasoning, which keeps the reasoning as its own part of the record; without it, or for an answer with no reasoning, the judge reads the answer alone. Code evaluators take no reasoning
Images for the judge With content_capture_media the record keeps images as attachments; an evaluator with multimodal: true gets them back in place of their references (up to five)
Automatic pause An evaluator pauses itself, with the reason, when the judge is refused or becomes invalid (disabled model, quota, budget): see status and health. Transient failures are retried with backoff and never pause it
Annotation queues Queue writes take review_queues:manage and reviewing takes reviews:annotate (who may do what); with review_multi_annotator a queue also takes traces and spans, several reviewers per item, assignment, drafts, export and calibration, and review_automations fills it from live traffic: see Human review. Fields are the team’s score configs, with an optional description. Targets are captured requests, sessions (the reviewer sees the summary and up to 20 captured turns, in order) or experiment items; a target that does not exist or belongs to another team is refused. “Review” locks the next item for the reviewer for 10 minutes, and Ctrl/⌘+Enter saves the form (all or nothing) and opens the next one. A queue with assigned people is worked only by them and by the global admin (403 not_assigned for everyone else); without assignments, anyone who can write in the team reviews. “Items” lists items by state, with who locked and who completed them, and removes pending ones; completed items stay, because they record the annotation. The queue can be edited (the team does not change) and deleted, and its scores remain on the targets
Corrected output and comments During review, “Corrected output” starts with the original response, shows the diff and saves a correction score named output, one per target. When you send the capture to a dataset, the correction becomes the expected output. Next to it is the target’s comment thread: only the author or a global administrator can delete. Registry prompts have the same thread, in the prompt’s team. An @ in a comment mentions someone who can read the thread, and that person sees the comment in the Mentions tab. Comments accept Markdown: lists, code, bold, italics and links
Open in Playground A capture (Captures tab) or the item under review opens in the Playground with the system prompt, the history and the last request in the input box, ready to resend; the one-shot transfer stays in memory for the current tab/session/access generation, is cancelled on reload/logout or a source-page change while loading, and never submits automatically. See handoff lifecycle
Agreement Two scores on the same targets. For numbers: Pearson, Spearman and mean absolute error. For labels: accuracy, Cohen’s κ and a confusion matrix. This is how you calibrate a judge against people before you trust it

With evaluation_metrics, evaluation results are also metrics and the Usage screen has a Quality tab. With evaluation_monitors, the Monitors tab holds the team’s monitors, and the Evaluators tab shows how many monitors each evaluator has and starts a pass-rate, failure count or judge spend monitor from it.

  • A small judge is lenient. In real validation, a 1.5B Qwen2.5 marked as “correct” answers that did not name the requested city. Use a capable model as the judge, check it with Test on a sample and measure its agreement with human annotation.
  • Streaming and Responses are judged only with content_capture_evaluation; without it, live evaluation captures buffered Chat Completions only.
  • Request IDs are chosen by the client. When two teams (with organization admins, possibly two organizations) send the same X-Request-Id, each keeps its own capture, encrypted for its team, and a rule only ever judges or backfills its own team’s. GET /api/v1/admin/evals/captures/{request}?team= picks one team’s capture when the session reads both.
  • Backfill window. Without until, a backfill runs up to the database clock, the clock captures are stamped with.

A request, its capture, its spans and trace, a session, a score or evaluation result, a comment and an experiment run belong to the organization they were recorded in. When a team moves to another organization, it keeps its ID, its datasets, evaluators, score configs, rules and queues, but what it recorded under the former organization stays there. The team, and the readers of its new organization, can neither target it nor read it. The former organization’s administrators keep reading it, through the organization recorded on each row and with the permissions they already hold: see when a team moves.

Writes.

  • A score, an evaluation result, a comment or a review-queue item on a request, a session, a trace, a span, a run or a run item recorded before the move is refused with 400 (“not found for this team”), and the comment thread of such a target answers 404. Comments already written stay stored and are no longer served.
  • Anything the team records after the move is a target as usual. A session or a trace that has requests on both sides of the move stays a target through the requests made after it.
  • Request IDs are chosen by the client. A request ID (or a session) the team uses again after the move is a target again, with an empty comment thread: the comments, the capture and the results the former organization holds under the same ID do not come back with it.
  • A review queue holds one item per target. A queue that already holds an item for a request ID (or a session, a trace) from before the move keeps it as the former organization’s, listed with former_organization: true and never handed out; adding the same ID again after the move answers 200 with {"added":0,"duplicates":1} and adds nothing. Queue the reused ID in another queue. (A safe default: the earlier item is never shown as the new one’s.)
  • A result of an experiment is recorded with its run, in the organization the run was created in, even when it is written after the team moved (a run still executing).
  • A review queue passes over a pending item recorded before the move: Review hands out the next item the team can still read. The earlier item stays in the queue’s list, where an administrator can remove it.
  • A live-evaluation backfill judges only captures recorded since the move.
  • The public API refuses (409) a new run under a name a run of the former organization already holds in the dataset: choose another name.

Reads. Every read made for the team returns only what the team recorded in its current organization:

Read What a moved team gets
Captures (the Captures tab, a capture by request ID, the content records, a reveal, an attachment) Later captures; an earlier one answers 404
Traces, spans and the request’s trace, on either span engine Later ones; an earlier trace or span answers 404
The trace explorer: lists, facets, figures, the histogram and the chart Later traces and spans only, in the rows and in every count
Scores and evaluation results (lists, one result, its revisions, score analytics, agreement, external evaluators, evaluator health) Later results only
Runs (the list, a run, a comparison, the dataset’s runs on the public API) Later runs; an earlier one answers 404
Comments (a thread, the mentions inbox, the comment count on a trace) Comments on later targets
The request log, a request with its cost, its journey, a session summary, the agent graph, replay links, the recent requests and the totals of Usage and of a team’s or key’s detail, the daily rollups, the cost report, the usage query Later requests only
Alerts shown on a trace, and the execution log of an evaluator Those of later requests

For a read made through the team, the organization the team is in now decides, not who is asking: the administrator of its organization and a team role read the same rows of the team. The global administrator stands above organizations: a list that is not narrowed to a team still shows every row, and a read that names one team shows that team’s rows of its current organization.

Spend follows the same rule, from both sides. Usage and Analytics totals, the daily rollups, the cost report and the request log count a request for the organization it ran in: the team and its new organization get what was recorded since the move, and the former organization keeps what was recorded there, which its administrators still read through the organization on the row. Budgets, alert scans and the audit events of a move are described in when a team moves.

Narrowing to one team. GET /api/v1/admin/evals/runs, /evals/scores and /evals/captures take team_id and then list that team’s rows alone; score analytics and agreement always take one. For a team of the session it is the team in its current organization. An organization administrator may also name a team that left its organization, and gets what the team recorded there: in the console, Recorded by team above the Evals tabs, and the team of Analytics, list those teams as “ (left on )”. A team the session may not name is refused (403 on the lists, 404 on the statistics). A result’s revision history (GET /api/v1/admin/evaluations/{id}/revisions) is read by whoever reads the result.

An evaluator’s execution log and its job counts hold the runs of the team’s current organization, and a team’s alert list holds the alerts raised in its current organization.

Rows with no organization recorded stay with their team, wherever the team is now. That is every row written with organizations off (a request, a span, a result and a run all record none, so turning the flag on later and moving a team treats them alike) and every row written before the column that names it existed.

Upgrade note. The first two migrations each add one nullable column with no table rewrite:

  • 211 adds organization_id to gateway_eval_runs. A run from before it has none recorded and stays with its team.

  • 212 adds organization_id to gateway_trace_summaries, the table the trace explorer lists and counts from. With the analytics store span engine the same column is added to its summary table at start. A summary from before the upgrade has none recorded, so an earlier trace of a team that already moved still appears in the explorer’s list (its spans and content do not open). To stamp earlier summaries from their spans, run POST /api/v1/admin/traces/summaries/rebuild over the days you keep, 31 days at a time.

  • 213 and 214 put the organization in the daily rollups and in the analytics store’s copy of the request log, 235 and 238 let a very large rollup day be rebuilt in slices, 236 records the organization of an alert and 237 the teams that left an organization; all are described in when a team moves.

With the database span engine a trace has one summary per team: a trace that has spans on both sides of a move is listed under the organization of its first spans.

Every route below needs a console session or an admin Bearer token, the role’s permission and, for writes, the X-CSRF-Token header; the full contract is in the API reference.

Route What it does
GET /api/v1/admin/evals/agreement Agreement between two score names on the same targets: correlation and error for numbers, accuracy and kappa for labels
GET /api/v1/admin/evals/capture-policies The per-team capture policies of evaluation traffic
GET /api/v1/admin/evals/captures Capture metadata only: request, team, model and expiry
GET /api/v1/admin/evals/captures/{request} The decrypted input and answer of one captured request
GET /api/v1/admin/evals/comments The comment thread of one target, oldest first
POST /api/v1/admin/evals/comments Adds a comment to a captured request, a session, a run item or a prompt of the team. A request is looked up by team_id and its ID together: when two teams each made a request under the same X-Request-Id, each comments on its own and reads only its own thread. See targets after a team moves
DELETE /api/v1/admin/evals/comments/{id} Removes a comment from its thread
GET /api/v1/admin/evals/datasets Lists the datasets with their item counts
POST /api/v1/admin/evals/datasets Creates a dataset, optionally with input and expected-output schemas every item must meet
GET /api/v1/admin/evals/datasets/{id} Reads a dataset and its items, optionally as of an earlier time
POST /api/v1/admin/evals/datasets/{id}/items/from-captures Turns up to 100 captured requests of the team into dataset items, in one transaction
POST /api/v1/admin/evals/datasets/{id}/items/import Imports up to 1,000 items from a CSV; one bad line rejects the whole file
GET /api/v1/admin/evals/evaluator-templates The ready LLM-as-judge rubrics (correctness, faithfulness, helpfulness and others)
GET /api/v1/admin/evals/evaluators Lists the LLM-as-judge evaluators
POST /api/v1/admin/evals/evaluators Creates a judge: score name, judge model, prompt and output type
POST /api/v1/admin/evals/evaluators/test Runs a judge definition on one sample and returns the score, storing nothing
PUT /api/v1/admin/evals/evaluators/{id} Changes a judge; a changed definition is a new version
DELETE /api/v1/admin/evals/evaluators/{id} Deletes a judge
GET /api/v1/admin/evals/mentionable The console users who can read a target’s comments, for mention autocomplete
GET /api/v1/admin/evals/mentions The session user’s mentions inbox, newest first
POST /api/v1/admin/evals/mentions/read Marks the listed mentions, or all of them, as read
GET /api/v1/admin/evals/queues Lists the annotation queues with assignees and pending and completed counts
POST /api/v1/admin/evals/queues Creates an annotation queue with its score fields and assignees
PUT /api/v1/admin/evals/queues/{id} Replaces a queue’s name, description, fields and assignees
DELETE /api/v1/admin/evals/queues/{id} Hides a queue
GET /api/v1/admin/evals/queues/{id}/items The queue’s items, oldest first, with locks and who completed each
POST /api/v1/admin/evals/queues/{id}/items Adds up to 500 targets (requests, sessions or run items) to a queue
DELETE /api/v1/admin/evals/queues/{id}/items Removes a pending item
POST /api/v1/admin/evals/queues/{id}/next Locks the oldest pending item that still has a seat for the reviewer (ten minutes by default) and returns it
POST /api/v1/admin/evals/queues/{id}/complete Stores every score of the form, all or nothing, and completes the item
GET /api/v1/admin/evals/runs/{id} One run with its items, outputs, latency, tokens, errors and scores
POST /api/v1/admin/evals/runs/{id}/cancel Stops a queued or running run
GET /api/v1/admin/evals/runs/{id}/compare/{base} Per score, the items improved, regressed or unchanged against a baseline run
GET /api/v1/admin/evals/score-configs Lists the typed score definitions people and judges share
POST /api/v1/admin/evals/score-configs Creates a numeric, boolean, categorical or text score definition
PATCH /api/v1/admin/evals/score-configs/{id} Changes a score definition’s description
DELETE /api/v1/admin/evals/score-configs/{id} Archives a score definition
GET /api/v1/admin/evals/scores Lists scores newest first, filtered by name, target, run or source, a page at a time (limit, offset) with total and has_more
POST /api/v1/admin/evals/scores Records a score annotated by a console user
DELETE /api/v1/admin/evals/scores/{id} Deletes one score
DELETE /api/v1/admin/evals/datasets/{id}/items/{item} Archives a dataset item; earlier versions stay readable with as_of
DELETE /api/v1/admin/evals/evaluators/{id} Deletes a judge; past runs keep their snapshot of it
GET /api/v1/admin/evals/runs Lists the experiment runs with progress, tokens, latency, score averages and, for categorical scores, the count of each label (score_aggregates.<name>.labels)
GET /api/v1/admin/evals/compare Puts 2 to 5 runs of one dataset side by side against a baseline, with item and score filters, tokens and cost
DELETE /api/v1/admin/evals/queues/{id} Hides an annotation queue; the scores it produced stay on their targets

m7gtwcontact@m7gtw.com