Skip to content

Audit reference ​

An audit plan names a base scenario, perturbation axes, a design, a replication count and the metrics to compare. The harness generates conditions, runs every replication of every condition through the kernel, and hands the results to a pure analysis step that writes audit.json and report.html. Plan fields come from AuditPlanSchema in src/core/schema.ts and the loader in src/harness/plan.ts; the axis catalogue is src/harness/axes.ts; the statistics and the evidence grade are in src/harness/stats.ts.

Plan document ​

fieldtypedefaultnotes
baseScenariopathThe base scenario file, relative to the plan file. Exactly one of baseScenario and base.
baseinline scenarioA full scenario object; its relative paths resolve against the plan file's directory.
hypothesisobjectomittedSame shape as in a scenario. Its outcomes give each metric an expected direction and, with targetDistribution, a target for the distribution tests.
axesPerturbationAxis[][]See Axes.
designone_at_a_time or full_factorialone_at_a_timeSee Conditions.
replicationspositive integer1Runs per condition; the CLI, API and MCP can override it.
modelsstring[][]Model names; each becomes a variant of every condition through llm.model.
metricsstring[][]Metric names read from each run's result.json.
claimTypeexploratory, mechanism or policyexploratoryPolicy claims need axes at all three levels for a strong grade.
concurrencypositive integer1Runs in flight at once. Excluded from the plan hash, so the same plan hashes identically on any machine.

The shipped plans, examples/prisoners_dilemma/audit.yaml and examples/echo_chamber/audit.yaml, are complete examples.

Axes ​

fieldtypenotes
idnon-empty stringAppears in condition ids and in the sensitivity ranking.
levelmicro, meso or macroTRAILS level.
kinddesign or representationWhat the simulation is made of, or how the same design is written for the model.
dimensionnon-empty stringFree text; the catalogue names below are the convention.
targetdotted path into the scenarioFor example prompt.personaFormat, params.framing, population.n, policy.options.p.
levelsat least one JSON valueOne condition per level. Any value the target accepts, checked by re-validating the scenario.

A target that does not exist in the scenario fails with UnknownOverride; a level the schema rejects fails with InvalidOverride and the validation issues, before any run starts.

Axis catalogue ​

AXIS_CATALOG in src/harness/axes.ts fixes level, kind, dimension and a default target for each TRAILS dimension; a plan supplies the levels and may point target at whatever path its own scenario exposes. The default targets name the example scenarios' parameters.

codeidlevelkinddimensiondefault targetwhat varies
D1model_substratemicrodesignmodel substratellm.modelWhich model family or size produces the agents' decisions.
D2agent_specificationmicrodesignagent specificationpopulation.fieldsWhich persona fields exist and how they are sampled.
D3internal_statemicrodesigninternal stateexecutors.0.options.componentsWhich internal components (instructions, memory, goals) an agent carries.
D4memory_temporalitymicrodesignmemory and temporalityparams.memoryWindowHow much history an agent recalls and how it is compressed.
D5interaction_protocolmesodesigninteraction protocolpolicy.options.pWho acts when: activation policy, turn taking and synchrony.
D6intervention_designmacrodesignintervention designparams.interventionHow a treatment is administered: timing, dose and selection.
D7environment_structuremesodesignenvironment structureparams.homophilyNetwork topology and platform mechanics such as recommenders.
D8population_scalemacrodesignpopulation scalepopulation.nHow many agents take part.
R1representational_formatmicrorepresentationrepresentational formatprompt.personaFormatProse, bullets or a table for the same persona.
R2instruction_hierarchymicrorepresentationinstruction hierarchyprompt.instructionOrderWhere task instructions sit relative to the persona.
R3linguistic_framingmicrorepresentationlinguistic framingparams.framingWording of the same situation: neutral, moralised or risk framed.
R4context_representationmicrorepresentationcontext representationprompt.memoryRepresentationTranscript, JSON or bullets for the same memory.
R5interaction_sequencingmesorepresentationinteraction sequencingprompt.rolePlacementWhether the role lives in the system turn or the user turn.

From code, axisFromTemplate(id, levels, { target? }) builds an axis from a template.

Conditions ​

one_at_a_time yields the base condition plus one condition per axis level; full_factorial yields the base plus the Cartesian product of all axes. Both are then crossed with models. The base condition comes first and is the baseline every pairwise test compares against. Condition ids are <axis>=<level> joined with |, with @<model> appended only when the plan lists models; a perturbed condition whose scenario hashes identically to the base is flagged identicalToBase.

Every replication is the condition's scenario with replicationId set to the replication index and that index appended to seedPath, so seeds are a lineage of the plan rather than fresh random numbers. LLM providers run with temperature forced to 0 inside an audit, so replications differ by seed alone. Runs execute in a pool of concurrency workers, each in its own directory under runs/<condition>/<replication>/; a run that fails becomes a failed RunResult with its FailureInfo and never aborts the audit.

Evidence grade ​

The grade is a property of the design, computed before any statistics:

gradecondition
weakNo axes, fewer than 10 replications, or any axis with a single level.
moderateAt least 10 replications and every axis with at least 2 levels.
strongAt least 30 replications, every axis with at least 3 levels, at least 2 models and, for policy claims, axes at the micro, meso and macro levels.

Statistics ​

Runs that failed, or finished with integrity.complete false, stay in the report as data and are excluded from the statistics unless --include-incomplete (or the includeIncomplete option) is set. Every sample is filtered to finite values first.

quantitymethod
mwuPTwo-sided Mann-Whitney U: exact enumeration when the smaller sample has fewer than 8 values and no ties, otherwise the normal approximation with tie and continuity corrections.
holmPHolm step-down correction, applied within each metric.
cohenDMean difference over the pooled standard deviation; zero spread gives 0 or a signed infinity, shown as inf.
ci95Percentile bootstrap of the mean difference, 2000 iterations, seeded from the plan hash so the interval is reproducible.
directionFlipWhether the condition's mean moves against the direction the hypothesis expects for that metric.
sensitivityRankFor each axis, the largest absolute Cohen d observed at any of its levels across all metrics.
directionConsistencyShare of conditions whose mean moves in the expected direction, per metric.
w1, cliffDeltaWasserstein-1 between the baseline and condition samples; Cliff's delta of the condition over the baseline (ties count for neither side).
tvd, tvdBaseWith a targetDistribution: total variation distance of the condition's and the baseline's pooled distribution to the target, normalised by the target's distance to uniform (the SimBench score, 100 for a perfect match, 0 for no closer than uniform).
crossModelMean of each metric per model, over every condition.

Reading the report ​

report.html is one self-contained file with no scripts, fonts or external links, so it opens offline and can be attached as-is. The live report on this site is one. Its sections, in order:

  1. Plan summary: scenario, design, claim type, replications, conditions, run counts (failed, incomplete, excluded), models, metrics and the provider override, with the grade rule spelled out.
  2. Perturbation axes: the plan's axes with their targets and levels.
  3. Conditions: runs, successes, complete runs and the mean of each metric per condition.
  4. Pairwise tests against the baseline: one table per metric, ordered by absolute Cohen d, with sample sizes, means, difference, bootstrap interval, Cohen d, raw and Holm-corrected p, and a flip mark. When no test exists the note names the precondition that failed, such as fewer than two usable replications per condition.
  5. Sensitivity by axis: the ranking as bars.
  6. Direction consistency and Cross-model means.
  7. Distribution tests: W1, Cliff delta and the normalised TVDs.
  8. Integrity and cost: the integrity counters summed over all runs and the LLM calls and tokens spent.

The same numbers are in audit.json; simulacra report <auditDir> re-renders the HTML from it, and the GUI's audit view and the MCP get_audit tool read the same report.