[codex] Fix knowledge scoring and Anthropic Opus 4.7 compatibility#21
Merged
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
JasonTheAdams
approved these changes
Apr 16, 2026
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.
Summary
This PR fixes two real benchmark harness issues:
claude-opus-4-7rejects thetemperatureparameter, which prevented the harness from benchmarking the model at allRoot Cause
BenchmarkRunnerandSingleModelRunneralways prompted withAnswer with only the letter of the correct choice.answer.upper().startswith(correct_answer)check for every knowledge record.typeandanswer_type.ModelInterfacealways passedtemperature, but Anthropic now returnsinvalid_request_errorfor Opus 4.7 when that field is sent.What Changed
typeandanswer_typein local parsing, HF loading, and Parquet export.temperatureis deprecated, retry once without it.Audit Notes
wp-core-v1currently contains42knowledge tests and24execution tests.2knowledge items are short-answer in the local suite (k-rest-001,k-security-001).113 of 325fill-in-the-blank items does not match the current local JSON in this repository. The larger count likely came from a different dataset revision or export.Validation
ruff check pythonpytest pythonpython datasets/export_dataset.pywp-bench dry-run --config wp-bench.yamlwp-bench run --config wp-bench.yaml --model-name claude-sonnet-4-5-20250929wp-bench run --config wp-bench.yaml --model-name claude-opus-4-5-20251101wp-bench run --config wp-bench.yaml --model-name anthropic/claude-opus-4-7Live Benchmark Results
Clean-branch reruns on this patch produced:
claude-sonnet-4-5-20250929): knowledge92.86%, correctness52.08%, overall48.69%claude-opus-4-5-20251101): knowledge78.57%, correctness50.00%, overall43.57%anthropic/claude-opus-4-7): knowledge95.24%, correctness54.86%, overall50.52%Re-scoring the Sonnet and Opus 4.5 answer logs with the legacy scorer (
startswith/ letter-only behavior) yields:85.71%instead of92.86%(+7.14points from the fix)73.81%instead of78.57%(+4.76points from the fix)Those deltas came from the two short-answer items plus one multiple-choice response where the model answered correctly in prose instead of starting with the option letter.