Loading...
Loading...
Turn wiki golden pages into a CI-blocking eval suite with a cheap→expensive assertion cascade plus a committed regression baseline. Goldens are md files under llmwiki/wiki/sources/evals/ with YAML frontmatter (input, expected, optional rubric, asserts). The engine runs deterministic tier-1 asserts (equals/contains/regex/is-json/is-sql-ish) in pure code, an optional tier-2 similarity, and reports tier-3 (LLM-rubric judge) as the quarantined adapter — never calling a model. Candidate outputs come from --outputs outputs.json so the suite is fully runnable without any model. Trigger when the user says "wikieval", "eval suite for the wiki", "regression gate for goldens", "assertion cascade", "block CI on eval drop", or invokes /wikieval.
npx skill4agent add rheinmir/setup wikieval/wikievalneeds-judge--outputsgolden (input · expected · rubric? · asserts?) + candidate output → cascade: tier 1 asserts → [tier 2 similarity] → [tier 3 needs-judge] → per-golden pass+score → baseline (write) | regression diff (check)| Field | Required? | Ý nghĩa | |
|---|---|---|---|
| In | goldens | có | YAML frontmatter |
| In | | có | candidate outputs per golden — makes the suite runnable without any model |
| In | mode | không | none = report; |
| In | | không | adapter config ( |
| Out | report | có | per-golden pass/fail/score/ |
| Out | | với | committed per-golden pass + score |
| Out | exit code | với | 0 = no regression; 2 = a metric dropped below baseline (+ regression diff) |
assertsembedding.backenddifflibjudge(output, rubric) -> {score, reason}needs-judge--checkharness/wikieval.config.yamljudge()--checkembedding.backendneeds-judge--outputs| Step | Type | Inputs | Action | Outputs/exit | Failure/next |
|---|---|---|---|---|---|
| W01 | deterministic | goldens, | Load goldens + candidate outputs | pairs per golden | missing outputs → blocked |
| W02 | deterministic | pair, | Tier 1 deterministic asserts | pass/fail if asserts declared | unknown op → fail closed |
| W03 | deterministic | pair, config | Tier 2 similarity (only if no asserts) | score or "skipped + noted" | backend unset → skip |
| W04 | deterministic | rubric | Tier 3 → report | | — |
| W05 | deterministic | results, mode | Report / | report, baseline file, exit 0/2 | drop → exit 2 |
equalscontainsicontainsnot-containsregexis-jsonis-sql-ishassertsembedding.backenddifflibverified: falsejudge(output, rubric) -> {score, reason}needs-judgellmwiki/wiki/sources/evals/inputexpectedrubricasserts'contains:foo''regex:^...$''is-json''equals:bar''is-sql-ish'idtype## Origin# run the cascade with a fixed candidate set, print a report
python3 harness/scripts/wikieval.py --outputs harness/evals/wikieval-outputs.example.json
# write / refresh the committed baseline (per-golden pass + score)
python3 harness/scripts/wikieval.py --outputs <outputs.json> --write-baseline
# CI gate: re-run and exit 2 if any metric dropped below baseline (deterministic diff)
python3 harness/scripts/wikieval.py --outputs <outputs.json> --checkharness/metrics/eval-baseline.jsonharness/wikieval.config.yaml| ID | Kind | Guard | Hành vi | Skip / failure | Rejoin |
|---|---|---|---|---|---|
| B01 | capability_optional | golden has no | tier 2 similarity ( | backend unset or real model id not wired → skipped + noted | W04 |
| B02 | user_optional | | write/refresh | — | end |
| B03 | user_optional | | deterministic diff vs baseline, exit 2 on drop | no baseline → run | end |
needs-judgeOUT=harness/evals/wikieval-outputs.example.json
python3 harness/scripts/wikieval.py --outputs $OUT --write-baseline # both goldens PASS
python3 harness/scripts/wikieval.py --outputs $OUT --check # exit 0 — no regression
# flip one output to break an assert, then:
python3 harness/scripts/wikieval.py --outputs <broken.json> --check # exit 2 + regression diffpython3 harness/scripts/wikieval.py --outputs harness/evals/wikieval-outputs.example.json --check'contains:foo'--checkrubricembedding.backendneeds-judge--checkverified: falseharness/wikieval.config.yaml# ASSUMPTIONjudge()judge()verified: trueharness/scripts/wikieval.pyharness/wikieval.config.yamlverified: falseharness/metrics/eval-baseline.jsonllmwiki/wiki/sources/evals/*.mdharness/evals/wikieval-outputs.example.json