3.5 KiB
3.5 KiB
T5.4 — DeterministicGrader
| Field | Value |
|---|---|
| Phase | P5 — Grading |
| Size | S — under 1 day |
| Status | Not started |
| Flags | — |
| Spec | inlined below |
| Blocks | — |
Goal
Grade on a number the user already computes — latency, cost, test pass count — with zero model calls.
Facts (inlined — no spec read needed)
- It exists so that adopting the framework does not require adopting LLM-as-judge at all.
- Cost profile: 0 model calls per episode, 0 models resident, produces
Rankedon a computed number. - Its
ResourceProfiledeclares an emptymodelsvector. That is the whole point — it forces no residency and passes the capacity check trivially. - It still produces
Score::Ranked, so the aggregation path downstream is unchanged. - Never let a rubric judge what a verifier can check: criteria that can be made
mechanical belong here or in a
Verifier, not in a rubric line.
Steps
- Implement
EvaluationStrategywithresources()returningResourceProfile { models: vec![], max_context_tokens: 0, calls_per_episode: 0.0 }. - Define the metric extractor as a user-supplied function over
EpisodeView— the framework supplies latency, cost and usage; the user supplies anything domain-specific such as test pass count. - Rank within the group by the computed number and emit
Score::Rankedwithgroup_size. - Ensure the interval is meaningful or explicitly degenerate — do not fabricate a confidence interval around a deterministic measurement.
- Test with a workflow graded purely on test-pass-count and latency; assert the model-call counter is exactly zero.
Acceptance
- A workflow graded purely on test-pass-count and latency, no model calls.
- Its
ResourceProfiledeclares zero models.
Verify
Harness: a model-call counter installed at the provider boundary, counting all purposes.
Integration test — tests/it_deterministic_grader.rs:
- Run a workflow graded on test-pass-count and latency.
- Assert the model-call counter is exactly 0 across the whole run's grading phase — including any tiebreak path.
- Assert
resources().models.is_empty()andcalls_per_episode == 0.0. - Assert registration passes the capacity check under a
CapacityLimitswith zero devices — nothing about this strategy should need a GPU. - Determinism: grade the same group twice; assert identical
Score::Rankedvalues including ordering of ties. - Assert the emitted score is
Ranked, so downstream aggregation is unchanged from the tournament path. - Assert no fabricated confidence interval — either a real one or an explicitly degenerate one, asserted as such.
Command: cargo test -p grading deterministic
False pass:
- Counting only judge-purpose model calls. A tiebreak issued under
Purpose::Workwould slip through — count all purposes. - Step 4 omitted: declaring the agent's model in
models"since it is resident anyway" passes steps 1–3, then fails a capacity check it should pass and misreports the spend projection. - Step 5 with a group of one, where ordering is trivially stable.
Traps
- Declaring the agent's model in
models"since it is resident anyway". It then fails a capacity check it should pass, and it lies in the spend projection. - Calling a model for a tiebreak.
Background (not required to do this task): rust-agentic-sys.md §11.1, §11.7 · rust-agentic-task.md