fix(rubrics): read JudgeRubric questions from Pydantic messages#2005
Open
crazywriter1 wants to merge 1 commit into
Open
fix(rubrics): read JudgeRubric questions from Pydantic messages#2005crazywriter1 wants to merge 1 commit into
crazywriter1 wants to merge 1 commit into
Conversation
Rollouts normalize prompts to Message objects, but judge() only read dict content and silently sent an empty Question to the judge model.
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
JudgeRubric.judge()only extractedquestionfrom dict prompts (isinstance(..., dict))Messageobjects, so the Question block was silently empty_message_field/_content_to_text) for dict and Message promptsTest plan
{question}.contentno longer produces an empty Question_content_to_text)Note
Low Risk
Small, localized change to prompt parsing in judge rubric scoring with no auth or data-path changes.
Overview
Fixes judge scoring when rollouts pass Pydantic
Messageprompts instead of raw dicts.JudgeRubric.judge()previously built the{question}field only when the last list prompt entry was a dict with"content", so normalized rollout prompts left the Question block empty and weakened judge decisions.The last message’s content is now read through
Parser._message_fieldandParser._content_to_text, so dict and object messages (including multimodal text parts) populate{question}consistently.Reviewed by Cursor Bugbot for commit 3cd51ce. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix
JudgeRubric.judgeto extract question text from Pydantic messagesPreviously, when
promptwas a list, the method assumed raw dicts and fell back to empty strings for PydanticMessageobjects. Now usesself.parser._message_fieldandself.parser._content_to_textin judge_rubric.py to correctly extract the question string from both dict and Pydantic message formats.Macroscope summarized 3cd51ce.