SPEC-010: Evaluators¶
- Status: Implemented
- Milestone: M5
- Owners: lead maintainer
1. Purpose¶
Score what happened using code outside the agent, and summarize many runs. Evaluators read only the log.
2. Terms¶
- Checker: a code evaluator. Judge: a model evaluator (interface only in v0.1). Summary: statistics over N runs.
3. Requirements¶
- EVL-001 An evaluator MUST provide
evaluate(log: Log) -> EvalResult, taking only the parsed run log (plain data). - EVL-002
EvalResultMUST be plain data:name,passed(bool or null),score(number or null),details(object), and optionalevidence(list of logseqnumbers). - EVL-003 Independence: evaluators MUST run after the episode, MUST NOT receive world or agent objects, and agents MUST NOT be able to read or change them.
- EVL-004 Evaluators MUST NOT modify the log; results are written as separate files or an
evalsection appended only bycore. - EVL-005 A failing evaluator MUST NOT change the episode result (RUN-013); the failure is reported.
- EVL-006 The judge slot: an evaluator MAY call a model via the same adapter interface (SPEC-009); judge usage and cost MUST be reported separately from agent cost. One example judge ships; behavior tagging waits for v0.5.
- EVL-007
agentplaykit play --runs NMUST run N episodes with seeds derived from the base seed and print a summary: pass rate, mean and spread of steps and cost, outcome counts. - EVL-008 A multi-run summary MUST be reproducible from its seeds and recorded replies; the summary lists seeds and log paths.
- EVL-009 The framework MUST ship the built-in checker
outcome(winners and scores fromrun_end). A checker interface example:treasure(found the item within N steps). - EVL-010 Evaluators MUST register under
agentplaykit.evaluators(REG-002). - EVL-011 The interface MUST live in
coreas the base classEvaluator(withname,configandevaluate(log)), wherelogis a read-only copy of the parsed run log:log.events(list of event objects) andlog.complete. Implementations live inevals/or in plugins. - EVL-012 Results MUST be written by
coreto<log>.eval.json(the log path with.jsonlreplaced) and MUST validate againstspecs/schemas/evalresult.schema.json. A result MAY carryerror(why the evaluator failed) andusage(a judge's tokens and cost). - EVL-013 The built-in
judgeevaluator MUST takeagent: {use, config}(any agent adapter, SPEC-009) and arubric. It sends that agent one Request whoseobservationholds the rubric and a transcript of the log and whoseactionsis a JSON Schema for{passed, score, reason}. Judge usage MUST go in the result'susageand MUST NOT count toward the run's cost or limits. - EVL-015 A summary row MUST carry the run's
errorwhen it endedworld_errororaborted; the summary MUST list each distinct error with how many runs it ended (errors), and the printed summary MUST show them, so a failing provider is visible without opening logs. - EVL-016 The
judgeevaluator MAY taketags(tag name to definition) and then MUST return per-agent behaviour tags as SPEC-013 RPT-020 describes; a result MAY carrytags(agent id to a list of tag names). - EVL-014 With
--runs N, runi(from 0) MUST use seedbase + i; logs are named<name>-<seed>.jsonl; a summary<name>-summary.jsongoes next to them. The summary MUST NOT contain timestamps or durations, so the same inputs give an identical file. "Spread" means the population standard deviation, minimum and maximum.
4. Acceptance criteria¶
| Requirement | Test ID | Notes |
|---|---|---|
| EVL-001..004 | EVL-001..EVL-004 |
agent cannot reach checker |
| EVL-005..006 | EVL-005, EVL-006 |
|
| EVL-007..008 | EVL-007, EVL-008 |
20-run summary reproduced |
| EVL-009..010 | EVL-009, EVL-010 |
5. Open questions¶
- None.
6. Change log¶
- 2026-11-30: Initial draft.
- 2026-11-30: Accepted by the lead maintainer.
- 2026-11-30: Resolved the result-file question (
<log>.eval.json); added EVL-011 to EVL-014; found while implementing M5. - 2026-11-30: Implemented in v0.1.0; every requirement has a test (PRO-004, PRO-011).
- 2026-11-30: Added EVL-015 (errors in multi-run summaries), from user feedback on v0.1.0.
- 2026-12-01: Added EVL-016 (judge behaviour tags), with SPEC-013.