Repository navigation
Semantic eval harness for bundled schemas - #228
Merged
Merged
Conversation
Fixture spaces labelled with the verdict each node should get per rule, a live runner that reports agreement, stability, probability on the expected verdicts, reserved verdicts and errors per provider and rule, and free tests that keep the labels complete and consistent. Starts with a strict OST space for opportunity-customer-voice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Xphpdioyw95tAT6PEKGTU
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
Code review: correctionMy earlier "no issues" comment was wrong.
The fix is to add I found this from the repo's Stop hook output after the review, not from the review itself. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Xphpdioyw95tAT6PEKGTU
…paces --from picks where eval spaces come from: core, a plugin's evals/semantic/, evals/semantic/ beside the config, or a path. An eval.json5 either names a schema for its own fixture nodes or labels nodes of a configured space. Only labelled nodes reach the provider, and --check runs the free checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Xphpdioyw95tAT6PEKGTU
Fixture eval spaces keep their nodes in nodes.jsonl (parsed nodes, one per line), so editors and spaces never read them as markdown. The config source waits for the .sctx/ layout; --from <path> covers local eval spaces until then. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Xphpdioyw95tAT6PEKGTU
Each line of nodes.jsonl holds the fields frontmatter would, with its title as node id, matching the JSON node idea in #112. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Xphpdioyw95tAT6PEKGTU
Replaces "eval spaces" with three parts: a fixture (schema and nodes, shared by evals), an eval (one file of labelled cases on a fixture or configured space), and a suite (the directory --from names). Harness code moves out of the suite directory and splits into load, judge and score. - Unlabelled nodes are allowed as context; the check now reports labels the rule never judges and labels that accept every verdict, from one fake-judge validation pass. - The report lists the agreeing cases with the lowest p(expected). - Fixtures are JSON5, so scenarios can carry comments. - Problems print without a stack trace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019XphpdrUMvqf8fuj8uG7JZ
A suite's fixtures.json5 lists fixtures as space configs (name, path to a JSONL nodes file, schema, plugins), so fixtures share schemas the way spaces do. A nodes file holds parsed nodes as `sctx dump` prints them, with their own ids and link targets; the harness no longer derives either from a title. Every eval names a space: a fixture or a configured space, labelled by node id the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019XphpdrUMvqf8fuj8uG7JZ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Rog · project thread
Slice 2 of reusable semantic rules: a way to measure how well each provider judges semantic rules, before slice 3 adds primitive rules and type descriptions to the bundled schemas. It covers core's bundled schemas, plugins and configured spaces.
What it adds
.json5file of cases on one space. A fixture is a space whose nodes live in the suite. A suite is a directory of evals and fixtures.spacenames one of the suite's fixtures, or else a configured space. Fixtures can share a schema, and evals can share a fixture.--from, defaultcore): core'sevals/semantic/, a plugin'sevals/semantic/(found as the config finds plugins), or a path.bun run eval:semantic --provider <name>… [--from …] [--eval …] [--runs 3] [--per-node] [--check] [--json]. It reports agreement, stability, mean p(expected), reserved verdicts and errors per eval, provider and rule. It lists each miss, and the agreeing cases with the lowest p(expected).--per-nodehidesevaluateNodes, to test Jev packing.--check, and before every paid run): a label on a node the rule doesn't judge, an unknown rule or verdict, a label that accepts every verdict, and a labelled node that fails validation. Unlabelled nodes are allowed, as related nodes for scope rules.bun run testchecks core's evals.Design
The harness runs the real pipeline:
validateNodeswith only the labelled rules andincludeGated. It wraps the provider so that only labelled nodes are judged, while the rest still reach the model as related nodes. It needs no change tosrc/and adds no exports. Fixtures are read without a parse plugin; a shared core reader can replace that when core #112 gives it a second caller.Alternatives considered:
judgeNodesdirectly. It skipswhen, expressions and the rule filter.sctx evalcommand. It adds public surface; plugin authors need a core checkout until then.Not run live in the cloud container. A live run on core's eval scored 100% for openrouter-jev, jev
--per-nodeand openai, so slice 3 needs harder cases.🤖 Generated with Claude Code
https://claude.ai/code/session_019XphpdrUMvqf8fuj8uG7JZ