Repository navigation
Bench: answer keys and a deterministic scorer for four stalled rival rows - #1983
Merged
Merged
Conversation
…rows Add keys.json (3-6 must-hit and 1-3 must-not regex items per scenario) for the 40 held-out scenarios of business-ops, growth-analytics, idea-critic and contribution. Keys test what an answer adds beyond its prompt (echo baseline max 0.25), accept number forms and paraphrases, and carry no Perun verdict tokens. rival_eval_keys.py (a wrapper around the unchanged, hash-pinned rival_eval.py, stacked on the cost-capture wrapper; rival-eval-premerge.sh now runs it) gains key_score (per-arm hit rate and violation rate, no judge), an answer_key block in results.json, a keys subcommand that rescores cached outputs offline and fails closed on a missing keys.json or arm directory, and key hygiene in check. Must-nots are heuristically negation-aware and skip placeholders; contribution leak and force-push checks scan only the drafted message, and a missing draft is flagged no_draft. No paid call. Tests: 19/19 (test_rival_answer_keys) + test_rival_eval 47/47 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z
Merged
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.
Supersedes #1966. The same change, rebuilt as one commit on current main (after #1981), with six fixes from an independent review.
Four rival-bench rows (business-ops, growth-analytics, idea-critic, contribution) had no outcome score a cost check could pair with. This adds deterministic answer keys, so those rows can be scored without a judge model and without a paid call.
keys.jsonfor the 40 held-out scenarios of the four skills: 3-6 must-hit and 1-3 must-not regex items per scenario. Keys test what an answer adds beyond its prompt (echo baseline at most 0.25), accept number forms and paraphrases, and carry no Perun verdict tokens.scripts/rival_eval_keys.pywraps the cost-capture wrapper from Record per-arm bench cost and apply the cost check #1981;rival_eval.pystays unchanged and hash-pinned. It addskey_score(per-arm hit rate and violation rate), ananswer_keyblock inresults.json, akeyssubcommand that rescores cached outputs offline, and key hygiene incheck.rival-eval-premerge.shnow runs it.Fixes from the review of the rebuilt branch:
keys.jsonfor a skill that ships keys now fails closed instead of silently skipping scoring.checkvalidates every key entry's shape, so a malformed key fails before a paid run rather than at score time.[Company]is still fine.keysrescore picks each output by the current prompt hash, so stale outputs from an older prompt no longer make it depend on file order.Tests: 19/19 in
scripts/test_rival_answer_keys.py, and 47/47 intest_rival_eval. Local CI repro on this commit: size-ratchet ok against main, mustload ok, and therival-answer-keysandbench-cost-capturehooks pass. The fullscripts/ci-tests.dloop andtest-ci-gates.shran on the pre-fix rebuild with only the 9 known sandbox-only failures.🤖 Generated with Claude Code
https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z