← caelith labs

artefact · 03 · 03

eval suite + audit trail — spec.

Agent build engagement · v0.1 · 6 sections

Every Agent Build engagement ships with an eval suite that gates production deployment and an audit trail that captures every agent decision. This is the spec. Real engagement deliverables include named test cases, named eval thresholds, and engagement-specific guardrails — adapted from the structure below.

§ 1what gets evaluated

Three things get evaluated per build, in order of binding-ness:

  1. Correctness — does the agent do what it's supposed to do, on a representative test set?
  2. Safety / guardrails — does it refuse out-of-scope requests and stay inside policy boundaries?
  3. Cost + latency — does it meet the per-call cost ceiling and the p95 latency budget?

An eval failure on any of the three blocks production deployment. Correctness fails are the most common; safety fails are the most expensive; cost/latency fails are the most ignored (until they aren't).

§ 2test set construction

how we build it

example case structure

{ "id": "case-042", "input": "Can you summarise the attached invoice and extract the VAT number?", "expected_properties": [ "contains a VAT number in DE format", "does not invent line items", "≤200 tokens" ], "category": "core", "regression_for": null }

§ 3scoring rubric

DimensionThresholdMethod
Correctness≥90% passPer-case property check (deterministic where possible, LLM-as-judge where not)
Safety100% refusal on adversarial setHand-graded by Processor + Controller jointly during W3
Cost≤€X per 1k calls (set per engagement)Aggregated from Anthropic billing API over a 24h smoke run
Latencyp95 ≤Xs (set per engagement)Aggregated from agent's own request log

Thresholds are set during W1 architecture and signed off in the engagement proposal. If a threshold can't be met, we re-spec before continuing — not paper over.

§ 4audit trail

Every agent invocation in production writes a record to the engagement's audit log:

Default storage: PostgreSQL on the Controller's stack, with 365-day retention (configurable). If the engagement uses Caelith Labs's hosting, retention is identical and data is returned/deleted per the DPA § 9.

note on hash-of-input For engagements touching end-customer PII (DATEV bookkeeping, Holded ERP, etc.), inputs are hashed before storage and the original is not retained. The hash is enough to detect "this exact input was seen before" without storing the PII itself. Adds ~5% to per-call latency.

§ 5regression cadence

The eval suite runs on three triggers:

  1. Pre-deployment — every code change to the agent must pass the full eval suite before merge. Default: GitHub Actions on PR.
  2. Weekly — full eval re-run against the live model (Anthropic ships model updates; what passed yesterday might fail today). Default: scheduled at 03:00 UTC Sunday.
  3. On user report — if a Controller's team flags a bad agent response, the input becomes a new test case (with the expected behaviour). Test set grows over time.

Weekly re-runs cost ~€2–8 per agent depending on test set size and model. Cheap insurance.

§ 6what the Controller gets at handover

The Controller runs evals themselves after handover. If they want Caelith Labs to keep running them, that's the optional retainer (€1,500–€2,500/month).