Skip to content

fix(frontierscience): use paper rubric prompt and reject failed grades - #4891

Merged
marcromeyn merged 6 commits into
mainfrom
codex/frontierscience-paper-judge-public
Oct 26, 2026
Merged

marcromeyn merged 6 commits into
mainfrom
codex/frontierscience-paper-judge-public

Conversation

@Kipok

@Kipok Kipok commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • 176 tests passed across FrontierScience, shared judge helpers and simple_agent. Tests cover optional/explicit completion states, failure evidence with omitted status, cosmetic formatting, strict numeric bounds/final-line semantics and sidecar routing.
  • pre-commit run --all-files passed, including guardwords; DCO sign-off included.
  • Earlier real-judge regrade evidence: 60 saved step300 answers, GPT-6.1 Sol high effort with no explicit output cap; solved rate remained 10%, raw rubric mean moved from 3.860583 to 4.006375, with two threshold flips in each direction. That replay predates the later formatting/status compatibility cleanup; no fresh inference was needed for these parsing/error-metadata changes.
  • Full repository CI and reviewer approval remain outstanding.

@Kipok Kipok added bug Something isn't working area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers needs-review PR is ready for code review and waiting on a reviewer labels Oct 21, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 21, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@yaoyu-33 yaoyu-33 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Suggested change
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"):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@yaoyu-33

Copy link
Copy Markdown
Contributor

/ok to test f9cfba2

@yaoyu-33 yaoyu-33 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM at f9cfba2.

@yaoyu-33 yaoyu-33 added ready-to-merge PR is approved, current, and waiting for final CI or merge and removed needs-review PR is ready for code review and waiting on a reviewer labels Oct 23, 2026
@marcromeyn

Copy link
Copy Markdown
Contributor

/ok to test 46b4ed2

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40318183558

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40325720784

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40334267854

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Oct 26, 2026
@marcromeyn
marcromeyn added this pull request to the merge queue Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40355066832

Merged via the queue into main with commit 16b133e Oct 26, 2026
54 of 57 checks passed
@marcromeyn
marcromeyn deleted the codex/frontierscience-paper-judge-public branch October 26, 2026 16:27

This branch was previously deployed

1 inactive deployment
public — 46b4ed26 Deployed Oct 26, 2026 by copy-pr-bot[bot] via release / finalize / notify #7265
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers bug Something isn't working ready-to-merge PR is approved, current, and waiting for final CI or merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants