Repository navigation
Description
Queue rank 41/48 · Difficulty 3/5 · Status on main: not_fixed
NVBug: https://nvbugspro.nvidia.com/bug/6900506 · NVBug priority: Unprioritized · ARB: Ananth Subramaniam
GitHub: no fixing PR. Related: open issue #3035 (same code path, coordinate); precedent PR #1844 / issue #1790 (mcqa boxed+LaTeX); closed-unmerged PR #2128.
Summary
resources_servers/reasoning_gym/app.py _extract_answer_from_response misscores correct answers two ways. Part 1: with no <answer> tags it scores the "".join of every assistant message, so Fabric/DeepAgents narration and inline reasoning reach the knights_knaves scorer and a correct final answer gets 0.0. Part 2: the \boxed{} fallback takes the first box, stops at the first }, and passes LaTeX (\ , \text{}) to the scorer unnormalized, so boxed answers score 0.0 or 0.65. Not an rc1 regression; same code since v0.6.0.
Reproduction
Deterministic, no GPU (reasoning_gym server venv): run the two in-process scripts in the bug record against this checkout. Part 1 cases A/B score 0.0 on a gold final answer; Part 2 cases 3/4/5/6 score 0.0/0.65 on gold boxed answers. Also: rescoring the shipped environments/nemo_fabric_deepagents_reasoning_gym/data/example_rollouts.jsonl gives 0.0 on all 5 rows whose final line equals gold.
Root cause
app.py:97 joins all messages; app.py:100 keeps the last <answer> but there is no tag when the env never asks for one; app.py:108 re.search(r"\\boxed\{([^}]+)\}", full_text) = first match, no brace balancing, no LaTeX normalization. nemo_fabric_deepagents_reasoning_gym/config.yaml:30-31 system_prompt requests no delimiter.
Status on main (not_fixed)
HEAD 75bb53e. git log 8555fc3c..HEAD -- resources_servers/reasoning_gym/app.py and the env dir are empty; defective lines 97/100/108 unchanged. config.yaml still has no delimiter; shipped example_rollouts.jsonl still 0.0 x5. tests/test_app.py has only single-message gold controls, no multi-message or \boxed case. issue #3035 OPEN (same path); PR #2128 CLOSED-unmerged.
Proposed fix
- Prompt (Part 1): add the sibling delimiter suffix to
data/example.jsonl, or set config.yaml system_prompt likereasoning_gym_langchain_deepagents_agent_model_server.yaml:34; then regenerate example_rollouts.jsonl. - Verifier (Part 2): in
_extract_answer_from_responsereusemcqa._extract_boxed_inner+ extended_strip_latex_wrappers(ormath_with_judge._extract_last_boxed_answer): last balanced box, normalize\/~/\text{}. Prefer last assistant message on no-tag. - Add unit tests (multi-message gold; boxed
\,\text{}, draft-then-final).
Validation
QA: testcases/environments/nemo_fabric_deepagents_reasoning_gym.py (relax line 95 prompt-identity assert) and testcases/environments/hermes_reasoning_gym.py (add a \boxed{\ }/\text{} gold control). The bug record also lists langchain_deepagents_agent and model_call_capture_agents as referencing cases. Re-run both reasoning_gym e2e cases.
Triage
Difficulty 3/5 — several files plus a design choice (prompt + verifier, both needed) and new tests, but root cause pinpointed and reusable helpers exist. Effort ~8 h. Needs GPU/model: no. External dependency: none (coordinate merge order with open issue #3035).
Reviewer notes
Verifier confirmed not_fixed and difficulty 3; lines 95/97/100/108, config:30, and testcase refs all verified. Corrections applied: the Linear title uses the draft H1 (the structured 95-char variant was dropped as too long); Validation now notes the bug record's two additional referencing QA cases (langchain_deepagents_agent, model_call_capture_agents). The mcqa precedent helpers (#1844/#1790) exist on main.
Activity