Fix eval_awareness and broken_env prompts to name required result fields - #120
Open
tomseimandi wants to merge 2 commits into
Open
tomseimandi wants to merge 2 commits into
tomseimandi wants to merge 2 commits into
Conversation
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
We experienced multiple pydantic
ValidationErrors oneval_awareness_scannerandbroken_env_scannerscan jobs using OpenAI models (via OpenRouter), because each scanner's prompt never asks the judge for a field that its own result schema requires:eval_awareness: the schema requiresreason, but the prompt never names thereasonfieldbroken_env: the schema requiressuccess, but the prompt never mentions itThis PR changes only the two prompt suffixes and bumps both scanners to
version=1.Failure mode
_scan_with_retrysends the result schema as a non-strictResponseSchema(strictis never set) and validates the completion withResultClass.model_validate_json. Non-strict structured output guides the output format but does not force required keys. Some models follow the prompt wording over the schema.Observed errors:
Other scanners from this repository (
reward_hacking,internet_leaves_tracks,sandbagging, etc.) never raise the error in practice because their suffix prompts contain instructions similar to those added by this PR.Verification
ruff check,ruff format --check, andbasedpyrightare clean, and the scanners test suite passes