Skip to content

fix(omniscience): parse judge grade from unambiguous tokens only - #5783

Merged
AdamRajfer merged 6 commits into
mainfrom
arajfer/omniscience-judge-grade-parse
Nov 10, 2026
Merged

AdamRajfer merged 6 commits into
mainfrom
arajfer/omniscience-judge-grade-parse

Conversation

@AdamRajfer

@AdamRajfer AdamRajfer commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Judge replies such as ANSWER: B can be misgraded when the parser scans arbitrary capital letters. This change accepts unambiguous grades in explicit verdict positions and leaves prose, malformed alternatives and conflicting grades unparsed so the re-judge pass can ask again.

  • Preserve bare/final-line uppercase A/B/C/D, Markdown/punctuation wrappers and Unicode whitespace.
  • Accept closed line-start Grade/Verdict/Answer forms, uppercase grade keywords and consistent letter-plus-keyword forms.
  • Reject negated/prose/thinking content, connected alternatives and malformed or contradictory continuations.
  • Record only explicit verdicts, including an explicit B; fallback B remains grading-unknown.

This addresses Mahan's benchmark-owner review. All 17 requested tuples are in the 64-case real grading-context table, which checks both grade and parsed-dependency state. Sixteen cases fail the preceding parser revision. Both outdated bot threads are resolved with source/test evidence.

Two existing lifecycle-test checks exposed by CI also receive focused fixes. The process-supervisor matrix requests expiry after the tool has completed and its service is ready, preserving the cleanup grace and assertions. The MiMo Music timeout test waits within a bound for its original renderer to exit after group SIGKILL, handles PID reuse and removes a surviving test renderer on assertion failure. Its one-second scoring timeout, masking, failure-kind and scratch-cleanup requirements remain. Neither change alters production behavior; the original supervisor exit-137 cause and the exact earlier renderer timing were not reproduced.

Validation for current head d34daec781888fae8a85ddd505ae40c9aa3c045d:

  • Full pre-commit run --all-files and test-quality review passed on final contents.
  • 113 Omniscience tests and 52 core judge/grading tests passed at 00dec9b; their production source/tests are byte-identical at this head. Imports were verified against the managed checkout.
  • All 14 committed supervisor lifecycle cases passed current-head native Linux CI, including both grace cases. Earlier Linux validation also passed the full 51-test file, 70 repeated matrix cases, and a meaningful TERM-no-op mutant check.
  • Final MiMo component run: 62 passed in current-head native Linux CI, including the renderer-timeout test; 62 also passed locally. Additional Linux validation: 57 passed/5 abc2midi-dependent skips, 20 timeout repeats passed; a leader-only-kill mutant failed at the five-second bound and its renderer was cleaned up; restoring production source passed three more target runs. The exact final test blob was validated. macOS does not establish /proc behavior.
  • Inspected live smoke: all five committed examples completed and were healthy, ten real model calls returned HTTP 200, all five grades were parsed A with completed grading and reward 1. Policy used Responses API and judge used Chat Completions, both Luna with configured medium reasoning; judge cap explicitly overridden from 2048 to 32768. All question/gold/actual-policy-answer inputs and judge dependencies were inspected. Production source and inputs are identical to the clean smoked 00dec9b commit. This small integration smoke does not establish a Nano4 score/full evaluation or live B/C/D coverage; behavior tests cover those grades and malformed replies.
  • Current-head full native CI passed: all four core shards, eight server shards, sandbox, coverage, all nine conformance probes and their publisher, and the required Nemo_CICD_Test aggregate. The preceding head's incomplete/failed runs are superseded by this result.
  • Historical replay of 6,000 saved judge replies through the unchanged parser produced zero grade/parsed-state differences: A/B/C/D = 1488/3815/103/594, mean reward 0.248 and index -38.7833. This replay made no new model/judge calls.

The final strict incremental bot review found no unresolved prior findings or eligible new regressions, preserving the accepted parser/smoke evidence and checking the MiMo lifecycle-test change. All 69 current-head checks are terminal: 54 successful and 15 skipped, with no failures or pending checks. The bot review is COMMENTED/findings-only, so it does not supply formal approval. Mahan's re-review has been requested on GitHub; independent approval and the remaining native merge requirements still apply.

Prompts, shipped judge/generation settings and score mappings are unchanged. Newly handled judge formats can be graded differently or sent to re-judging; bare-letter replies are preserved. Mahan's requested chat-path thinking/older coverage work remains a separate follow-up, and #5431's overlapping Omniscience change needs dropping or rebasing after this lands. This existing PR tracks the parser fix; a separate public issue is unnecessary.

parse_judge_grade fell back to a substring test for the letters A-D on the
whole judge reply, so a reply such as NOT_ATTEMPTED returned "A" (scored
CORRECT) and CORRECT returned "C". The fallback also skipped
record_parsed_judge_verdict, leaving a wrong reward without a recorded verdict.

Accept a grade only as the bare letter, the last line, a labelled letter
("Grade: A"), or a single distinct grade keyword (CORRECT, INCORRECT,
PARTIAL_ANSWER, NOT_ATTEMPTED) matched as a whole token. Record the verdict
only for a parsed grade; anything else keeps the documented INCORRECT default
without a recorded verdict.

Signed-off-by: Adam Rajfer <[email protected]>

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

SHIP WITH CARE

I found two RISK-level parser issues and one RISK-level validation gap.

RISK — Provide the required benchmark reward comparison

This changes benchmark scores, not just parsing diagnostics. For example, NOT_ATTEMPTED previously returned A and now returns D, changing the verification result from reward 1.0 and omniscience index +1 to reward 0.0 and index 0. The PR reports unit tests but no measured before/after reward distribution. The pinned rubric requires that comparison for verifier changes to fixed evaluation benchmarks, even when the config remains unverified. The repository quality bar also requires representative real smoke rollouts for behavior changes.

Correction: Add the comparison to the PR description, including the sample count, policy/judge configurations, before/after mean reward, grade distribution, and unparsed count. Use the same saved answers and judge replies to isolate the parser change, and include an inspected representative real rollout. Explain the changed rows rather than treating unit-test results as rollout evidence.

Preservation and acceptance: Show that bare letters and whitespace-padded final letters retain their grades and rewards. Account for intended changes to keyword and wrapped-letter replies, and check that ambiguous replies remain unrecorded while explicit verdicts record grading. Report and explain any other deltas. These are proposed checks, not measured results from this review.

I inspected both changed files and traced the parser through both judge API paths, grading observation, reward mapping, and metrics. This was a static review; I didn't execute tests or model rollouts.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

Comment thread resources_servers/omniscience/app.py Resolved
Comment thread resources_servers/omniscience/app.py Resolved
@svcnvidia-nemo-ci svcnvidia-nemo-ci 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 Nov 7, 2026
Accept explicit answer labels without mistaking answer-option prose for a grade. Keep Unicode whitespace handling for final-line verdicts and leave connected alternatives unrecorded. Preserve the existing PR commits and current public main history.

Validation: 73 Omniscience tests and 52 core judge tests pass; pre-commit --all-files passes. Replaying 6000 saved judge replies preserves every grade and reward. A representative real smoke remains pending judge access.
Signed-off-by: Martyna Patelka <[email protected]>
@mpatel31415
mpatel31415 marked this pull request as draft November 9, 2026 10:05
@copy-pr-bot

copy-pr-bot Bot commented Nov 9, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

SHIP WITH CARE

Both prior parser findings are fixed by source inspection. The labelled-value extraction collects connected alternatives, and the final-line branch restores standard Unicode whitespace stripping. The regression tests distinguish parsed B from fallback B.

RISK — Complete and inspect the required real smoke

The validation finding from review 5808924458 is partly resolved. The PR now reports the requested before/after comparison over 6,000 saved judge replies: unchanged A/B/C/D counts of 1488/3815/103/594, mean reward 0.248, and zero unparsed replies. That supplies distribution evidence for the saved corpus.

The required representative real smoke remains incomplete. The description explicitly says the eight-task run is queued and its answers, judge replies, grading observations, rewards, and health artifacts haven't been inspected. AGENTS.md requires real model smoke rollouts and inspection of agent and verifier behavior for this behavior-changing environment work. Historical replay and an access probe don't validate the candidate's live agent-to-verifier path. This is a validation gap, not a demonstrated runtime failure.

Correction: Could you complete the submitted smoke using this candidate, inspect its agent and verifier outputs, and record the results in the PR description? Include the candidate SHA, dataset/sample count, effective policy and judge settings, completed/failed/unparsed counts, grade distribution, mean reward, and any health failures. Verify that the question, gold answer, and actual policy answer reach the judge prompt. No source patch is indicated by this evidence gap.

Acceptance and preservation:

  • Inspect each completed smoke row's answer, raw judge reply, verdict, grading observation, and reward together. Preserve the score contract: A gives reward 1 and index +1; B gives reward 0 and index −1; C/D give reward 0 and index 0; only B contributes to hallucination. An identified, explicitly parsed reply should complete grading; ambiguous fallback B should remain unknown under the observer contract.
  • Retain the existing regression assertions: Grade: A/B, The grade is A or B, and Grade: A/B; Grade: A return unrecorded B; non-breaking-space-padded final A/B remain recorded; Grade: **B** and The grade is A based on option B remain recorded B/A. Preserve bare-letter grades/rewards and the existing keyword mappings. The smoke needn't manufacture malformed replies or contain every grade; retain behavior-test coverage for cases it doesn't encounter and state that limitation.

These are proposed acceptance checks, not executed results. I completed the follow-up inspection of both changed files, compared the fixes with the previous reviewed tree, and traced the affected judge, observation, reward, and metric paths. I didn't execute tests or rollouts or inspect the private replay artifacts. Discovery was limited to prior findings and subsequent changes under the follow-up impact filter.

Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.

@mahanfathi mahanfathi 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.

AA-Omniscience benchmark owner review at ff490938: requesting changes for one parser issue. The rest of what I checked holds up: tests, lint, replays of saved runs and the judge failure paths. One small test addition and the pending smoke are also listed below. We'd like this merged before 11/12, and I'll re-review within a few hours of a fix.

What I ran (real code at ff490938 and at its base 363af5e3, on a compute node)

  1. Tests and lint. The 73 omniscience tests pass. ruff check, ruff format --check and pre-commit pass on both changed files.
  2. Replays. I replayed 11 saved internal AA-Omniscience runs (32,976 judge replies) through verify() and compute_metrics(), with the judge answering each row with its recorded reply.
    • The base reproduces every stored verdict and headline.
    • This PR changes 5 rows, all in two early runs of a different model:
      • INCORRECT (3 rows): partial becomes incorrect.
      • {"question_id":"question_id","answer":"NOT_ATTEMPTED"}: correct becomes not attempted.
      • <your_message>A</your_message>: correct becomes an unparsed B, which the re-judge pass would ask again.
    • The two headlines move from -37.61 to -37.76 and from -36.05 to -36.08.
    • All 18,000 replies in the three runs of the main model under evaluation are bare letters, so nothing changes there. That matches your 6,000-reply comparison.
  3. Failure paths. Judge HTTP 500 (three attempts), HTTP 400 and empty replies are still masked as judge_failed.

Blocking: a grade named in prose becomes a final, wrong grade

When a reply names a single grade anywhere in its text, as a keyword or a labelled letter, that grade is accepted and recorded as a parsed verdict, so the end-of-run re-judge pass never asks again. On the base these replies are left unparsed (grading unknown), so the re-judge pass of gym eval run asks the judge again. With this PR, several become final and wrong:

Judge reply Base (363af5e3) This PR
NOT CORRECT C, unknown A, completed (reward 1, index +1)
It is not CORRECT C, unknown A, completed
The predicted answer is NOT CORRECT. C, unknown A, completed
PARTIALLY CORRECT A, unknown A, completed
<think>Is it CORRECT? No.</think>B B, unknown A, completed (the chat judge path does not strip think blocks)
A\n\nExplanation: the answer is B-level A, unknown B, completed
The gold answer is C and the predicted answer is C++, which is different. C, unknown C, completed

None of these shapes appear in the saved runs. Prose replies are plausible, though: the judge prompt's own examples are written as "This is CORRECT because ...".

One fix: count a label or keyword only when it is the whole reply, begins a line (optionally after "The" or "Final": Grade: A, ANSWER: B, The grade is NOT_ATTEMPTED because ..., Final grade: C), or follows the line's own grade letter (C: PARTIAL_ANSWER). As far as I can tell, this keeps every expectation in your current tests. The trade-off: a prose reply such as "This is CORRECT because ...", or the saved JSON reply above, would go to the re-judge pass instead of being graded directly. The lead-ins need to be a closed list, so that The gold answer is C ... stays unparsed.

Acceptance cases for the fix (each must come back unparsed, or with the grade the tuple shows):

("NOT CORRECT", "B", False),
("It is not CORRECT", "B", False),
("PARTIALLY CORRECT", "B", False),
("<think>Is it CORRECT? No.</think>B", "B", False),  # True if think blocks are stripped first
("A\n\nExplanation: the answer is B-level", "B", False),
("The gold answer is C and the predicted answer is C++, which is different.", "B", False),

Before merge (small)

  1. Tests. The shipped tests catch 18 of 23 one-line mutants of the new parser. Four of the five survivors are behaviours no test covers:

    • & and | as connectors;
    • the word boundary after a labelled letter (without it, Predicted answer: Berlin is recorded as a parsed B, and Predicted answer: Athens as A);
    • the Verdict label;
    • stripping the reply before the bare-letter check ("A\n").

    The fifth (a case-insensitive labelled letter) only differs for replies like Grade: a/B. These cases kill the four, pass on ff490938, and should still pass under the rule above:

    ("A\n", "A", True),
    ("INCORRECT", "B", True),
    ("<your_message>A</your_message>", "B", False),
    ("b", "B", False),
    ("Verdict: D", "D", True),
    ("Reasoning...\nFinal grade: C", "C", True),
    ("Grade: A & B", "B", False),
    ("Grade: A | C", "B", False),
    ("Predicted answer: Berlin", "B", False),
    ("The predicted answer is a city in France.", "B", False),
    ("B\nA", "A", True),
  2. Smoke. The required real smoke is still marked queued in the description. Please inspect it before merging.

Not blocking
3. Overlap. #5431 also changes parse_judge_grade, so its omniscience commit needs dropping or rebasing after this lands.
4. Existing gaps, separate PR. Thirteen older mutants survive the shipped tests. Eleven of them change scored behaviour:

  • an empty judge reply graded B instead of failing;
  • an unclosed <thinking> block not treated as an empty answer;
  • four chat-path settings (the tests only exercise the Responses judge path, while configs/omniscience.yaml sets use_chat_completions_for_judge: true);
  • five compute_metrics() and key-metric mutations.

The other two (the score function's default verdict and the majority-vote answer key) change no headline metric. I have tests that kill the eleven and can send them separately. Stripping think blocks on the chat judge path, as the Responses path already does, belongs in the same follow-up.

@mpatel31415
mpatel31415 disabled auto-merge November 10, 2026 09:39
@mpatel31415

Copy link
Copy Markdown
Contributor

Current-parser live smoke is complete, addressing the evidence request in the latest bot review.

Ran the supported Gym evaluation path against clean commit 00dec9b0f70bd5695522a8c18cab7ca42f2a286c, using all five committed resources_servers/omniscience/data/example.jsonl tasks, one repeat, concurrency 1 and one agent step. Current head 68756484ed18ed6e253165c2e54f4736662dc9e4 changes only the supervisor test fixture; production agent, verifier, parser and example inputs are byte-identical to the smoked commit.

Policy and judge: openai/openai/gpt-5.6-luna; policy uses Responses API, medium reasoning, 4096 output tokens; judge uses Chat Completions, configured medium reasoning, 32768 output tokens. Both use temperature 0 and top_p 1. The judge token cap explicitly overrides the example's shipped 2048 cap. These settings validate the parser integration; they do not establish a Nano4 benchmark score.

Result: 5/5 completed and healthy, ten real model calls / ten HTTP attempts / ten HTTP 200s, zero transport failures or retries, zero unparsed grades. Each real judge response was A, each grading operation completed, and each reward/index contribution was +1. Mean reward: 1.0. All five question + gold + extracted policy answer inputs were checked in the actual judge prompts, and each recorded judge dependency matched its captured response.

Question Gold Extracted policy answer Actual judge Parsed / reward
Speed of light in vacuum, m/s 299792458 299,792,458 m/s A A / 1
Berlin Wall fall year 1989 1989 A A / 1
Astral Python package manager uv uv A A / 1
Insulin-producing organ Pancreas The pancreas. A A / 1
US amendment abolishing slavery 13th Amendment The Thirteenth Amendment. A A / 1

No recorded rollout-health issues; the failure artifact is empty. Cross-repeat consistency checks are unobserved with one repeat. Only A occurred in this small smoke; B/C/D, malformed replies and grading-unknown behavior are exercised by the component tests. Configured judge effort is recorded, rather than asserted from a provider-wire audit. All local servers exited and their ports were verified closed.

Retained artifact SHA-256 identifiers:

  • Rollouts: 7c2adfef4423ebaaec2f95b9f7731641bfb328f0512a90f27216454153b71a68
  • Materialized inputs: f8cf06ada5aecb340050dc5d6a3ba3580b79e78a0afd283e50f7331ca44435bc
  • Resolved configuration: a072297c39e49c9a1339c3d22cda7eb11cf4fc764d716b3bb6f71a0e4efe0db0

The new test-only commit waits for the completed-tool/service-ready phase before requesting timeout, while preserving the 0.5-second cleanup grace and existing assertions. Linux validation of the equivalent fixture: full file 51 passed; five matrix repeats 70 passed. A TERM-no-op mutant failed both grace cases; restoring TERM passed both. This establishes meaningful cleanup coverage; it does not prove the previous CI exit-137 cause. Full pre-commit passed; new-head native CI is pending.

@mpatel31415

Copy link
Copy Markdown
Contributor

/review approve=false reset=false mode=strict prompt="Review 6875648, Mahan5831435973 and smoke evidence comment6764274522. Verify parser grading-state behavior and the readiness-before-expiry supervisor test change; consider Linux51+70 and mutant evidence. Report remaining actionable issues."

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

SHIP

No unresolved prior findings or eligible new regressions found in this follow-up.

The parser and grading-context tests match the previous reviewed tree. Source inspection confirms that the earlier alternatives, Unicode-whitespace, and Mahan-listed counterexamples remain fixed. Explicit B records a parsed dependency; fallback B leaves grading unknown.

The supplied live-smoke report addresses the remaining validation finding from review 5839650186. It reports five completed example tasks, five parsed A grades, mean reward 1.0, no failed or unparsed grades, inspected policy-to-judge inputs, and artifact hashes. It identifies both API paths and the judge-cap override. The relevant production source and inputs match the smoked commit. This satisfies the concrete integration-smoke request; it doesn't establish a full benchmark score or live coverage of B/C/D and malformed replies.

The supervisor fixture change waits for tool completion and service readiness before requesting expiry. The supervisor implementation routes expiry and elapsed deadlines through the same TERM/grace/KILL path. The bounded readiness wait, 0.5-second cleanup grace, and receipt, checkpoint, process-group, and service assertions remain intact across all 14 matrix cases.

I completed the three-topic static follow-up against 00dec9b, including the directly affected contracts, under the existing impact filter—not a fresh whole-PR review. I didn't execute tests or rollouts, inspect private artifacts, or independently verify the reported Linux 51-test run, 70 repeated cases, or TERM-mutant results. Current-head native CI is reported as running; I haven't counted it as passed.

Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.

@mpatel31415

Copy link
Copy Markdown
Contributor

Test-only CI follow-up at d34daec781888fae8a85ddd505ae40c9aa3c045d:

The broader server suite exposed mimo_music::test_real_timeout_reaps_renderer reading the renderer's /proc state immediately after group SIGKILL and waiting for the direct scorer. It observed R; that trace did not establish a persistent renderer leak. The renderer inherits the scorer's process group, but waiting for the direct worker does not synchronize the grandchild's state transition.

The test now polls for the original renderer to disappear or become a zombie, with a five-second deadline. It handles a disappearing stat file and PID reuse, and cleans up a surviving test renderer on failure. The real one-second scoring timeout, masked-timeout/failure-kind checks and scratch-directory cleanup assertion remain. Production code and scoring are unchanged.

Validation of the exact committed test blob c3060118e0366e66c08f03a9d6aad2d0cc2a0725:

  • Final local component run: 62 passed, no skips, with abc2midi available. macOS does not exercise the /proc observation.
  • Linux scratch component run: 57 passed, 5 skipped because abc2midi was unavailable; the fake-renderer timeout test did execute. 20 repeated timeout cases passed. Ten baseline timeout cases also passed, so the earlier CI timing was not reproduced.
  • Meaningful Linux mutant: replace group kill with leader-only kill. The actual renderer survived, and the new assertion failed at its five-second bound. The test's failure cleanup left no fake renderer survivor. Restoring the exact production app source produced three passing target runs.
  • Full pre-commit and test-quality review passed on the final contents. The new native full CI run is running; Linux scratch results do not substitute for its final outcome.

The previously inspected five-example live parser smoke still applies: the only changes from its clean 00dec9b source are the two lifecycle test fixtures. The preceding bot follow-up found no remaining parser/smoke issue; this additional test-only change is being submitted for incremental review.

@mpatel31415

Copy link
Copy Markdown
Contributor

/review approve=false reset=false mode=strict prompt="Review d34daec incrementally. Check MiMo renderer timeout test against evidence comment6764987350, especially bounded observation, PID identity and failure cleanup. Preserve parser/smoke acceptance from review5839993783; report remaining actionable issues."

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

SHIP

No unresolved prior findings or eligible new regressions found in this follow-up.

The MiMo timeout test now polls for disappearance or zombie state within a five-second monotonic deadline instead of requiring an immediate transition. It handles a disappearing stat file, compares process start-times during observation, and rechecks the first observed identity before failure cleanup. The one-second scoring timeout, masked-timeout classification, and scratch-directory removal assertion remain. The server timeout path kills the scorer's process group and waits for the direct scorer; the renderer launch inherits that group. This supports allowing time for the renderer's separate exit transition.

The parser, grading-context tests, and supervisor fixture match the previously reviewed tree. The accepted alternatives, Unicode-whitespace, prose and negation cases remain preserved, including the distinction between parsed B and unrecorded fallback B. Nothing inspected invalidates review 5839993783's acceptance of the five-example live smoke. That smoke establishes limited integration evidence, not a full benchmark score or live coverage of every grade.

I completed all three static review topics against 68756484, including directly affected contracts, under the existing incremental scope and impact filter—not a fresh whole-PR review. I didn't execute tests or rollouts, inspect private artifacts, or independently reproduce the reported Linux repeats and mutant results. The reported abc2midi-dependent skips aren't passes, and macOS doesn't establish Linux /proc coverage. Current-head native CI is reported as running; I haven't counted it as passed.

Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.

@mahanfathi mahanfathi 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.

Re-review at d34daec7: approving the omniscience change. The blocking issue from my review is fixed, the 17 acceptance cases pass, and the smaller requests are done. Thanks for the quick turnaround. Please merge it as it is: our internal mirror takes this parser and this test file unchanged.

My approval covers resources_servers/omniscience. The two other test files (mimo_music and the process supervisor) are test-only and pass in CI, but they are outside AA-Omniscience, and #5450 edits the same mimo_music test.

What I ran (the real code at d34daec7, on a compute node)

  1. Tests and lint. The 113 omniscience tests pass. ruff check, ruff format --check and pre-commit pass on the four changed files. test_process_supervisor.py passes (51 tests).
  2. The 17 acceptance cases. All 17 return the expected grade and the expected parsed or unparsed state, in the parser and through verify(). They are also in your tests, each with both assertions.
  3. More reply shapes. I ran 223 judge replies through the parser and verify(). Bare letters, labelled grades and keywords are graded as intended. The negations, connected alternatives, JSON, markdown labels and Unicode look-alike letters from my first review stay unparsed and get the fallback B. The exceptions I found are in the table further down.
  4. Replays. I replayed the same 11 saved internal runs (32,976 judge replies).
    • 5 rows change against main, the same 5 rows as before, in the two early runs of a different model:
      • INCORRECT (3 rows): partial becomes incorrect.
      • {"question_id":"question_id","answer":"NOT_ATTEMPTED"} and <your_message>A</your_message>: correct becomes an unparsed B.
    • All 18,000 replies in the three runs of the main model under evaluation are bare letters. Nothing changes there.
  5. Mutants. The tests kill 32 of 35 one-line mutants of the final parser (18 of 23 before). Of the three survivors, one is equivalent: the boundary in the keyword lookahead repeats the token's own boundary. The other two are small test gaps:
    • no test has an upper-case think tag (<THINK>);
    • no test has a label with no separator (Grade A).
  6. Together with #5891. main + this PR + #5891 (AA-Omniscience v1.1) merge cleanly in either order. On the merged tree the 113 tests pass, and a live 12-question smoke graded all 12 rollouts (1 correct, 11 not attempted), each from a bare-letter judge reply.

A correction to my first review: an unparsed reply is not judged again

I wrote that the re-judge pass of gym eval run asks the judge again for an unparsed reply. For this server that is not true, on main or here.

  • omniscience does not declare REVERIFY_MODE, so it reports UNKNOWN. The end-of-run pass only re-judges saved results of STATELESS servers and leaves the others as they are (_drop_unsupported_saved_results).
  • So the fallback B of an unparsed reply counts as incorrect (index -1), with grading recorded as unknown.
  • This PR does not introduce the gap: main does not judge these replies again either. It does change their grade. main takes the first capital A, B, C or D anywhere in the reply, and this PR records B.
  • On the six saved replies that are not a bare letter this is a net gain: main grades four of them wrongly, this PR two. But <your_message>A</your_message> goes from correct to incorrect.
  • One consequence: a reply that explains its grade can now be counted as incorrect. Three replies that come back as an unparsed B (main gives A, C and C):
    • A, a blank line, then The predicted answer matches the gold target.
    • CORRECT: the predicted answer matches the gold target.
    • This is CORRECT because the predicted answer is equivalent to the gold target.
  • Not blocking. All 18,000 replies of the model under evaluation and all 3,000 replies of our full v1.1 run are bare letters. Across the 32,976 replayed replies, all from the GPT-5.6 Luna judge, six are not, and three of those end as an unparsed B here. That is about 1 reply in 11,000.
  • Before merging, please correct two sentences in the PR description (no new commit needed): "so the re-judge pass can ask again" in the first paragraph, and "or sent to re-judging" in the compatibility paragraph. For this server such a reply is counted as incorrect. The docstring's "can be graded again" can wait for the follow-up.
  • It is the first item for the follow-up: declare REVERIFY_MODE = STATELESS as simpleqa does, or raise JudgeError for a reply with no usable grade, so that the row is masked and retried.

Not blocking: prose that still becomes a final grade

Most of these follow from the rule I proposed (a label or a keyword at the start of a line). The think-block row comes from the final-line rule that main already has, and the cut-off list from : counting as a wrapper. None of these shapes occurs in the 32,976 saved replies, so I am not asking for a change here. I list them so that they are on record for the follow-up:

Judge reply Result at d34daec7
Answer: A different year (1990) was given, so this is incorrect. A, parsed
CORRECT answer would be 1989, but the model said 1990. A, parsed
CORRECT? No, the answers differ. A, parsed
Answer: C# C, parsed
<think>Let me consider the options:\nA (an unclosed think block that ends in a letter) A, parsed
Grade A would require an exact match, so this is B. A, parsed
A: CORRECT\nB: INCORRECT\nC: (an option list cut off after a letter) C, parsed
B, a blank line, then The answer is CORRECT to one significant figure, but the gold target requires three. A, parsed
The grade is not\nA A, parsed
Grade: A,B (a full-width comma) A, parsed

Changes that would close most of them:

  • accept an explicit verdict only when the rest of the line is empty, closing punctuation or a short closed list of continuations (because, since, based on, -, ();
  • require a separator after Grade and Verdict, as Answer already does;
  • check for think tags before the final-line rule;
  • stop treating : as a wrapper on the last line (B: alone is a parsed B today).

For a follow-up PR, not this one

  • The items above, stripping think blocks on the chat judge path, and the older test gaps from my first review.
  • The score-triage skill note (benchmark-notes.md) still describes the substring parser and needs an update.
  • #5431 still needs to drop or rebase its omniscience commit after this lands.

@AdamRajfer
AdamRajfer added this pull request to the merge queue Nov 10, 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/42865311174

@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/42865622373

Merged via the queue into main with commit 3de8591 Nov 10, 2026
69 checks passed
@AdamRajfer
AdamRajfer deleted the arajfer/omniscience-judge-grade-parse branch November 10, 2026 17:46
khazic pushed a commit to khazic/Gym-lao that referenced this pull request Nov 23, 2026
…ure (NVIDIA-NeMo#6541)

* test(omniscience): cover the chat judge path, empty judge replies and the metric formulas

The shipped tests only exercise the Responses judge path, while
resources_servers/omniscience/configs/omniscience.yaml selects Chat
Completions. They also leave the metric formulas and two failure paths
unpinned. These tests add:

- the Chat Completions judge request: endpoint, max_tokens, temperature
  and top_p come from the config, and the prompt carries the question;
- an empty judge reply raises JudgeError instead of being graded;
- an unclosed <thinking> block is an empty answer, as <think> already is;
- compute_metrics() and the key metrics against the AA-Omniscience
  formulas: index = 100 * (correct - incorrect) / n, hallucination =
  100 * incorrect / (n - correct).

Test only. No production code changes.

Signed-off-by: Mahan Fathi <[email protected]>
Signed-off-by: plaszkiewicz <[email protected]>

* fix(omniscience): treat a judge reply without a grade as a judge failure

A judge reply with no unambiguous grade was counted as INCORRECT (index -1)
and never graded again, because omniscience does not take part in the
end-of-run re-judge pass. It now raises JudgeError, so the row is masked
and graded again from its saved answer, like an empty judge reply.

The parser follow-ups from the NVIDIA-NeMo#5783 review:
- an explicit verdict counts only when the rest of its line is empty,
  closing punctuation or a short reason (because, since, based on, -, ();
- Grade and Verdict need a separator, as Answer already does;
- leftover think tags are checked before the last-line rule;
- ':' is no longer a wrapper of the last line (a lone "B:" is not a grade);
- the Chat Completions judge path strips think blocks like the Responses path.

Tests: the reply shapes listed in the NVIDIA-NeMo#5783 review, the two surviving
mutants (upper-case think tag, label without separator), a Chat Completions
judge reply with a think block, a judge reply without a grade, and the
TaskData/OmniscienceRunRequest field agreement asked for in NVIDIA-NeMo#5891. The
Chat Completions judge request, the unclosed <thinking> block and the index
and hallucination formulas are covered by the previous commit. The
score-triage note now describes the parser as it is.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
(cherry picked from commit 56e1b2f24aacf6928239d59454ed1aabc3e89e5b)
Signed-off-by: plaszkiewicz <[email protected]>

* fix(omniscience): reject a reply whose skipped verdict line contradicts the grade

A verdict line with a tail the parser does not accept still does not count, but its letters must agree with the grade the other lines give. Patch by Mahan Fathi from the NVIDIA-NeMo#6541 review (request 1).

Co-authored-by: Mahan Fathi <[email protected]>
Signed-off-by: FrontierJam Agent <[email protected]>
Signed-off-by: plaszkiewicz <[email protected]>

* test(omniscience): cover verdict tails on later clauses and lines, check TaskData both ways

Review of NVIDIA-NeMo#6541, requests 2 and 3: the tail-rule rows and the JudgeError message match from Mahan Fathi, and the two-way TaskData agreement test from the review bot.

Signed-off-by: FrontierJam Agent <[email protected]>
Signed-off-by: plaszkiewicz <[email protected]>

* docs(omniscience): correct the judge_failed note in benchmark-notes

Review of NVIDIA-NeMo#6541, request 4: last-line precedence, where the rejected reply is kept, and what happens after the second ask.

Signed-off-by: FrontierJam Agent <[email protected]>
Signed-off-by: plaszkiewicz <[email protected]>

* feat(omniscience): make GPT-5.6 Luna (medium) the default judge

openai/gpt-oss-20b, the default judge, was retired on integrate.api.nvidia.com on 2026-11-18 (HTTP 410), so the default config failed on every row. The default is now the judge request EFB uses: Chat Completions, reasoning_effort medium and a 32,768-token judge output cap, on inference-api.nvidia.com with JUDGE_API_KEY. omniscience_judge_base_url, omniscience_judge_api_key and omniscience_judge_model_name select another endpoint, key or model, as in nemotron_recipes/super-3.5. The Nemotron 3.5 Super eval container keeps its Gemini judge request unchanged. Requested by Mahan Fathi in the NVIDIA-NeMo#6541 review.

Signed-off-by: FrontierJam Agent <[email protected]>
Signed-off-by: plaszkiewicz <[email protected]>

* chore(omniscience): drop explanatory comments added in the follow-up

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: plaszkiewicz <[email protected]>

* fix(omniscience): keep the Super 3.5 core batch judge request unchanged

The core batch config also loads the omniscience benchmark config with its
Gemini judge. Drop the Luna default's extra_body there and keep the 2048-token
cap, as the eval container config does.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: plaszkiewicz <[email protected]>

---------

Signed-off-by: Mahan Fathi <[email protected]>
Signed-off-by: plaszkiewicz <[email protected]>
Signed-off-by: FrontierJam Agent <[email protected]>
Co-authored-by: Mahan Fathi <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>

This branch was previously deployed

1 inactive deployment
public — d34daec7 Deployed Nov 10, 2026 by copy-pr-bot[bot] via release / finalize / notify #11388
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 needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants