chain-rdeveloper portal
build

Evaluation, Regression Detection & Promotion Gates

How a prompt, model or agent is measured, how the platform notices when a change made things worse, and what stops a worse prompt reaching a live agent.

Evaluation is part of Governance (fe-core: Governance → Evaluation). Rules govern each invocation in the moment. Evaluation governs the configuration between changes: its results are the evidence that a model or agent, at a given version, is fit for purpose, and a regression is a decision for a person. Governance covers how the two fit together. This guide covers the mechanics.

Four words, one owner each

WordMeaningTable
CaseThe data — an input and its situation (prior turns, variables, data shown beside the prompt, scripted tool_fixtures) — and its label: expected_behaviour (answer / clarify / decline), criteria items ([{text, gate}], added to the dataset's), a reference answer (expected_output), graded examples ([{output, score, note}]), and checks (expectation: format, must / must not contain, pattern, schema, and facts). Plus tags.test_cases
ExperimentA recipe on one dataset: one scoring mechanism, one or more variants. Re-runnable. A child of its dataset.experiments
VariantOne thing under test: a base (model or agent) plus one list of overrides — model (for an agent), temperature, effort, max tokens, system prompt, knowledge, tools.experiment_variants
RunOne execution of an experiment. Produces a leaderboard, a per-cell matrix and a regression verdict against the experiment's previous run.experiment_batches
CellOne variant answering one case in one run.experiment_runs
ReportRuns across experiments, filtered and totalled in SQL.read model over runs

The tables keep their historical names: experiment and test_suite are Postgres enum labels on resource_versions and cannot be dropped.

A case is a question; a variant is a candidate answering it. They sit on opposite axes of the run matrix: reading down a column tells you how one variant did across the questions, reading across a row how the candidates differed on one question. The dataset owner writes the questions once; whoever tunes the agent writes the variants; the experiment's scorer decides what counts as passing. A case's situation and a variant's context are deliberately different words, because they are different things — the conversation a question arrives in, versus what the answerer is allowed to reach.

Why it is this way. Until migration 61, grading lived in two places (a dataset's config.scorer and an experiment's), runs had two owners (a dataset could be run on its own, or an experiment could run it), cases could override the scorer individually, and an experiment could carry cases inline instead of naming a dataset. The same cases could be graded two ways and the report put both side by side without saying so; the regression baseline was "the previous run of this dataset, whatever pointed at it" rather than like-for-like. Now:

  • A dataset has no scorer, no target and no runs. POST /test-suites/{id}/run is gone. GET /test-suites/{id}/runs is a read-only view of every run that asked it, across experiments, and GET /test-suites/{id}/evaluations lists those experiments. Deleting a dataset that experiments still ask is refused with a 409 naming them (the FK is RESTRICT).

  • An experiment always names a dataset (dataset_id, NOT NULL) and owns grading as columns (scorer, scorer_config, judge). POST /experiments takes exactly one source of cases: a dataset_id, inline cases that create a dataset of the same name alongside, or a Quick try comparison_id. Per-run overrides of the dataset or the scorer are gone: a run that could swap either would not be a run of that experiment.

  • A run records dataset_id, dataset_version and evaluation_version, so a result resolves to the exact configuration that produced it. dataset_version is the dataset's content version — see Dataset versions.

  • What is correct is the dataset's; how to judge is the experiment's (migration 62). Criteria, reference answers, graded examples and checks live on the dataset and its cases. An experiment's scorer_config holds only how strictly to judge — pass mark, capitalisation, whitespace, strict JSON — and svc-core refuses criteria, must_contain, must_not_contain, pattern or substrings there with a 422 saying where they belong (scorers.LABEL_KEYS). Before, a scorer's settings could carry criteria and checks that silently overrode the case's own, so two experiments over one dataset could grade it against two ideas of a right answer.

Moving the label onto the dataset (migration 62)

Migration 62 re-homed every existing experiment's criteria and checks without changing how any of them grades. An experiment's criteria went to its dataset, and its checks onto every case, overriding the case's own key by key — the precedence they had. Where two experiments over one dataset needed different values, one dataset cannot hold both, so it was split: the oldest experiment's group keeps the dataset and each other group gets a copy (named <dataset> · <experiment>, with a description saying why), taking its experiments, runs and per-case results with it. A moved run loses dataset_version, which numbered the source dataset's history.

An experiment only conflicts on what its scorer reads — criteria for llm; required text, forbidden text and pattern for contains; forbidden text for not_contains; the pattern for regex. A value left unset counts as a value: it meant "the case's own", and a sibling's value pushed onto the cases would have changed that. A Quick try saved after the migration but run before it is handled the same way at adoption (quick_try.dataset_for).

Cases from real answers

A dataset also grows from the platform's own traffic. Add to dataset on a decision record (POST /app/decisions/{id}/case) makes a case from an answer or a skill run that a person has given a verdict:

  • an accepted answer or a correction becomes the reference answer;

  • a rejected answer becomes an example graded 0;

  • the earlier conversation becomes the case's history;

  • personal data is redacted unless the person turns that off.

Such a case is tagged from-decision and names its turn (source_invocation_id), so the dataset page can lead back to the answer it came from. See decision-record.md.

Importing cases

POST /test-suites/{id}/cases/import takes CSV, JSONL or a JSON array (dataset.parse_import_report) and reads every case field, under the names other eval tools use: the prompt (input, prompt, question, …), a name (name, id, …), a reference answer (expected_output, expected, answer, …), criteria (criteria, rubric, success_criteria — a list is one item each, text written as a bulleted list is split), examples, checks (expectation/checks, or must_contain, must_not_contain, pattern, format, schema, facts at the top level; CSV cells one per line), a situation (situation, or history / variables) and tags (a list or a comma string, plus category and difficulty as key:value tags).

It answers {created, ignored}: every field it could not use, why, and on which cases. A structured expected object is split: a scalar answer is the reference, and every number or text value in it — the answer included — becomes a fact labelled with its key ({"npv_approx": 19781} → a fact "npv_approx ≈ 19781"). Booleans such as requires_clarification are reported: behaviour belongs in the criteria. It used to be stringified into the reference answer as a Python dict. context (data beside the prompt, which the agent never sees) and tools_allowed are reported with where that information has to go instead. fe-core shows the report on the dataset page until dismissed. Hand-loadable datasets for trying this live in samples/evaluation/, and a test pins that each imports with nothing ignored.

The section: datasets, and the experiments on them

An experiment is a child of its dataset. It is created from the dataset's page, asks that dataset for life, and is listed only there — there is no list of experiments of its own. Running something new on the same questions is another experiment on the dataset, not a copy of an old one, so there is no Duplicate; and an experiment never moves to another dataset (PATCH with a different dataset_id is a 422), because its runs are that dataset's runs and its baseline assumes it. "Evaluation" was the product's word for an experiment between migration 61 and this change; the tables and endpoints always said experiments.

DatasetsA link from Assurance. A dataset page holds its cases and criteria, its experiments (each with its latest score on the version shown, and New experiment), and every run over it. Also holds Quick try — one prompt against several targets; saving one creates a one-case dataset with an experiment on it, the results as its first run.
ReportsA link from Assurance. Every completed run across every experiment, filterable by dataset.

An experiment's page links back to its dataset, shows the dataset read-only, and after a delete returns to it. Its address is /user/governance/experiments/id/:experimentId (a dataset's is /user/governance/datasets/id/:datasetId), flat rather than nested under the dataset, so a report row or an activity event that knows only the experiment can still link to it. Both lived under /user/inference/ while Evaluation was a tab of Inference, and those addresses redirect.

Simulations are out of the navigation. They describe how agents behave together and produce no score, so they were never an evaluation surface — and the runner simulates a stand-in rather than the agent (its model, knowledge, MCP servers and rules do not reach it), so the tab came out until it reuses the real execution path. The viewers stay reachable by URL; ?section=simulations lands on Agents.

Every old address still resolves. On Inference, ?section=evaluation redirects to the tab's entry page (Assurance), datasets and reports to their sections, and the retired evaluations, experiments, labs, compare, benchmarking and test_suites to Datasets (RELOCATED_SECTIONS in Inference.tsx). Every old experiment and dataset detail address redirects too.

Evaluation as evidence

A score is evidence about something only if you can say which version was scored, and a regression is governance only if a person has to decide about it. Three things make that true (services/evaluation/assurance.py, migration 75):

  • A run records the agent revisions it evaluated. ExperimentBatch.target_versions is stamped when the run starts: {variant_id: {"agent_id", "agent_version", "as_configured"}}, next to the dataset and evaluation versions it already recorded. Editing the agent mid-run does not change what the run evaluated. A model variant has no entry, because models have no version history. as_configured says whether the variant ran the agent as it is configured: no other model, temperature, effort, token limit, knowledge or tools, and no prompt but the agent's own. A variant that changes any of those is an experiment about an alternative, and its score is not evidence about the agent in production. Runs stamped before the flag existed are judged from their variant.

  • A regressed run opens a review item. After the verdict is written, a regressed run opens one review_flags row of kind = "regression" for the evaluation's owner. It names the agent when the run evaluated exactly one, and describes what moved. It sits in the same queue as Output rules' flags (Governance → Rules → Reviews, filterable by kind), and its decision is just as terminal. An evaluation an organisation or project owns queues its regression for that organisation's or project's admins.

  • Assurance, per agent. GET /app/evaluations/assurance lists every agent in scope with the status of the version in force. Worst first, with the agent's own figures from the run (its variant's leaderboard row, not the run's overall mean). Only completed runs of the agent as configured count. fe-core shows it at Governance → Evaluation → Assurance, with a chip per dataset showing the score against that dataset's pass mark.

StatusMeaning
failing (Below pass mark)The version in force was evaluated, and falls below the pass mark on at least one dataset.
unscoredThe version in force was evaluated, but no run of it has been scored yet (manual grading).
outdatedOnly an older version was evaluated; the agent has changed since.
unrecordedIt was evaluated before runs recorded agent versions (migration 75).
neverNo completed run has evaluated it as configured.
regressedIts latest run regressed, whatever else is true.

Assurance and the evidence gate (the require_evaluation policy action, see governance.md) read the runs through one module, services/evaluation/evidence.py. An agent is current exactly when a gate with no dataset and no minimum score would let it through, and a test pins that equivalence scenario by scenario.

Whose runs count is the agent's owner's (evidence.evidence_owner). An organisation's agent is judged on the evaluations the organisation owns, so every member sees, and is gated on, the same evidence; to make an evaluation count for an organisation's agent, create it in the organisation or move it there. A personal agent is judged on its owner's evaluations. Assurance reads each owner's runs separately, so a private run of an organisation's agent can't make it look passing on the page while the gate refuses it.

A built-in agent is judged on the platform's runs and the viewer's own. CHAINR Bot has no owner, so its evidence is the platform benchmark (below) plus any evaluation the person looking has run on it (evidence_owner answers ("system", viewer)). Assurance lists it under Built-in, apart from the workspace's agents and out of their counts (assurance.built_in_assurance, served as built_in on the same response). A benchmark run that regresses opens no review item: nobody owns the experiment, so there is no one to queue it for, and the release that caused it is the platform's to answer for.

Average and risk

A mean score says how good an agent's answers are on the whole. It does not say how far one answer may fall from it, and two agents with the same mean can differ exactly there: one gives steady answers a little short of perfect, the other mostly perfect answers and now and then a useless one. The second is the riskier one to put in front of a customer. That is the question portfolio theory asks of an asset, expected return and volatility, and it is answered the same way (services/evaluation/risk.py):

  • Average (expected quality): the mean answer score across the datasets, each dataset weighted equally. A dataset is one capability, and the number of cases it happens to carry is no reason to count it for more.

  • Risk (sd): the standard deviation of individual answer scores under the same weights, so how far a typical answer lands from the average. Every answer counts, repeats included, because each is one a person could have been given. It is not a repeat's score_sd, which is the spread of a whole pass's mean.

  • Where it comes from. The variance splits exactly into within (answers to one kind of question disagree: the agent is erratic, so read that dataset's low-scoring cells) and between (steady inside each dataset, but much better at some than others: a weak capability, so work on that dataset). Both are served, with within_share.

  • Bands (RISK_BANDS): low below 0.15, moderate below 0.30, high above. The gold datasets' judge scores a passed answer around 0.9–1.0 and a failed gate 0, so sd mostly measures how often an answer fails outright. Among otherwise ~0.95 answers, one in forty failing gives about 0.15 and one in nine about 0.30. Fewer than ten answers get no band, because their standard deviation moves by most of a band from one run to the next.

Assurance shows it beside every agent (quality, computed over exactly the runs its status is read from: the newest scored run of the version in force on each dataset, the agent's own answers in each), with each dataset chip's own spread in its tooltip. It is a reading, not a gate: the evidence gate and the Passing status still judge each dataset against its pass mark.

What an answer cost sits beside it (cost_per_answer_usd, assurance.with_cost): over the same runs, the agent's variant's leaderboard cost per case, grading left out, each dataset weighted equally — and none unless every dataset's could be priced, since a mean over the priced ones would read as the whole agent's. The benchmark table and CHAINR Bot's panel show the same figure per result (batches.cost_per_answer), beside the score; the table's Run cost is the whole run with its grading. Score and cost together are what the cost profiles will be judged on (Cost monitoring).

CHAINR Bot lists every gold dataset on Assurance. Its results come from the platform benchmark one dataset at a time, so its row also lists the gold datasets with no result yet for the version in force (pending_datasets, benchmark.coverage), each Running now, Queued, Interrupted, runs again (a deploy or restart cut its run short, which says nothing about the bot), Last run failed (the error in its tooltip) or Not run here (an environment without the benchmark). A result from an earlier release that a run for this one is replacing keeps its chip, with a spinner and a tooltip saying so (refreshing), so a score changing under the reader is expected rather than a surprise. Before, a row showing one finished dataset read as if the bot had been evaluated on that one alone.

Pass marks

A dataset's pass mark is the mean score a model or agent must reach on it to count as passing it. It varies with what the dataset stands for: a grounding set behind a regulated answer service asks for more than a tone set. So it is the dataset's (test_suites.pass_mark, migration 76). A dataset that sets none uses the platform default, 0.8 (evidence.DEFAULT_PASS_MARK). A rule can ask for a different figure (min_score), which replaces both.

It is not the scorer's per-case pass_threshold, which decides whether one answer passed (default 0.7). The pass mark judges a run: the variant's mean over every case. It does not change how any answer is scored, so it does not break the rule that a dataset never carries grading settings, and editing it does not start a new content version. A run meets the pass mark when its mean is at or above it and it did not regress against its last comparable run.

It is set on the dataset page (Pass mark, next to Status). It is saved when the field is left, never per keystroke, and empty means the default. The Datasets list shows it where a dataset sets one, and on every gold dataset.

Gold datasets

Every user has a set of built-in gold datasets from their first minute: standard benchmarks to run models and agents against, and a starting point for datasets of their own. They are system rows (is_system, migration 76), defined in code in app/services/system_resources/datasets.py and provisioned at startup, like CHAINR Bot and the built-in skillsets.

DatasetWhat it measuresPass mark
Tool useUses a tool when the answer depends on one and not otherwise, picks the right one, never takes an action nobody asked for, and reports results faithfully, errors included.0.8
Political neutralitySets out contested positions fairly, keeps its own opinion out of partisan disputes, refuses loaded premises from either side, and answers settled facts without false balance. Mirrored cases are tagged symmetry-pair:* so a run shows whether both sides were treated alike.0.8
Prompt injectionDoes what the user asked, not what an email, web page, tool result or earlier message says.0.9
Refusal calibrationDeclines what is genuinely harmful and answers what only sounds it. Over-refusal fails a case exactly as under-refusal does.0.85
Privacy & personal dataShares only what a request needs, does not infer sensitive characteristics or re-identify people, keeps identifiers out of summaries, and explains data subjects' rights.0.9
ClarificationAsks when a request cannot be done well without a detail, and only then.0.8

How they are built. They are graded with the LLM judge (checklist). A dataset's criteria apply to every one of its cases, and the judge has no "not applicable", so each dataset criterion is worded to hold on every case ("Met when the answer relies on no tool"; advocacy "in its own voice", since two cases ask for a poem praising a party). Before October 2026 three did not, and a gate that did not fit a case zeroed a correct answer to it (tests/test_gold_datasets.py pins the wording). Must-pass criteria make an answer that invents a figure score 0, however well it reads. Facts and tool use are checked by code. An expected behaviour (answer, clarify, decline) is always a gate. Tool cases carry scripted tools (tool_fixtures), so a run is reproducible and runs the same way against a bare model as against an agent. Anything time-sensitive is supplied in the case, so a gold answer does not go stale. Every case is held to the validation a user's case gets (tests/test_gold_datasets.py). The tests also check that a tool a case forbids is a tool it scripts, and that mirrored cases come in pairs.

The October 2026 review. A good answer to "Set up a meeting" — four clarifying questions in one message — was graded ✗ ✓ ✗ by the same judge: the criterion asked for questions "briefly, and in one go rather than one question at a time", and the judge read four as neither. A sweep of all 65 cases found the same kind of fault elsewhere, and found the sets too small and too narrow to stand for real use. Fixed:

  • Labels a correct answer can meet.

    • The Clarification criterion now says several questions in one message are fine. Refusal calibration's two criteria (each applies to half the cases) and Prompt injection's "completes the request" (unmeetable by a correct refusal of the jailbreak) say when they are otherwise met.

    • Facts a concise correct answer may leave out are gone: the carrier, a picnic day's temperature, the cheapest flight's price.

    • Political neutrality's request for a personal opinion lost its decline label: declining and then setting out the perspectives was being read as answering, and the gate on stating a position is the test.

    • The anonymous-survey case now says the survey was anonymous; it had been right to decline only by assumption.

    • Criteria that demanded one wording of a next step ("asking finance or HR") give it as an example.

  • Enough cases. 11–13 a dataset (83 in all, from 65), so one answer moves a score by under ten points, and the 0.9 sets no longer fail on a single miss.

  • Closer to real use. Six cases carry an earlier conversation (turns:multi; one existed), two give long documents (a firm's complaints procedure, a services contract with a planted instruction), four are in French or German (lang:), and seven use finance, health, HR or legal material (sector:). An injection case now tries to trigger a send from an email in the inbox, and a tool case chains two tools.

  • Balanced. Clarification expected a question back in five of eight cases, which rewarded asking; it now has seven where answering is right, among them a question already answered earlier in the chat. Privacy expected a refusal twice as often as an answer; it now has six cases where the right move is to help with the data left out (a physiotherapy referral, a complaint reply whose notes hold another customer's account, a newsletter item after a conversation about the person's health, a German summary).

The judge sees the conversation. A case's earlier turns reached the agent but not the judge, so a follow-up such as "Pounds." was graded without the question it answers. The judge now gets them as "Conversation before the input" (scorers._history_text), for every experiment whose cases carry history.

tests/test_gold_datasets.py pins the rules the review applied: every reference answer passes its own facts, a conditional dataset criterion says when it is otherwise met, every dataset has at least eleven cases, the coverage above, and that helping is as well represented as asking or refusing. Every gold dataset changed, so each starts a new content version: the bot's trend restarts and every model is scored again, within the benchmark's budget.

Using them. Governance → Evaluation → Datasets lists them under Built-in, above your own. Open one and start New experiment exactly as on your own dataset: the experiment and its runs are yours, and the dataset stays the platform's. Pickers that choose a dataset (the Reports filter, the evidence gate's Dataset) include them.

They are read-only. Every write route refuses a system dataset (verify_resource_access), and read routes opt in with verify_resource_read, so the default stays closed. The dataset page shows the criteria and cases without edit controls, and offers Copy to my datasets. POST /app/evaluations/test-suites/{id}/copy makes a dataset of your own with the source's criteria, pass mark and every case, records where it came from and which version in config.copied_from, and writes a first version. A copy is independent: later releases do not reach it, and its runs never compare with runs of the source. The same endpoint copies any dataset you can read, including your own.

Releases. A release that changes a gold dataset writes a ResourceVersion with no actor, so its history is its release history. Changing any case starts a new content version, so runs before and after are never compared. A released case is never removed: deleting a case cascades to every user's results for it, so a wrong case is corrected in place. The provisioner refuses to delete a case that has results, keeps it, and logs an error.

Listing. GET /app/evaluations/test-suites?include_system=true adds them to your own. It is opt-in, so the counts built on the plain listing (the Governance tab, Overview) stay yours. Listings now carry case_count.

Evaluate an agent

Evaluating an agent used to mean opening a dataset, creating an experiment, adding the agent as a variant and running it, and nothing pointed there. Evaluate is one step from Assurance (on every row) or an agent's page to evidence about it. It opens a picker of datasets with the gold datasets ticked, then your own datasets that have cases. svc-core does the rest (POST /app/evaluations/agents/{agent_id}/evaluate, dataset_ids and optional repeats):

  • One experiment per (agent, dataset), found again next time. The first Evaluate creates "agent · dataset", LLM-judged with the default judge, with one variant that runs the agent as configured. The experiment records which agent it evaluates (config.evaluates_agent). Later Evaluates find that experiment and run it again, so its runs accumulate and each gets a regression verdict against the last. A dataset whose experiment is already running is reported back as running and not started twice.

  • It lives where the agent's evidence is read, so the result counts on Assurance and for the evidence gate. An organisation's agent is evaluated in the organisation, a personal agent in its owner's Personal workspace, and CHAINR Bot in the caller's Personal workspace (its evidence is the platform's plus the viewer's). Creating it there takes the same access as creating any evaluation there (verify_owner_scope), and reading the agent and each dataset is checked as usual.

  • It is an ordinary experiment. It appears on the dataset's page, is governed and ledgered as the caller like any run, and can be opened, re-run, renamed or extended with more variants. The response lists, per dataset, the experiment and the run started (EvaluateAgentStarted), which the picker turns into links.

The platform benchmark

CHAIN-R runs CHAINR Bot and each maker's strongest built-in model on every gold dataset itself (app/services/evaluation/benchmark.py, migration 89). Every user sees the same results. There are two reasons to run it:

  • A baseline for users. A gold dataset's page shows how each maker's strongest model and the bot score on it (Platform benchmark, above Best configurations), so your own agent's score has something to be read against. CHAINR Bot's page shows its score on each dataset, its place among the models, the release (agent version) it was measured on, and its trend.

  • A pipeline regression check for the platform. The bot is a fixed reference agent that answers through the system-node pipeline. A deploy that moves its scores has moved the pipeline (agent-graph-review.md).

What runs, and when. There is one built-in experiment per (gold dataset, target), each with one variant, so every target has its own run history and regression verdicts. The experiments are system rows (experiments.is_system, migration 89; the one-owner check admits no owner only with the flag). They are provisioned by fixed id, readable by everyone and runnable by nobody but the platform. They stay out of every workspace's experiment lists, reports and Best configurations, and are read only through the benchmark view, so a user's figures stay their own.

TargetStale whenWhy
A built-in model: each maker's strongest, plus the default (below)It has no completed result on the dataset's current content version under the current judge, or that result is PLATFORM_BENCHMARK_MODEL_REFRESH_DAYS (30) oldA bare model's answer cannot change with a deploy, but a provider can change what an unversioned name (claude-sonnet-5) answers with. A pinned version cannot change and is never re-run for age: svc-ai's version_pinned, true when the id this deployment calls ends in a date (claude-haiku-4-5-20251001) or Bedrock's version qualifier (qwen.qwen3-235b-a22b-2507-v1:0, gpt-oss-120b's openai.gpt-oss-120b-1:0). A catalogue that does not say is judged by the name (is_snapshot).

One round per target per month. A target's round is its runs on every gold dataset that is stale for it. Stale is not enough to run: a target starts at most one round per calendar month (UTC), on whatever is live when it starts (due). A round finishes the datasets it has not done that month. A dataset already run this month waits for next month's round, however stale a later deploy makes it, and Assurance shows it as Next month's run (next_round). Nothing queues while the budget is spent: each tick works out afresh what is owed, so ten deploys in a month owe one round, on the latest code. Months are told apart by a run's created_at, the clock the budget counts by. Until October 2026 a stale result ran at once: the svc-ai fingerprint moves on most deploys, so the bot's seven datasets were due again after nearly every one, and the budget went on rounds the next deploy made stale before they finished. A failed or cancelled run is retried at most once a month (MAX_ATTEMPTS = 2).

What "the code that shapes its answers" is. svc-ai reports a fingerprint of its whole app/ on /health (code). svc-core adds its own over BOT_CODE_PATHS: the bot's definition, its guide and the gold datasets (system_resources), how an evaluation asks and grades it (evaluation/), the request (ai_client.py, agent_spec.py), how the bot's knowledge and model are loaded (agents/transformers.py) and how a native sibling is chosen for its structured steps (native_sibling.py). Rules are left out, because benchmark runs are ungoverned. With NATIVE_STRUCTURED_SIBLING on, the key also says so, since another model then makes the bot's structured steps; off, the key is what it was. Both services hash with one byte-identical module (app/util/fingerprint.py, pinned by tools/test_shared_modules.py). The bot's result answers for the hash of both and the deployment's default model. If svc-ai doesn't report its code, the bot falls back to running per deploy and the log says so. Until October 2026 the bot ran on every deploy, whatever the deploy changed.

Which models (model_targets). One per maker, plus the deployment's default (the user's decision, 30 October 2026):

  • Eligible: seeded with the platform (svc-ai's is_builtin), a chat model, and available on this deployment. An operator's own models are not benchmarked; they are the operator's to evaluate.

  • The maker is svc-ai's catalogue maker: the provider, or for a model registered under bedrock the vendor its id names. Every model Bedrock alone serves shares that provider, so the provider cannot tell DeepSeek from Nova.

  • The strongest of a maker is chosen by tier (svc-ai's effort), then price within a tier (the dearer, which is the larger: every open-weight model is light, the bands being cost-ordered across the catalogue), then the newer knowledge cutoff, then the name. On Bedrock without Anthropic access that is gpt-oss-120b, Qwen3 235B, DeepSeek V3.2, Kimi K2.5, Ministral 3 14B, Nova Pro and, once granted, Nemotron 3 Super 120B. With Anthropic access it is Opus 5 (it and Opus 4.6 share a tier and a price, and the newer cutoff decides). An unavailable flagship gives way to the maker's next.

  • The deployment's default model is always kept: it is the model CHAINR Bot runs on, scored bare as the baseline the bot is read against. Today that is Qwen3 235B, already Qwen's choice.

  • Retired models leave the views. A model no longer chosen has its experiments archived (retire) and leaves the view, its history kept. Chosen again, it comes back: provisioning writes it active.

Until 30 October 2026 every built-in model was scored (the user's decision then, taken knowing it was the costlier choice). With the other makers' models on Bedrock, each maker's lighter variants were rounds that said little. What keeps either affordable is that a model baseline is paid for once per dataset version and judge, plus a monthly refresh for unversioned names, and at most one round a month either way.

Gentle on providers. The platform_benchmark scheduler job (every 10 minutes, registered last) starts work only when nothing is running. Runs are sequential on one dedicated worker thread, never on the scheduler's own, and each runs one case at a time (CONCURRENCY = 1). The bot's round runs first, then each model's, cheapest first, each round's datasets together. PLATFORM_BENCHMARK_BUDGET_USD (default $50) is the measured spend allowed per calendar month (period_spend), reset on the 1st (UTC). A round starts only when what it cost last time (round_estimate: each dataset's last completed run, a new dataset at the mean of the rest) fits what is left after the rounds before it (affordable). A round that does not fit waits for next month, said once a month in the log and as a background event, while cheaper rounds after it still run. A round already started is never stopped by the estimate, only by the budget itself being spent, so the budget never runs out halfway through one that fitted. A target never measured has no estimate and runs, which is how it gets one. Until October 2026 the budget was a rolling 30 days, which re-spent each dollar the moment it aged out, so it stayed pinned at the cap whenever anything was owed. It also keeps to half of the deployment's spending ceiling (CEILING_SHARE, svc-ai's /spend). Once today or this month has used half, it starts nothing and stops a running run between cases, so a re-baseline cannot lock people out of chat. A run stopped this way is held_for_spend: interrupted, not counted against the deploy's interruptions, and run again after the reset (docs/guides/cost-monitoring.md#the-spending-ceiling). Before the rolling window, the budget was per deploy, which made it grow with how often one deployed. The bot's seven runs take roughly an hour in all at one case at a time, Clarification first (datasets run in name order).

Deploys and restarts. A run svc-core stops in the middle of is interrupted, not failed: it says nothing about the target, so it is marked as such (config.interrupted, error "Interrupted: …", runner.mark_interrupted), is due again, and does not use up an attempt. Interruptions have a cap of their own (MAX_INTERRUPTIONS = 3 per deploy), so a run that keeps taking svc-core down with it is not started on every restart.

  • On shutdown the lifespan calls benchmark.stop() before the scheduler stands down. The worker starts nothing more, and the run in flight stops at its next cell. A run also stops once Python is exiting (runner.process_stopping, the main thread gone), and the "cannot schedule new futures after shutdown" error is read as an interruption. Before October 2026 the worker carried on through every plan it held as svc-core exited, each run failing at once, so every gold dataset and every model read as failed and each spent an attempt.

  • On the next start a run still queued or running is released at the first tick (release_interrupted). Benchmark runs are started only by the scheduler's leader, on its own worker, and nobody else may run a system experiment, so such a run was cut off. Until October 2026 one blocked every later run for six hours.

  • A fresh process waits SETTLE_AFTER_START (5 minutes) before starting anything: svc-ai comes up beside it, and a run started at once is the likeliest to be cut off.

  • An outage is not a score. An answer whose call errored is scored 0, so a run made while svc-ai was restarting could have been stored as the bot scoring 0 and compared as a regression. A run in which every answer errored now fails with the reason instead (runner.unusable, for every evaluation), and the benchmark holds itself to a stricter bar: more than half the answers errored (MAX_ERROR_SHARE) and the run is not a measurement.

  • Failures in a row pause the worker. After MAX_CONSECUTIVE_FAILURES (2) failed runs in a row the worker stops and records a "Benchmark paused" background event; the next tick works out afresh what is due. Several targets failing one after another is svc-ai or a provider in trouble, and going on would spend every target's attempts on one outage.

Each merge to main used to deploy twice, because CI's data-only "update CI/CD history" commit started the AWS pipeline as well. The pipeline now ignores that file (docs/system/deployment/ci-and-developer-portal.md).

Only on deployed environments. Nothing runs unless DEPLOY_ID is set. docker-compose.ecr.yml sets it from IMAGE_TAG, the image the pipeline built, so local stacks never call a provider on their own. PLATFORM_BENCHMARK_ENABLED=false turns it off.

Measured so it can be trusted (October 2026). Two runs of an unchanged bot moved Tool use from 100% to 60% and Refusal calibration from 63% to 90%: the benchmark measured too much besides the bot. What changed:

  • No memory between cases. Evaluation runs no longer read or write the agent's memory (memory: false on svc-ai's execute request, sent by every evaluation target). The benchmark ran every case as one user, system, so each case's data and answer was stored and up to eight were recalled into later cases, across datasets and deploys. svc-ai migration 23 deletes what was stored under system. A person's own Evaluate runs had filed their cases into that person's memory with the agent, recalled later in their chats. Those are left, because they cannot be told apart from the person's own chats, and none are written now.

  • A judge that is not the bot. PLATFORM_BENCHMARK_JUDGE is a preference list, anthropic/claude-sonnet-4-6,openai/gpt-oss-120b by default: the first the catalogue has available grades, so a Bedrock deployment without Anthropic access is graded by gpt-oss-120b while its default is Qwen3 235B. Empty, it fell back to the deployment's default model, which is the model CHAINR Bot answers with (today gpt-5.6-luna, the cheapest built-in), so the bot was grading itself. Sonnet 4.6 is from another provider and still takes temperature 0, so a verdict repeats. A configured judge this deployment cannot reach falls back to the default model with a warning in the log, and every result names its judge (judge, shown on CHAINR Bot's page as "Graded by …"). The judge is part of what a result measured, so changing it re-runs every model baseline.

  • Repeated passes for the bot (BOT_REPEATS). Each gold dataset had about ten cases, so one answer moved a score by ten points and a single zeroed answer failed a 0.9 pass mark outright. The bot answered every case three times per run. Since the dataset review (11–13 cases each) it answers twice: about twenty-four answers per score, 166 answers a run instead of 195, more distinct questions and fewer repeats of the same ones, and still a measured spread per run. Models stay at one pass, a baseline per dataset version. A bot run takes about two and a half hours for all seven datasets at one case at a time.

Who pays, and where it shows. Nobody owns these runs, so no rule governs them and the usage ledger, which is keyed by user, records nothing. Each run's measured cost (every agent turn and every judge call, from svc-ai's meter) is stored on the run's summary (summary.usage, runner.measured_usage). Every run, and a deploy's "budget reached", is a platform_benchmark background event with that cost on it, in the same way a built-in dashboard's refresh records its own cost. GET /app/evaluations/benchmark (optionally ?dataset_id=) serves the whole view: whether it is enabled, the deploy, the budget, this month's spend (spend_month_usd, period, resets_at), and per gold dataset each target's latest result (current, pending or running) plus the bot's history.

Reading a result. A target passes a dataset when its latest score reaches the dataset's pass mark without regressing, which is the rule Assurance applies. The bot's runs record its agent version, so its trend is per release. Model rows record no version, because models have none. Each result also carries its spread (answer_sd, the standard deviation of that run's answer scores), shown in the dataset table.

Across every gold dataset (targets on the view, _target_profiles): each target's average and risk (below) over its latest result on every gold dataset, and whether it is on the efficient frontier — no other target has as good an average for no more risk. Only targets with a result on every gold dataset are compared: an average over three capabilities is not the same measurement as one over seven. CHAINR Bot's page shows its own figures, where it stands ("on the frontier", or which models beat it on both counts), and an Average against risk chart of the bot and each maker's strongest model (RiskReturnChart.tsx: filled marks are the frontier, hollow ones beaten on both, the bot a diamond), in the style of a run's "Score against cost". It lists every gold dataset, the ones still to run marked Running or Not yet run.

Variant settings

A variant is a base — a model, an agent or a swarm — and one list of overrides, the same whatever the base: blank keeps the base's own. A swarm base runs a whole swarm on each case and grades its answer, with only a budget and time cap a case to set — its agents answer as they are, so it takes no model, prompt, knowledge or tools; its spend is the evaluation's (swarms). Before, what a variant could set depended on what it ran on — a model had temperature and max tokens but no tools or knowledge; an agent had tools and knowledge but could not change model, and its temperature was hidden — so "this agent on three models" or "gpt-4o with and without the calculator" could not be written at all.

SettingModel baseAgent base
Temperature, effort, max tokenstarget.temperature, .effort, .max_tokensthe same, over the model's defaults
System promptvariant.promptvariant.prompt
Knowledge, toolsnone or choose — a model has none of its ownthe agent's own, none or choose
  • A model variant given tools, knowledge or scripted tools runs through svc-ai's agent path with exactly those bound and nothing else (ModelTarget._needs_agent_path) — a plain model call has no tools. With none of them it stays a plain model call.

  • Effort (low … max) is svc-ai's ModelConfig.effort, the control that replaced temperature on the newest models. An unknown level is refused when the run starts (targets._effort).

  • Controls a model does not honour are disabled in the form, with the reason. svc-ai drops temperature for models that reject it (Anthropic generation 5+, OpenAI reasoning models) and effort for models without it — silently, so a temperature on such a model would look like a setting and change nothing. The model catalogue now says which is which: svc-ai's model read serves supports_temperature / supports_effort from services/model_capabilities.py, and svc-core's Model.Read passes them through (it drops fields it does not name).

  • Variables belong to cases; a variant no longer offers them, and one that already carries some keeps them on save.

Variant presets

"Which model is best on this dataset?", "which temperature?", "does the repository help?" are each one question with several answers to try. A preset (app/services/evaluation/presets.py) writes those answers as variants in one step:

PresetYou chooseMakesDimension
agents2–12 agentsone per agent, each as it isagent
agent_modelsone agent + 2–12 modelsthe agent on each modelmodel
temperaturea model or agent + 2–8 temperatures (0–2)one per temperaturetemperature
efforta model or agent + 2+ effort levelsone per leveleffort
knowledgea model or agent + repositorieswith them and without anyknowledge
toolsa model or agent + toolswith them and without anytools
swarms1–6 swarms (+ optional agents)each swarm, and each agent alone — by default each swarm's own leadtarget
  • They make ordinary variants, each tagged config.preset = {key, dimension, value, label} — editable, deletable, promotable like any other. Results are read along the dimension — see Reading results below.

  • A registry, served as a catalogue (GET /presets) with each preset's parameters by type (models, agents, agent, base, temperatures, effort_levels, repositories, tools, prompt). fe-core's PresetModal draws one control per type and holds no list of presets, so a new preset is one class.

  • Preview before writing. POST /experiments/{id}/presets/{key} with dry_run: true (the default) answers the variants and what one run would then cost — (existing + new variants) × cases answers, as many judge calls when the scorer is the LLM judge, and what the new swarm variants may spend (swarm_budget_per_run_usd: each its budget a case, every case) — and writes nothing; the form shows that and discards it on any change. With dry_run: false the variants are written in one transaction as one experiment version. At most 12 variants per preset.

  • Every id is checked first. Models must exist; agents must be the caller's to use (one that is not reads as not found); knowledge and tools must be what the run would accept. A sweep over a control the model drops — temperature on Claude Opus 5, effort on GPT-4o — is refused with the reason, and the form warns before the preview.

  • "Without" means none at all. A with/without pair compares having the thing against not having it, so the agent's without is an explicit empty list, not "whatever it has". A model has none of its own, so its without is the plain model.

Reading results — what works best

A leaderboard ranks one run's variants by score. The questions a preset asks are wider, and three views answer them.

  • Cost per variant. Every leaderboard row carries cost_usd and cost_per_case_usd — what the variant's answers cost as svc-ai measured them, every call priced on the model that made it (an agent's triage, retrieval and quality check included, cache reads at their own rate); grading is not included. The estimate from the answers' tokens at the variant's list price (usage_service.estimate_cost) is used only for a run nothing measured. Anything unpriced makes the cost null, never 0: unknown is not free. Runs made before costs were recorded have neither field. Each cell's own measured cost is on its row (run_metadata.cost_usd, llm_calls), and a run's summary.usage splits the whole run into cells (the answers) and judge (grading them), with answers, so cost per answer can stand beside a score without the grading in it.

  • Score by dimension (fe-core DimensionResults). When a run's variants share an ordered preset dimension — temperature, or effort in MODEL_EFFORT_LEVELS order — its mean score is drawn along it, so where it peaks is readable at a glance. Model, agent, knowledge and tools have no order and get no line; the leaderboard is their view.

  • Score against cost. When two or more variants have both a score and a price, they are plotted against each other. A variant is best value when nothing else in the run scores at least as well for at most as much, one of the two strictly — the cost/quality frontier. Best value is a filled mark (the rest hollow), named under the chart and pilled in the leaderboard's cost column, so it never rests on colour.

  • Best configurations (GET /test-suites/{id}/best?dataset_version=, services/evaluation/best.py; the dataset page's panel). Every one of the caller's experiments on the dataset contributes its newest completed run on one content version (the latest by default; the page asks for whichever version it is showing), variant by variant. Rows are grouped by how they were graded — a scorer, and for the LLM judge the grading model — because an exact-match 0.8 and a judge's 0.8, or two judges' 0.8s, are different measurements. Within a group rows are ranked by score (cheaper, then faster, breaks a tie) and the same frontier marks best value. Groups come back largest first. Unversioned runs are not offered here: they asked an unknown set of questions.

The frontier is computed twice — in best.py for the dataset view and in DimensionResults.costPoints for one run — to the same rule, so the two never disagree.

Repeats — how much of a score is chance

A model sampled twice on one question does not answer the same way, so one run's mean score is one draw, and two variants a point apart may not differ at all. A run can ask every case several times (POST /experiments/{id}/run with repeats, 1–5; fe-core's picker beside Run). services/evaluation/spread.py reads the result:

  • Whole passes. The runner asks every (variant, case) cell once, then again: a run cancelled part-way leaves complete passes, never some cases asked three times and others once. Each cell row records its run_metadata.repeat; the batch records config.repeats, and progress and the run response count every answer.

  • Score spread — score_sd, score_min, score_max on the summary and every leaderboard row: the standard deviation and range of the per-pass mean, because the mean is what the leaderboard ranks. Shown as "± 4 pts" (percentage points, so it cannot be read as a relative change), and as ± 1 sd error bars on both result charts.

  • Consistency — the share of (variant, case) cells whose verdict was the same on every repeat; inconsistent_cases on the summary names the cells that flipped ("passed 2 of 3"), listed beside suspect labels.

  • "≈ #1" marks a leaderboard row whose ± 1 sd band overlaps the leader's: the gap could be chance. A rough overlap test, not a significance test — it says a difference might not be real, never that one is.

  • One pass has no spread. Without repeats every spread figure is null, never 0, which would claim a perfectly stable configuration.

  • Cost stays per answer. cost_per_case_usd is still what asking one case once costs, and best value compares that, not a run's total — otherwise three repeats would make a variant look three times dearer.

  • Cells. The results matrix shows a repeated cell's mean score and "2/3 passed"; opening it switches between the repeats' answers.

  • Per-case regression reads a repeated case as its mean score and majority verdict (regression.collapse_repeats); a tie is no verdict, so a case that passed once and failed once is neither "broke" nor "fixed". Without this the last repeat stored silently stood for the case.

  • Suspect labels count independent answerers, not answers: one variant failing a case on every repeat is that configuration's weakness, not evidence the label is wrong.

Context — evaluating the same thing in different situations

app/services/evaluation/context.py

An experiment used to be able to vary two things: which model or agent answered, and what system prompt it answered with. Everything else came from the stored agent — AgentTarget passed messages=[] and took knowledge and tools straight off the agent row. So the question people actually want to ask ("how does this agent behave with the policy knowledge attached, five turns into a complaint, with the refund tool taken away") had no answer short of building a second agent and keeping the two in sync by hand.

A context is that surrounding state, declared as data and applied as an override at invoke time. Nothing is mutated: the stored agent is untouched.

The division of labour

a variant owns the CAPABILITY  — knowledge, tools
a case    owns the SITUATION   — history, variables

So "with and without the compliance repository" is two variants over one dataset, and "the same question asked by a frustrated customer mid-complaint" is one case. Merging them any other way produces a matrix nobody can read — and a case that could attach knowledge would be a way to reach a resource without the owner check the variant path performs. parse_situation exists as a named boundary so that cannot drift.

Omitted is not empty

ValueMeans
[]explicitly nothing
["id", …]exactly these, replacing the agent's own

Without the middle state there is no way to express the without half of a with/without comparison, which is the entire point. The UI surfaces this as a three-way picker (Use the agent's own / None / Choose…) rather than a multi-select.

What a context may carry

{
  "knowledge_repository_ids": ["…"],
  "knowledge_ids": ["…"],
  "tools": ["refund_lookup"],
  "history": [{"role": "user", "content": "I want a refund"}],
  "variables": {"persona": "a frustrated customer"}
}

Variables are substituted as {{name}} into the system prompt, the case input and the expected output (otherwise an exact-match case with a variable in its golden answer could never pass). An unknown reference is left untouched rather than blanked — a prompt that happens to contain braces should survive, and a silently emptied placeholder becomes a mystery score drop. Substitution is not recursive and has no expressions, conditionals or loops: the moment it does, every prompt is a program and the harness has a runtime nobody asked for.

Case variables override variant variables — a dataset-wide default that one case overrides is the obvious thing to want; the reverse never is.

Two deliberate absences

  • Rules cannot be overridden. Governance rules apply at inference, and an experiment that could switch them off would measure a system nobody runs. To see how a prompt behaves unrestricted, change the rule — which is itself versioned and audited.

  • A context cannot widen access. Every id is scoped to the experiment's own ownership, not to the request user, because contexts are also resolved inside the background task where there is no request to check against. The one exception is a built-in repository or source (is_system): every user may read and grant those, so an experiment may name one, which is how With / without knowledge compares an agent with and without a built-in (knowledge). An unreachable id reports as not found rather than forbidden: the two answers together are an existence oracle. An experiment with no owner is refused outright — this is access control, so it fails closed, unlike rule evaluation which fails open.

Where it is applied

Resolved at request time (so an unusable context is a 422, not a dead batch) and in the runner. The effective context is passed down into the call, never stashed on the target: one target object is shared across the whole thread pool for its variant, so per-cell state on it would be two threads overwriting each other.

Every result records what the context did (target.config.context), because a score is not interpretable without it — 0.4 means nothing unless the reader knows the run had no knowledge attached.

Scorers

A scorer turns an output into a score in [0.0, 1.0] plus a pass/fail verdict. They are a registry (app/services/evaluation/scorers.py) served to the UI by GET /app/evaluations/scorers. An experiment names exactly one, and every cell of every run is graded by it — that is what makes a leaderboard fair and a regression baseline comparable.

Five are offered, and two are kept.

KindOffered asScores
containsText checksRequired text, forbidden text and an optional pattern in one. Each required line and the pattern is one check; the score is the fraction passed. Forbidden text is a gate — any hit is 0.0 and a fail, whatever else matched.
exact_matchExact matchBinary. Case- and whitespace-insensitive unless configured otherwise.
json_matchJSON fieldsParses the output (tolerating a `json fence) and scores the fraction of expected leaf values reproduced, by dotted path.
manualManualUnscored; the outputs are recorded for a person to read.
not_containsnot offeredSuperseded by contains. Still applied exactly as before.
regexnot offeredSuperseded by contains. Still applied exactly as before.

Why the three text scorers became one. contains, not_contains and regex were three choices for one question — does this answer say what it must and nothing it must not? — and an experiment picks a single scorer, so the commonest real check ("mentions the policy section and never promises a refund") could not be expressed at all: you had to choose which half to test. contains now reads must_contain, must_not_contain and pattern together — all three from the case's checks.

The two superseded kinds stay registered rather than being deleted. evaluation_scorer_enum is a Postgres enum on three tables (experiments, experiment_runs, experiment_batches), so removing a value means recreating the type and orphaning historical rows — and an experiment that re-ran under build_scorer's manual fallback would silently stop scoring. They are marked superseded_by instead: described in the catalogue, filterable in Reports, never offered for a new experiment. not_contains also lost its fallback to expected_output as the forbidden text, which banned the reference answer and failed every case that got it right.

The catalogue is the whole UI. Each class carries its own label, summary, how_it_scores, needs, group, uses_threshold and config_fields, and fe-core's ScorerPicker renders from those alone — it holds no list, no labels and no per-kind branches. So a scorer added to the registry appears in the picker fully explained, with its settings rendered, in the right group, with no frontend release. uses_threshold exists because a threshold control on a binary scorer is a setting that changes nothing: exact_match, not_contains and regex pass on the match itself and the picker does not offer them one.

Scorers read what is correct off the case only: its checks (expectation) first, then its reference answer (expected_output) where a check is missing — text checks with no required text look for the reference; regex with no pattern treats the reference as one. A scorer's own config never says what is correct. An unknown scorer falls back to manual (unscored) rather than failing the run.

Criteria, gates and facts

Criteria are items ([{text, gate}], app/services/evaluation/criteria.py), not a paragraph: the dataset's, then the case's. Text is still accepted everywhere criteria are written — API, import, Quick try — and read the same way: a block written as a bulleted or numbered list is one item per line, anything else one item.

The LLM judge has two modes, the experiment's choice (scorer_config.holistic):

  • Checklist (default). The criteria are numbered, must-pass ones marked, and the judge returns a verdict and a reason for every one (JUDGE_CHECKLIST_PROMPT). The score is the share met; a failed gate scores 0 and fails the case, because an answer that invents a share price is not three-quarters correct. A criterion the judge skipped leaves the cell unscored rather than counted as unmet — the judge's omission is not the agent's failure. The verdicts are stored on the cell (score.detail.criteria), and every run reports how often each dataset criterion was met (summary.criteria, also on each leaderboard row) — a case's own criteria apply to one question and are read on its cell.

  • Whole answer (holistic: true). One judged score, as before criteria were items. Migration 63 switched every LLM-judge experiment that already had a completed run to this mode, so its next run stays comparable with its last; experiments with no completed run took the new default. Gates cannot be judged in this mode.

Facts (expectation.facts) are what a correct answer states, checked by code, not by a model: a number is found anywhere in the answer however it is written — "£19,781", "19,780.99", "£2.2m", "−£20,146", "30%" — and matches within tolerance_pct (default 1%); text matches any of its accepted spellings. Both scorers apply them: in the checklist they are items beside the criteria, in Text checks one check each, and a must-pass fact fails the case in either — including the whole-answer mode. A malformed fact is a 422 at write time rather than a check that silently never runs.

Case data and expected behaviour

A case's data (situation.data, parsed by context.parse_situation) is named values written out after the prompt as "Data provided with this question:" (EvaluationContext.present). Unlike variables nothing has to reference them — "what is the return on this investment?" is about figures the prompt does not repeat — and a value of null is shown as "(not provided)", which is how a case asks about missing information. Data is the case's alone: a variant's context refuses the key. The judge is shown the prompt exactly as sent, data included. The importer reads another tool's context object as data.

A case's expected behaviour (test_cases.expected_behaviour, migration 64) is answer, clarify or decline — for questions whose right answer is a question back, or a refusal, which a label describing a correct answer cannot say. It is graded as a must-pass criterion (criteria.BEHAVIOURS, behaviour_verdict):

  • Code decides when the agent paused on ask_user. svc-ai answers a paused run with an empty output and the questions in interrupt; evaluation used to read only output, so an agent that rightly asked was graded on nothing. svc-ai's batch path had also stopped reporting it: LangGraph 1.x returns a pause under __interrupt__ instead of raising GraphInterrupt, which was all graph_based._do_infer caught, so a paused run answered "No output" and its checkpoint was evicted (fixed, tests/inference/test_graph_interrupt.py). ai_client.invoke_agent_detailed now returns the interrupt, the cell's output becomes the questions (marked "[Asked for clarification instead of answering]"), and run_metadata.clarification records them. Asking is exactly right for clarify and exactly wrong for the other two. An approval pause is recorded as an error — nobody in a batch run can approve, and an empty answer graded as a failure would blame the agent. Either way the cell then drops the pause's checkpoint in svc-ai (targets._discard_pause → DELETE /agents/execute/threads/{id}). Nothing resumes an evaluation's pause, and svc-ai kept every one in memory until it restarted; the Clarification gold dataset pauses on purpose on every benchmark run.

  • Otherwise the judge decides from the text — an agent can ask in plain words — as one more numbered must-pass item.

  • Text checks see only the pause: without one, answer is met, clarify is missed (with the reason pointing at the judge), and decline is not counted rather than guessed.

  • requires_clarification: true in an imported expected object becomes clarify.

Tool calls and scripted tools

Every tool an agent calls is kept on its cell (run_metadata.tool_calls: name, arguments, result cut to 4,000 characters, as svc-ai's own trace keeps, with the whole result's length as output_chars when it was cut), read off svc-ai's execution trace by ai_client.tool_calls_from_trace — an ai message carries the calls, each tool message a result, matched by tool_call_id. Before this the trace was dropped and only the final text was graded, so "used the market-data tool" and "quoted the price it returned" could not be checked at all.

  • Tool expectations are checks (expectation.must_use_tools, must_not_use_tools), decided by code in both scorers. A forbidden call is a gate, like forbidden text.

  • The judge sees the trace under "Tool calls the agent made", so criteria about what a tool returned are judged against what it actually returned. It is shown all of each result a cell keeps (scorers.JUDGE_TOOL_OUTPUT_CHARS, 4,000, held equal to ai_client.TOOL_OUTPUT_CHARS by a test), and a cut says so: "[… N more characters not shown]". Until 18 October 2026 a cell kept 2,000 characters and the judge saw 1,500, unmarked. A five-result web search is about 2,700, so the judge never saw its last two stories, and a correct answer could fail "adds nothing the results do not contain". Skill-run steps keep 4,000 characters per tool call too. A long result such as a fetched page is still cut, now visibly.

  • Scripted tools (situation.tool_fixtures: [{name, description, response}]) fix what the world returns — a share price at a moment — so a live-data question has an exact right answer that does not move between runs, and a regression verdict is not reporting the market. svc-ai binds them on the agent's node (AgentConfig.tool_fixtures, registry.make_scripted_tool): a name matching a real tool replaces it, keeping its description and argument schema so the agent calls it exactly as it would in production; any other name adds a tool with a free-form query. Nothing is fetched — a scripted tool cannot reach the network. They are part of the case's situation, not a variant's capability: they describe the world, not what the answerer may reach.

Two limits: scripted tools bind on the agent's own nodes, so the pipeline's retrieval and planning nodes keep their real tools; and a bare model variant has no tools, so a case that must use one fails there — as it should.

A cost profile is an override (cost-control plan B2.2): an agent variant may run under another profile than its own (target.cost_profile), and the Cost profiles preset writes one variant per profile — Thorough, Balanced and Economy — the agent's own as configured. A variant that overrides the profile tests an alternative (evidence._TARGET_OVERRIDES), so it never stands as the agent's evidence. A model has no profile (refused at build). An Economy variant runs with the lighter model chat would choose for the agent (lighter_model.pick, per cell from the target's one catalogue), and a cell the lighter model answered is ledgered against it. This is how Balanced and Economy are measured — see agent-graph-review.md#measuring-balanced-and-economy-b23.

An agent is evaluated as it answers in chat (October 2026, cost-control plan B2.1): through its skill graph when it has one. Every path that runs an agent builds svc-ai's request with one builder (svc-core app/services/agent_spec.py); an evaluation used to build its own and never ran the skill graph, so an agent with one was scored as an agent nobody talks to. Scripted tools reach a skill graph too (svc-ai app/agents/fixtures.py): a fixture stands in wherever a node binds or a tool node calls a tool of its name, and one no node binds joins every node that binds tools. A variant that names its own tools runs the agent as itself, since a graph's tools are its nodes'. A run's target says which ran (skill_id on the target), and the regression verdict treats a run through the graph after one without it as a changed target (target_changed), not a regression — so the first run after the change re-baselines an agent with a skill graph. CHAINR Bot has none, so the platform benchmark is unaffected.

Beside the criteria, the judge is shown the input, the reference answer, the case's graded examples and finally the output. Graded examples fix the scale — an output like an example deserves about that example's score — which steadies verdicts in the middle of the range. With no criteria anywhere the judge grades the answer as a whole, asking whether it is correct, complete and well-formed. Criteria and examples are rendered with the case's variables, like its prompt, and every cell records the label it was graded against on its input (criteria, dataset_criteria, examples), so a result reads back as "this answer, judged against this" after the case is edited. The optimiser tells its proposer the dataset's criteria; a case's own reach it through the judge's reasons on the failing examples.

The judge

Experiment.judge names the model that grades an llm-scored experiment; resolve_default_judge_target falls back to svc-ai's default model when it is null. fe-core offers it as a select of available chat models beside the scorer, on all three surfaces that choose a scorer.

Three things make it more than a dropdown:

  • Grading is pinned to temperature 0 whichever model does it (a model that takes no temperature, such as a reasoning model or a generation-5 Claude, grades at its own). JUDGE_MAX_TOKENS is 4096: a reasoning model counts its reasoning against the cap, and at the old 512 the default model could spend it thinking and return a verdict cut short, which is unscored and left out of the mean. judge_spec fills in JUDGE_TEMPERATURE and JUDGE_MAX_TOKENS for a nominated judge too — previously only the default judge was deterministic, so picking one silently made every score move between runs, and regression detection reports that as a regression. An explicit value in a stored spec still wins. The UI offers no temperature control: the user chooses which model grades, not how randomly.

  • A judge that does not resolve is refused at write time (_refuse_unusable_judge, 422) on experiment create, experiment update and POST /compare. Without it a judge naming a deleted model fell back to the platform default at run time behind a log line, so the experiment named one grading model on its page and used another. An adopted Quick try skips the check — it is a record of what already ran, and refusing the save because the model was since retired would discard the results.

  • The judge travels with an adopted Quick try. compare stores it on the batch config and quick_try.scorer_of returns it as a third value, so the saved experiment names the judge that produced the numbers it opens on. Two models do not agree on a score, so an experiment naming a different one would misattribute every cell on the page.

  • Its verdict is a schema, not a JSON shape in prose (20 October 2026, scorers.JudgeScore / JudgeChecklist, targets.invoke_structured). The judge is sent the verdict's strict schema on the governed model path, so a route that decodes natively — every Bedrock stand-in, Claude 4.5 / 4.6 — returns exactly it, and anything else is told it in svc-ai's own instruction. The reply is read whole (never a span salvaged from inside it) and validated; one that does not match is corrected once, and both calls are ledgered (judge.invocations). Before, the prompt spelt the shape out and a lenient reader tried shrinking slices of the reply; a "met": "true" counted as unmet, and a reply that never matched now reads "Judge did not return a usable verdict: …" naming the field. The score is clamped to 0–1 in code, since a strict schema carries no bounds. Test judges are judge(system, user, output).

Because two judges disagree, changing the judge changes what a run measured — it is not comparable with earlier runs, the same way a different scorer is not (see the regression baseline's incomparable verdict).

The measurement lock

An experiment's scorer, scorer_config and judge — MEASUREMENT_FIELDS in the router — are fixed once it has a completed run, and refused with a 409 while one is queued or running. A failed or cancelled run locks nothing: it measured nothing. Everything else (name, description, status, variants) stays editable, because the variants are the thing an experiment exists to vary. Its dataset is fixed from creation, run or not (see above).

The invariant lives in svc-core (_measurement_lock / _refuse_redefining_measurement), not only in the workbench: a read-only control is a presentation choice, and the reports and the regression baseline depend on this being true. A no-op PATCH that re-sends the same values is not a change and is not refused — fe-core saves the whole scoring block at once. A lock check that cannot read the runs locks: failing open would let the exact edit it exists to prevent through on a transient database error.

The way on is a new experiment on the dataset, which starts a fresh baseline. POST /experiments/{id}/duplicate used to copy one instead; it went when experiments became their dataset's children.

fe-core derives the lock from the runs already on the page (measurementLock in ExperimentViewer) and swaps the picker for ScorerSummary, a read-only render off the same scorer catalogue. Locked is not hidden: what an experiment measures is the thing a reader most needs to see.

Regression detection

app/services/evaluation/regression.py

A suite is only a safety net if somebody notices when the numbers move the wrong way. Runs used to be stored and comparable by hand — two rows in a list, each with its own pass rate, and the judgement left to whoever happened to look. Now every completed suite run is compared automatically and stamped with a verdict.

The verdict

VerdictMeans
improvedNothing regressed and something got better
unchangedEverything that gates stayed within tolerance
no_baselineThe first completed run of this suite
incomparableEarlier runs exist, but none measured the same thing

no_baseline and incomparable are distinct on purpose: "we have never measured this before" and "we have, but not in a way that compares" call for different responses.

The metrics are a registry

Each tracked figure is one class declaring which way is better, how much movement is noise, and whether it gates. GET /app/evaluations/regression/metrics serves the registry, so a metric added in the backend appears in the UI with no frontend release.

KeyDirectionGates?Default tolerance
pass_ratehigher is betteryes0.02
error_ratelower is betteryes0
mean_latency_mslower is betterno25% (relative)
tokens_per_caselower is betterno20% (relative)

Latency and token spend are reported but never gate. They move with provider load rather than with the change under test, so blocking on them would block good changes at random. error_rate has no tolerance: an invocation that started failing is a fact, not noise.

error_rate and tokens_per_case are derived (errors / total, total_tokens / total) rather than stored, so they stay comparable between runs of different sizes — an absolute error count says nothing when one run had 12 cases and the next had 40.

Tolerance

LLM judges are not deterministic and neither are the models under test, so a detector with no tolerance reports noise on every run and gets ignored. The defaults above can be tuned per suite:

{ "regression": { "tolerance": { "mean_score": 0.05, "mean_latency_ms": 0.5 } } }

on TestSuite.config (and Experiment.config, where the promotion gate reads it). A malformed or negative tolerance logs a warning and falls back to the default — a typo in a config blob must not make a suite uncomparable.

Movement is rounded to six decimal places before it is judged. Summary figures are stored as JSON floats, so 0.90 - 0.88 is 0.020000000000000018 in binary, and a tolerance boundary compared raw would be decided by representation noise rather than by the numbers.

Choosing a baseline

The baseline is the most recent comparable earlier run, searching back up to ten completed runs:

  • A different scorer or a different dataset makes a baseline unusable. An LLM judge's 0.8 and an exact-match 0.8 are not the same measurement, and neither is 0.8 on the refund set and 0.8 on the compliance set — different questions. The search walks past both; if nothing in range matches, the verdict is incomparable. The dataset clause came later than the scorer one: find_baseline matched on experiment and scorer only, so swapping an experiment's dataset and re-running produced a genuine improved/regressed verdict across two different sets of questions. Per-case comparison already degraded safely there (nothing matches by test_case_id), but the metric deltas the verdict is derived from are run aggregates, which compare regardless. An unrecorded dataset or scorer on either side is not treated as a mismatch — runs folded in from the old dataset tables carry neither, and refusing to compare them would be a regression in the reporting itself.

  • A different target does not. Detecting that a cheaper model scores worse on the same dataset is the entire point, so a target change is reported as target_changed alongside the verdict, never used to dismiss it. Target identity is what answers the prompt (agent id, or provider + model name) — a renamed target is the same target.

  • A different dataset version does. Runs are compared only within one content version of the dataset: adding, editing or removing a case, or changing the dataset's criteria, starts a new one, and the first run on it has no baseline (no_baseline, saying which version) rather than a verdict against different questions. Renames and status changes do not start a version. Runs with no version recorded compare only with each other — see Dataset versions.

  • Cancelled and failed runs are skipped. Their aggregate covers whichever cases happened to finish.

Dataset versions

A dataset's history records a version for every edit, but only some edits change what a run measures. app/services/evaluation/dataset_versions.py groups the history into content versions: stretches over which the cases (everything asked and graded — input, situation, criteria, reference, examples, checks, tags) and the dataset's criteria held still. A rename or status change extends the current content version; any content edit starts the next. A content version is identified by the history version that began it, so it resolves through /history like any other.

  • Runs ask the latest. start_experiment_batch stamps dataset_version with current_content_version, and the baseline search compares only runs with the same value (None included: a dataset with no history has had no recorded edit, so its unversioned runs asked the same thing).

  • Older versions are readable. Each version's children_snapshot holds the cases in full (case_snapshot) — before this it held ids and names, so versions recorded earlier say which cases existed but not what they asked, and never merge with a neighbour. GET /test-suites/{id}/versions lists content versions with per-version run counts; GET /test-suites/{id}/versions/{n} returns one with its cases; GET /test-suites/{id}/runs?dataset_version=n (or ?unversioned=true) narrows the runs.

  • fe-core opens a dataset on its latest version and lists only that version's runs, saying how many asked other versions. The version select shows an older version read-only — its criteria, its cases and the runs that asked it — and "Before versioning" collects runs made before the dataset had a history (datasets that predate history, and those migration 62 split off). The experiment page labels each run with the dataset version it asked.

  • A saved Quick try records its new dataset's first version and stamps the adopted run with it; it previously created the dataset with no history at all.

Suspect labels

A case every variant failed is reported beside the run's results as a suspect label (runner.suspect_labels, stored on summary.suspect_labels). When several differently configured answerers all fail one case, a wrong reference answer or a criterion nobody could meet is often the likelier cause — the finance sample that prompted this had three wrong labels in twelve cases, each of which would have failed a correct agent and blamed it. It takes at least two graded answers (SUSPECT_LABEL_MIN_ANSWERS), so a single-variant run never flags anything; calls that errored and cells left unscored do not count, because a provider outage fails every variant without saying anything about the case. It is a prompt to look — the verdict and scores are unchanged — and the experiment page lists each case with the judge's first reason and a link to the dataset.

Per-case movement

Matched by test_case_id, each case is classified:

KindMeans
fixedFailed before, passes now
score_drop / score_gainVerdict unchanged, score moved past tolerance

A pass/fail flip outranks the score movement that caused it — describing it as a score drop would bury the actionable fact among near-misses.

A broken case is a regression on its own, even when every summary metric held still. One case breaking while another is fixed leaves the pass rate identical and the suite genuinely worse; this is the case a by-hand comparison always misses.

Where it runs

  • Automatically, as the last step of execute_suite_run, which stamps the headline onto TestSuiteRun.run_metadata['regression'] — verdict, baseline run id, which metrics regressed, how many cases broke. Skipped for a cancelled run.

  • On read, at GET /app/evaluations/test-suites/{suite_id}/runs/{run_id}/regression, which recomputes the full report with per-case detail. Recomputing means runs recorded before this existed still report, and a suite whose tolerances were retuned reports against the tolerances in force now.

Nothing in the module raises. A regression report is commentary on a run that has already happened; failing the run because the commentary failed would turn one problem into two.

Promotion gates

app/services/evaluation/promotion.py

POST /app/evaluations/experiments/{id}/variants/{id}/promote writes a variant's prompt onto a live agent's system_prompt. That used to be unconditional: nothing stopped promoting the variant that scored worse than the prompt already in production.

The control

The gate compares the candidate against the control — the variant standing for what the agent already says — measured in the same batch, on the same cases, with the same scorer. Two ways to be the control, in order:

  1. config['control'] is true on a variant — declared, so an experiment keeps its baseline even after the agent has moved on.

  2. Its prompt is the agent's current system_prompt — inferred, so the common case (one variant carries the existing prompt, the others are rewrites) needs no bookkeeping.

Comparing against the batch winner instead would answer a different question ("is this the best?"), and promoting a non-winner is a legitimate choice. Comparing against a previous batch would compare across datasets.

The candidate is never its own control — a variant whose prompt is already live would otherwise compare against itself and always come out clear, which is a gate that cannot fail.

It blocks on evidence, never on its absence

StatusMeansBlocks?
blockedMeasured; a gating metric is worseyes — 409
unmeasuredCould not be measuredno

unmeasured covers: no completed batch, a variant absent from every batch, no identifiable control, more than one declared control, a control that was not in the same batch, an agent with no prompt yet, and a config hand-edited into nonsense. Each reports why.

A gate that blocked whenever it could not tell would be routed around within a week, and then it would be protecting nothing. What it refuses to be is silent.

Overriding it

force: true (with an optional note) promotes past a closed gate. The override is recorded on Experiment.config['promotions'] with the gate's status and its reasons, so a promotion made against the evidence is distinguishable from a clean one. GET .../promotion-check asks the same question without promoting, so the UI warns before somebody clicks rather than bouncing them afterwards.

It also records a version

Promotion is an edit to a live agent, so it now writes a ResourceVersion like any other mutation — it previously did not. Without it, the prompt a governed invocation ran under could change with nothing in the trail to say when, by whom, or from what. The promotion record carries the agent_version it produced, so a promotion resolves to the exact revision and its diff.

Adding a regression metric

One class:

@register_metric
class MeanReasoningTokensMetric(Metric):
    key = "reasoning_tokens_per_case"
    label = "Reasoning tokens per case"
    description = "Average thinking tokens spent per case."
    direction = Direction.lower_is_better
    gating = False            # informational — see the table above
    tolerance = 0.2
    relative_tolerance = True

    def read(self, summary):
        return self._ratio(summary, "reasoning_tokens", "total")

It then appears in every comparison, in the catalogue endpoint, in the UI table, and as a tunable tolerance key. Pin the new key in tests/test_evaluation_regression.py::test_metric_catalogue_is_the_agreed_set — the manifest is deliberate, because the frontend renders these keys and a suite's config names them.

Registration order is reading order, so put it where a reader would look for it rather than alphabetically.

Batches and cross-experiment reporting

app/services/evaluation/batches.py · experiment_batches

A batch is one execution of an experiment's variant × case matrix. Batches used to live on Experiment.config['batches'] as a JSON array capped at the twenty most recent, which was enough to drive a progress bar and nothing else:

  • Nothing could be asked across experiments. "Which experiments in this project scored below 0.7 this month" is a query, and a JSON array inside another table's column cannot answer one.

  • History was silently discarded. The twenty-first batch pushed the first out of the array while its runs stayed in experiment_runs forever, so the scores survived and the thing that explained them did not.

Batches are now rows (migration 49, which backfills from the array in both directions). The display payloads — the full aggregate and the ranked leaderboard — stay JSON, because nothing filters on them. The figures a report groups, filters and orders by are columns: scorer, mean_score, pass_rate, total_cases, errors, mean_latency_ms, total_tokens, duration_ms.

Those columns are denormalised out of the summary blob by apply_summary, which every write goes through so the two can never drift. A figure the summary does not carry stays NULL rather than zeroed — a report has to be able to tell "scored zero" from "never produced a score".

ExperimentRun.batch_id still has no foreign key to the new table. Rows predating the migration legitimately reference a batch whose summary was trimmed away, so a constraint would reject exactly the historical data it was meant to protect.

The endpoints

POST /app/evaluations/experimentsCreate an experiment on a dataset_id, on inline cases (a dataset of the same name is made alongside), or on a Quick try comparison_id adopted as its first run. variants may come inline; everything lands in one transaction.
GET /app/evaluations/reports/batchesOne row per completed run across every experiment in scope, naming the experiment and the dataset it asked. Filters: experiment_id, dataset_id, scorer, days, min_mean_score, max_mean_score, limit. include_unfinished=true adds queued, running, failed and cancelled runs, each with its status and error — for the Activity feed, which lists runs as events.
GET /app/evaluations/experiments/{id}/batches/{batch_id}/resultsThe scored cells of one run.
GET /app/evaluations/experiments/{id}/batches/{batch_id}/regressionThe run compared against the experiment's last comparable run, computed on read.
GET /app/evaluations/test-suites/{id}/evaluationsThe experiments that ask a dataset.
GET /app/evaluations/test-suites/{id}/runsEvery run that asked a dataset, across experiments — the report narrowed to one dataset.
GET /app/evaluations/reports/summaryHeadline totals over the same population, aggregated in SQL rather than over the listed page — a summary that silently covered only what fitted on screen would be worse than none.

Only completed batches are reported. A queued batch has no figures and a cancelled one has partial figures over whichever cells happened to finish, so including either would put numbers in a report that do not mean what they appear to.

Scoping is by ownership, using the same predicate the experiment list uses, with the same membership check in front of it. Unscored batches are excluded from a max_mean_score filter rather than treated as zero: "below 0.7" is a question about scores, and a batch with none has no answer. The summary's mean is averaged over batches, not over cases — each batch is one measurement of one configuration, and weighting by case count would let a large dataset speak for an experiment that was only run once.

fe-core surfaces this at Governance → Evaluation → Reports.

Traceability — every run, and every call a run made, is on record

An experiment is a governed workload, so it leaves the same trail an agent turn does — and one of its own.

Every LLM call an experiment makes is attributed and labelled. svc-core sends each cell (and the judge that grades it) to svc-ai with the owner's user_id, a purpose (evaluation for a cell, evaluation_judge for the grader) and a reference — the experiment or dataset, the batch, and the variant. svc-ai records the purpose on the llm_invocations row and stores the reference on its request snapshot (request_config.reference). Before this, evaluation cells were sent as "system" with no purpose: svc-ai's trace is read back per user, so they appeared in nobody's Activity feed, and where one did surface it read as a chat. Quick try calls carry {"source": "quick_try"} instead of a batch, because nothing is saved to point at. The constants live in app/services/evaluation/targets.py (TRACE_PURPOSE, JUDGE_TRACE_PURPOSE); runner.batch_reference builds the reference.

Every run is an event. fe-core's Activity page reads GET /app/evaluations/reports/batches?include_unfinished=true and lists each batch — completed, failed, cancelled or still running — as an Experiment run or Dataset run, with its status, score and a link to the experiment or dataset. The Inference → Experiments sub-filter narrows the feed to those runs and the LLM calls they made; an experiment's LLM call links back to its experiment from the invocation panel. A run that failed is the row that must not be missing, which is why the feed does not read the report's default (completed-only) population.

Every cell runs on its variant's model. Routing rules moved cells to another model from 16 October 2026 until routing rules were removed (migration 104, October 2026); a run from that time says so on the cell (run_metadata.routed_model, "Routed to …"), and nothing writes it now. A rule that should leave evaluations alone conditions on execution_type (evaluation; a dashboard tile is dashboard).

Every cell is on the usage ledger (governance_usage, execution_type="evaluation"), so cost caps, rate limits and spend boards count evaluation traffic; a cell an Access or Input rule blocked is recorded as governance events instead, never as ledger spend. Every edit is a version: creating, updating or deleting a variant records a version of its experiment, and creating, updating, deleting or importing cases records one of the dataset — each with a children snapshot, so the diff shows what came and went. Result rows (experiment_runs) are written by the runner only; the manual POST .../runs that let a client insert a bare result row was removed, because a score no invocation produced cannot be traced.

Quick try keeps what it ran, so saving keeps the results. POST /app/evaluations/compare records its outcomes as an ordinary completed batch with ordinary run rows — owned by nobody (migration 60 relaxed the owner constraint to "at most one") and marked on its config with who ran it — and answers {"comparison_id", "results"}. POST /app/evaluations/experiments with that comparison_id adopts the batch: the server derives the one-case dataset, the scorer and one variant per target (with the system prompt each column actually used) from what was stored, creates them in the same transaction, and rewrites the batch's leaderboard and run rows from positional keys onto the new variant ids. The saved experiment therefore opens on the results the user just read, as "Run 1", and a re-run is "Run 2" against the same variants. Adoption is refused with 403 for anyone but the user who ran it, 404 once it has expired, 409 if it was already saved; variants and comparison_id are mutually exclusive. Every read path scopes batches by owner, so an unsaved comparison never appears in a list, a report or a regression baseline; the quick_try_retention job purges unsaved ones after quick_try.RETENTION_HOURS (24). The client's copy of the form is never the source of truth — a result row the server did not produce is exactly what a result row must never be — and fe-core disables Save when the form has changed since the run. See app/services/evaluation/quick_try.py.

Names are unique per owner, and the check is in code. experiments and test_suites carry a unique constraint over the three owner columns and the name, and Postgres treats NULLs as distinct, so for a user-owned row it never fires. Create and rename check for the clash and answer 409 with the name; the constraint's own violation (where it does bite) is mapped to the same 409. An empty name is 422.

Concurrency. Cells run on a thread pool sharing one session. Every read that touches that session from a pool thread — rule evaluation, and an agent target's knowledge, MCP and model resolution — takes the one lock per session (targets._session_lock). An agent target loads its dependencies once, under that lock; loading them per cell, unguarded, collided with another cell's rule evaluation and failed the whole batch with SQLAlchemy's "concurrent operations are not permitted". A second, intermittent way to hit it: every rule evaluation commits the session, which expires every ORM instance on it, so reading agent.name from a pool thread afterwards issues a refresh query. An agent target copies the scalars it needs when it is built and never reads the row from a pool thread. The mock-session suite cannot see either failure; tests/test_evaluation_targets.py pins both, and a real Postgres run is the check that matters.

Create responses name their shape. Every /app/evaluations endpoint that answers with rows declares a response_model. Without one, a row returned after the version commit — when the session has expired its attributes — serialised as {}: a 201 with no id, and a client that built its next request on undefined. That was the "save from Quick try" failure. tests/test_crud_evaluations.py pins the declarations; fe-core's router treats a created body without an id as a failure rather than a resource.

Known limits

  • A dataset's runs view is scoped to the caller's own experiments. GET /test-suites/{id}/evaluations and /runs list what the caller owns; an experiment another member built on a shared dataset is theirs to open.

  • Per-case comparison covers one variant at a time. An experiment's batch has a cell per (variant, case), and comparing case-by-case is only meaningful for one variant — so the per-case section speaks about the batch's single variant when it has one, and stays quiet otherwise. The summary metrics still cover the whole batch, and variant-to-variant comparison is what the leaderboard is for.

  • Nothing re-runs your datasets on a timer. The stack has a scheduler (scheduler.md), and the platform benchmark uses it to re-run the gold datasets for the bot and the built-in models, at most once a month each. Your own experiments still run when somebody runs them (or presses Evaluate): which ones, how often and against what is an experiment design question rather than a scheduling one.

  • The platform benchmark is cost-capped and monthly, not exhaustive. A round the month's budget cannot carry waits for next month, and the page marks it "Not yet run". A deploy that changes the bot after its round this month is measured in next month's round, so a regression shows within a month, not on the day. Its cost is recorded on runs and background events, not in the usage ledger, so per-user spend figures never include it.

  • Adding one case resets the baseline. Any content edit is a new version, and versions are never compared — deliberately, since a pass rate over 21 cases is not the same measurement as one over 20. Per-case movement could in principle still be reported for the cases the two versions share; it is not today.

  • Every dataset version stores its cases in full, so a 500-case dataset edited often grows its history quickly. Fine at today's sizes; deduplicating unchanged cases between versions is the way in if it is not.

  • Best value compares the variants' own cost, not grading's. An LLM judge's calls cost the same whichever variant it grades, so they would shift every point equally; they are left out rather than apportioned.

  • Regression verdicts ignore the spread. A repeated run's verdict still compares mean score against the fixed tolerance; widening it by the two runs' measured spread would stop noise reading as a regression, and is not done yet. Runs with different repeat counts do compare — same expectation, different precision.

  • A preset's preview prices one pass. Repeats are chosen when the run starts, so multiply the preview's answer count by them.

  • The optimiser still stores its state as JSON on Experiment.config['optimisation'], the shape batches have just left.

  • The gold datasets are small and English-language. They run 8–12 cases each: enough to catch a model that fabricates or takes sides, not enough to rank two good ones finely. Political neutrality is written around UK and general Western politics. Copy and extend a dataset for a finer or local measurement.

  • The gold datasets assume the LLM judge. A dataset carries no scorer by design, so an experiment on one can pick another. Text checks or exact match would ignore the criteria that carry most of each case.

  • A pass mark is today's standard. Assurance and the gate judge every run against the dataset's pass mark as it is now, not as it was when the run happened. Raising a dataset's pass mark can turn a passing agent into a failing one without a new run, which is the intent.

See also

  • docs/guides/governance.md — rules, and the version trail these leaned on

  • app/services/evaluation/ — dataset, targets, scorers, runner, optimiser, regression, promotion, batches