test(eval): add semantic rubric gate

This commit is contained in:
ZacharyZhang-NY committed 2026-04-23 19:31:31 -04:00
1 parent 84d80f02aa
commit 04c4059159
15 files changed
+348 -33

No files matched your search

+26 -9
View File
@@ -1,24 +1,41 @@
# B5.1 — LLM-as-judge tier above the B5 assertion harness
> Status: proposal (deferred — triggers defined below)
> Status: phase 1 executed 2026-04-23; provider LLM judge remains proposal
> behind the triggers defined below.
> Depends on: B5 (assertion harness scaffold, landed 2026-04-20)
> Author note: roundtable 2-1 decision to defer this tonight; scaffold first,
> semantic judgment after N ≥ 10 fixtures exist.
## TL;DR
B5 today handles **structural** assertions against a recorded trace — tool
name, call count, call order, argument shape, turn cap, text substring. It
cannot judge whether a CEO's hiring plan is *reasonable*, whether a reply
tone is *appropriate*, or whether a response *addresses the user's intent*.
Semantic judgment belongs in a second tier — an LLM-as-judge that runs on
top of B5's fixtures, gated by a rubric, a cost budget, and a failure
escape hatch so it never becomes the bottleneck it wants to measure.
B5 handles **structural** assertions against a recorded trace — tool name,
call count, call order, argument shape, turn cap, text substring. The first
B5.1 layer now adds deterministic `semanticRubric` dimensions to every
fixture: each dimension states the semantic quality being protected and ties it
to required / forbidden assistant-transcript evidence. Provider LLM-as-judge is
the next tier on top of the same fixtures, gated by a rubric, a cost budget,
and a failure protocol.
This proposal defines the trigger conditions for building that tier, the
This proposal defines the trigger conditions for building the provider tier, the
concrete rubric schema, the assertion-first fast path, the cost cap, and
the failure mode when the judge itself is wrong.
## 2026-04-23 executed layer
`tests/eval` now includes a semantic rubric gate:
- `types.ts` requires `AssertionsBlock.semanticRubric`.
- `fixture-loader.ts` rejects fixtures with missing or empty semantic rubrics.
- `semantic-rubric-judge.ts` evaluates each dimension against assistant
transcript evidence.
- `eval-runner.ts` folds semantic rubric failures into `EvalResult.passed`.
- Existing recorded fixtures now cover CEO bootstrap, Board reply, manager
handoff, peer reply, and IC task execution with semantic dimensions.
- The prompt matrix now pins the AI Co-Founder human-review mode contract.
This layer runs in `pnpm test:eval` and `pnpm verify`. It is deterministic,
provider-key-free, and tied to real recorded traces.
## Why not tonight (roundtable reasoning)
Three dissenting voices carried the delay decision 2-1: