Skip to content

[NVBug 6758385] Give orchestrator workers context and preserve the math boxed-answer format #4527

Open

Description

@qiaochuz-nv

Queue rank 38/48 · Difficulty 3/5 · Status on main: not_fixed

NVBug: https://nvbugspro.nvidia.com/bug/6758385 · NVBug priority: Unprioritized · ARB: Virginia Wu
GitHub: none found (tracked in JIRA NMGYM-53: https://nvidia.atlassian.net/browse/NMGYM-53)

Summary

The LangGraph orchestrator agent has two contract gaps on the langgraph_orchestrator_math workflow. (1) It asks for "independent, self-contained" subtasks but never validates that, and dispatches each worker with only the subtask text — no original task, no prior subtask results — so dependent subtasks fabricate or request missing prerequisites. (2) Synthesis instructs the model to wrap answers in <answer></answer> tags, but the math verifier requires \boxed{}, so correct answers can still score 0.

Reproduction

cd nmfw_tests/nemo_llm/test_suite/nemo-gym
./run.sh test langgraph_orchestrator_math --ref <gym-ref>

Inspect rollouts by _ng_task_index == 4: a dependent SUBTASK reaches a worker without its prerequisite; final combined response has no \boxed{}, so extracted_answer=null, reward 0.

Root cause

Confirmed in code. orchestrator_agent.py:149 builds the dispatch prompt from {subtask} only; _call_model (:104-106) replaces input with that single message, so accumulated state never reaches workers. :131-132 only falls back when zero subtasks parse — no dependency/validation. SYNTHESIZE_PROMPT (:60-61) requires <answer> tags, contradicting math_with_judge/app.py:231-232, which returns 0.0,None,0.0,None when no \boxed{} is present (should_use_judge: false in config).

Status on main (not_fixed)

git diff d33e04575..HEAD on orchestrator_agent.py shows only ray_enabled = False added (chore b4d3fbc); prompts and dispatch are byte-identical. Both defect sites are present verbatim on HEAD 75bb53e. No commit since d33e changes the boxed gate (math_with_judge/app.py:231-232 net-unchanged).

Proposed fix

In responses_api_agents/langgraph_agent/orchestrator_agent.py: include the original task plus accumulated subtask_results in each dispatch prompt (or enforce the self-contained contract and replan/fall back on dependent references); make SYNTHESIZE_PROMPT honor the environment answer contract — require a final \boxed{...} for math (keep it configurable for non-math envs). Add deterministic adapter tests: dependent plan asserts the worker receives context or the plan is rejected; synthesis output carries \boxed{}.

Validation

Re-run QA testcases/environments/langgraph_orchestrator_math.py (hosted inference, 0 GPUs); confirm dependent subtasks get prerequisites and the combined response contains a complete boxed answer that reaches the real verifier.

Triage

Difficulty 3/5 — localized to one agent file but bundles a format one-liner with a decomposition-contract design choice (ARB-owned) needing new deterministic tests and a model smoke run. Effort ~8 h. Needs GPU/model: no GPU; a model endpoint for the smoke rollout.

Reviewer notes

Verifier confirmed not_fixed (high confidence) and difficulty 3. Corrections applied: boxed gate line ref fixed to app.py:231-232 (was :230-231); status reworded so the boxed gate is stated net-unchanged since d33e rather than attributed to two named commits. Dropped an inaccurate "v0.7.0 reachable" claim; QA testcase name matches the bug record.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions