Repository navigation
fix(frontierscience): use paper rubric prompt and reject failed grades - #4891
Conversation
Signed-off-by: Igor Gitman <[email protected]>
Signed-off-by: Igor Gitman <[email protected]>
Signed-off-by: Igor Gitman <[email protected]>
Signed-off-by: Igor Gitman <[email protected]>
yaoyu-33
left a comment
There was a problem hiding this comment.
Thanks for this. Routing truncated or failed Research grades to the judge-failure sidecar, instead of scoring them as 0, is a real correctness fix, and the 60-answer regrade smoke is good evidence.
We checked the merged Hydra config: Research resolves to max_output_tokens: null with reasoning.effort: high, and Olympiad still resolves to 2048 with no effort. We also checked that the chat path omits max_tokens when unset, that finish_reason != "stop" catches length and content_filter, that the last-line parser cannot match the echoed VERDICT: <total_points> template, and that mean/rubric_score excludes sidecar rows. All 68 server tests pass against the PR head.
Two inline questions, both about Research grades that reach the sidecar even though the judge completed:
| json=request_params, | ||
| response_model=NeMoGymResponse, | ||
| ) | ||
| if self.config.judge_mode == "research" and judge_response.status != "completed": |
There was a problem hiding this comment.
resources_servers/frontierscience_judge/app.py:315
Response.status is Optional in openai 2.44, and azure_openai_model.responses() builds its NeMoGymResponse without a status (azure_openai_model/app.py:69). So with use_chat_completions_for_judge: false on that backend, every complete grade raises JudgeError: ... did not complete: None. This is not the default config, but could we reject only explicit non-completion?
| if self.config.judge_mode == "research" and judge_response.status != "completed": | |
| if self.config.judge_mode == "research" and judge_response.status not in (None, "completed"): |
There was a problem hiding this comment.
Addressed in f9cfba201.
Accept omitted status (None) as well as completed. Explicit non-completion status, incomplete_details or error still rejects a Research grade, even when status is absent. Added coverage for None/completed/incomplete/failed/cancelled/in_progress/queued, and missing status combined with explicit truncation/error. All 176 selected tests pass.
| return float(match.group(1)) | ||
|
|
||
| return None | ||
| match = _RUBRIC_VERDICT_RE.fullmatch(judge_text.strip().splitlines()[-1].strip()) |
There was a problem hiding this comment.
resources_servers/frontierscience_judge/app.py:121
The fullmatch on the last line rejects common harmless decorations: **VERDICT: 8**, `VERDICT: 8`, VERDICT: 8., or a trailing code fence. Those complete grades now become JudgeError. That departs from the boundary documented in nemo_gym/judge.py:25-26 (a received-but-unparseable response is scored, not raised), and after the retry budget the rollout silently drops out of accuracy and mean/rubric_score. Could the parser strip *, backticks and trailing punctuation/fences before matching? If the strict routing is deliberate, could the judge.py boundary note be updated to say so?
There was a problem hiding this comment.
Addressed in f9cfba201.
The final-verdict parser now strips cosmetic bold/inline-code wrappers, trailing punctuation and closing fences before matching. It still requires the final numeric VERDICT in range and rejects intermediate/legacy score formats and trailing prose. Added the requested decoration cases. Genuinely unusable Research grades remain retryable judge failures; clarified this benchmark-specific exception in judge.py, including the requirement to reject partial evaluations.
…n status Signed-off-by: Igor Gitman <[email protected]>
|
/ok to test f9cfba2 |
|
/ok to test 46b4ed2 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40318183558 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40325720784 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40334267854 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40355066832 |
FrontierScience Research now uses the exact Appendix B grading prompt, retaining paragraph structure without PDF line wrapping. It parses the final numeric VERDICT on the 0–10 rubric scale and reports the raw mean rubric score alongside solved rate (score >= 7). The example judge config uses high reasoning effort and no explicit output-token cap. EFB selects GPT-6.1 Sol and 16 repeats; that is a separate judge protocol from the paper's GPT-5.
Research rejects explicit judge failure/truncation and routes unusable grades to the judge-failure sidecar for recovery rather than treating the model answer as zero points. The shared judge documentation records this benchmark-specific exception. An omitted Responses status is accepted for backends such as Azure, while explicit incomplete_details/error still reject the grade. The final-verdict parser tolerates bold/inline-code wrappers, punctuation and closing code fences, without accepting intermediate scores, legacy score formats, out-of-range scores or trailing prose. Olympiad's prompt and budget remain unchanged. Completion checks must reject partial runs with outstanding failures.
No separate issue: focused corrections to the existing Research grading protocol.
Validation: