Skip to main content

Layer 10 · evaluation

experiment

blocks/10-evaluation/experiment.yaml

layer 10evaluation
2entities
5commands
5events
3views
17refusals
4KPIs

An experiment simulates a committed architecture under a load, faults, a work mode and a profile, changes it by mutations, and searches the variants exhaustively or by fitting. Each variant is one point of the search: the values it changed, its measured KPIs, its fitness and whether it is feasible.

Depends on​

  • kpi · layer 10 · 11 references
  • architecture · layer 9 · 5 references
  • shared · layer 0 · 11 references

Used by​

No block depends on this one.

Entities​

Experiment​

One search over variants of a committed architecture, under a load, faults, a work mode and a profile.

Identified by experiment_id (ExperimentId).

fieldtype
architecture_idArchitectureId
work_mode_idWorkModeId
profile_idProfileId
loadLoad
faultslist of Fault
mutationslist of Mutation
modeSearchMode
weightslist of Weight
gateslist of KpiId
failureoptional string

Relations:

  • architecture references Architecture of architecture (one, by architecture_id)
  • work_mode references WorkMode of kpi (one, by work_mode_id)
  • gate_kpis references Kpi of kpi (many, by gates)
  • variants owns Variant (many, by experiment_id)

Lifecycle of Experiment

DoneFailedPlannedRunningstartfinishfailfailDoneFailedPlannedRunningstartfinishfailfail
Ends in Done, Failed.

Variant​

One point of a search, with the values it changed, its measured KPIs, its fitness and whether it is feasible.

Identified by variant_id (VariantId).

fieldtype
experiment_idExperimentId
valueslist of Assignment
measurementslist of Score
fitnessdecimal
feasibleboolean

Lifecycle: one state, Recorded; a recorded Variant does not change.

Commands​

CompleteExperiment​

Complete an experiment.

fieldtype
experiment_idExperimentId
outcomewhenresult
no-such-experiment refusedno Experiment for experiment_idNoSuchExperiment: No experiment has this id, and nothing changed.
not-running refusedthe Experiment of experiment_id has state != RunningExperimentStateConflict: The experiment is not in a state that takes this command, and nothing changed.
no-variant refusedno Variant with experiment_id == input.experiment_idNoVariant: The experiment recorded no variant, so it cannot be done; nothing changed.
doneotherwisemoves the Experiment Running → Done; emits ExperimentDone

FailExperiment​

Fail an experiment.

fieldtype
experiment_idExperimentId
reasonstring
outcomewhenresult
no-such-experiment refusedno such ExperimentNoSuchExperiment: No experiment has this id, and nothing changed.
failedotherwisemoves the Experiment Planned, Running → Failed; emits ExperimentFailed
wrong-state refusedthe Experiment is in a state that does not allow itExperimentStateConflict: The experiment is not in a state that takes this command, and nothing changed.

PlanExperiment​

Plan an experiment.

fieldtype
architecture_idArchitectureId
work_mode_idWorkModeId
profile_idProfileId
loadLoad
faultslist of Fault
mutationslist of Mutation
modeSearchMode
weightslist of Weight
gateslist of KpiId
outcomewhenresult
empty-mutation refusedsome m in mutations with m.values.count == 0EmptyMutation: A mutation lists no value, and nothing was planned.
no-weights refusedmode == Fit and weights.count == 0NoWeights: A fitting search weighs at least one KPI, and nothing was planned.
no-such-architecture refusedno Architecture for architecture_idNoSuchArchitecture: No architecture has this id, and nothing was planned.
no-such-work-mode refusedno WorkMode for work_mode_idNoSuchWorkMode: No work mode has this id, and nothing was planned.
architecture-retired refusedthe Architecture of architecture_id has state == RetiredArchitectureRetired: The architecture is retired, and nothing was planned.
not-committed refusedno ArchitectureRevision with architecture_id == input.architecture_idArchitectureNotCommitted: The architecture has no committed revision to simulate, and nothing was planned.
unknown-kpi refuseda weight or a gate names a KPI that does not exist or is retired, or a gate names a KPI that is no gateUnknownKpi: A weight or a gate names a KPI that does not exist or is retired, or a gate names a KPI that is no gate; nothing was planned.
plannedotherwisecreates a Experiment in Planned; emits ExperimentPlanned

RecordVariant​

Record a variant.

fieldtype
experiment_idExperimentId
valueslist of Assignment
measurementslist of Score
fitnessdecimal
feasibleboolean
outcomewhenresult
no-such-experiment refusedno Experiment for experiment_idNoSuchExperiment: No experiment has this id, and nothing changed.
not-running refusedthe Experiment of experiment_id has state != RunningExperimentNotRunning: Variants are recorded only while the experiment runs, and nothing was recorded.
infeasible refusedthe variant is reported feasible while a gate KPI of the experiment measured above zeroInfeasibleVariant: The variant is reported feasible while one of the experiment's gate KPIs measured above zero, and nothing was recorded.
recordedotherwisecreates a Variant in Recorded; emits VariantRecorded

StartExperiment​

Start an experiment.

fieldtype
experiment_idExperimentId
outcomewhenresult
no-such-experiment refusedno such ExperimentNoSuchExperiment: No experiment has this id, and nothing changed.
startedotherwisemoves the Experiment Planned → Running; emits ExperimentStarted
wrong-state refusedthe Experiment is in a state that does not allow itExperimentStateConflict: The experiment is not in a state that takes this command, and nothing changed.

Events​

eventfieldsemitted by
ExperimentDoneexperiment_id ExperimentIdCompleteExperiment
ExperimentFailedexperiment_id ExperimentId, reason stringFailExperiment
ExperimentPlannedexperiment_id ExperimentId, architecture_id ArchitectureId, work_mode_id WorkModeId, profile_id ProfileId, mode SearchModePlanExperiment
ExperimentStartedexperiment_id ExperimentIdStartExperiment
VariantRecordedvariant_id VariantId, experiment_id ExperimentId, fitness decimal, feasible booleanRecordVariant

Views​

viewrowsfields
BestVarianteach Variant with experiment_id == param.experiment_id and feasible == true
asked with experiment_id ExperimentId, page optional integer, size optional integer
variant_id VariantId, experiment_id ExperimentId, values list of Assignment, fitness decimal
Experimentseach Experimentexperiment_id ExperimentId, architecture_id ArchitectureId, work_mode_id WorkModeId, profile_id ProfileId, load Load, mode SearchMode, failure optional string, state State
Variantseach Variant with experiment_id == param.experiment_id
asked with experiment_id ExperimentId
variant_id VariantId, experiment_id ExperimentId, values list of Assignment, measurements list of Score, fitness decimal, feasible boolean

Types​

typeisvalues or fields
Assignmenta recordpart optional Name, field string, value string
Faulta recordkind FaultKind, part Name, from duration, lasts duration
FaultKindone ofPrincipalAway, PoolEmpty, ChannelDrop, RateLimited
Loada recordtasks_per_hour integer
Mutationa recordpart optional Name, field string, values list of string
Scorea recordkpi_id KpiId, value decimal
SearchModeone ofExhaustive, Fit
VariantIdan identifier or valueuuid
Weighta recordkpi_id KpiId, weight decimal

KPIs​

4 KPIs from the KPI catalogue. A gate must be zero for a variant of an architecture to count.

Completeness​

KPIunitbettergatestatus
variants_feasible_share
Share of recorded variants that pass every gate.
How: Variants whose gate KPIs are all 0 (or 1 for a complete share) divided by VariantRecorded events. A variant that fails a gate does not count in the ranking.
sharehigher–simulated
source: design

Quality​

KPIunitbettergatestatus
harness_effect_points
Change in pass rate caused by a change of harness at a fixed model.
How: Pass rate of the variant with the changed harness minus pass rate of the baseline, in percentage points, over the same tasks and seeds.
pointshigher–planned
source: research/2610.35971
ranking_reversal_share
Share of model comparisons whose ranking reverses under another harness.
How: Pairs of models ranked in opposite order under two harnesses divided by pairs compared. A high share means a model ranking holds for one harness only.
sharelower–planned
source: research/2610.35348
prediction_error
Distance between a simulated KPI and the same KPI measured on a real run.
How: Absolute difference between the simulated and the observed value of a KPI, divided by the observed value. A profile whose predictions miss is refitted.
ratiolower–planned
source: design

Settings​

The settings a part of this block carries in an architecture document. agenticspec sim check refuses any other setting (setting_unknown) and a value outside its type (setting_invalid), and a part that lacks a setting marked required in the default column; the contract copies a setting into the ports it narrows. The last rows of each table are the settings every part takes. What no setting here types (a file, a path, an audience, the use of a model) goes into the part's notes, a map with free keys and values that the check takes as written and nothing reads.

A part experiment:

settingtypeunitdefaultcontractwhat
kindstringWhat the experiment compares.
countinteger of at least 11How many copies of the part run.
perpartOne copy of the part for each copy of the named part.
notesnotesFree notes on the part, a map with keys and values of any kind: what no setting of its block types. The check takes any map; the simulator, the search and the contract never read it.