Skip to content

feat(agentic-if-realworld): add private-data instruction-following benchmark - #5013

Merged
adil-a merged 27 commits into
NVIDIA-NeMo:mainfrom
ericyang0:ericyang/agentic-if-realworld-gym
Nov 8, 2026
Merged

adil-a merged 27 commits into
NVIDIA-NeMo:mainfrom
ericyang0:ericyang/agentic-if-realworld-gym

Conversation

@ericyang0

@ericyang0 ericyang0 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark and privacy

Adds Agentic IF Realworld: 969 frozen evaluation tasks / 2,803 instruction checks for N4. Each task generates one assistant turn from the full captured prefix and embedded tool definitions, without tool execution.

Real traces, criteria, original policy prompts and receipts remain in NVIDIA's internal registry/private storage. This public PR contains code, configuration, synthetic fixtures and aggregate evidence. Rollout upload stays disabled.

Implementation

  • Uses Gym's standard agent, a text adapter and a Resources Server with the frozen strict-v2.2 validator. Unresolved scoring is masked.
  • The adaptive driver preserves the first complete answer and resumes generation and judging independently. Earlier recovery, credential-routing and reconciliation fixes remain intact.
  • evidence_ids_v1 is the default: judges select instruction and response-span IDs; code restores exact text before unchanged validation. Historical quote runs retain their original runtime, settings and grades.

Validation

Current change: 5904731a.

  • 50-task real adaptive run: GLM-5.3/max + GPT-6.1 Sol/medium; 33 pass, 17 fail, zero masked. All 50 judge calls returned HTTP 200 and passed validation on their first attempt; no judge retries or validation failures.
  • Policy generation recovered from 194 HTTP 429s across 244 physical attempts. These errors are included in the validation record.
  • Completed resume made zero model calls, preserving 940 immutable files and every saved answer/grade. Preparation, environment validation, rollout health and P0 checks passed.
  • 258 component/model tests, all-files pre-commit and a privacy scan of the public delta against all 969 tasks passed. The private guardword catalog was unavailable.

The real run used f35546de with an explicit evidence-ID override; this commit changes the default and documentation, not runtime logic. Coverage is 50/969; complete accuracy remains null. This is integration evidence, not accuracy calibration, a cost comparison or a new benchmark reference score.

Running and review

Use the runbook. This release remains evaluation-only and verified: false pending platform validation.

Please review the new transport default and bounded-run evidence. Earlier approval/CI are not claimed for this new head; current-head CI and canonical merge remain separate gates. No linked issue: this is a new benchmark contribution.

@ericyang0
ericyang0 requested a review from a team as a code owner October 23, 2026 19:14
@copy-pr-bot

copy-pr-bot Bot commented Oct 23, 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.

@nemo-automation-bot nemo-automation-bot Bot added the community-request Issue reported or requested by someone from the community label Oct 23, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer labels Oct 23, 2026
Normalize reasoning deltas to the canonical reasoning_content field, reject conflicting aliases, and retain raw receipts unchanged. Cover legacy, modern, duplicate, null, and malformed fields with synthetic regression tests.

Signed-off-by: Eric Yang <[email protected]>
Signed-off-by: ericyang0 <[email protected]>
@cmunley1

Copy link
Copy Markdown
Contributor

/ok to test 83cb2bc

@cmunley1

Copy link
Copy Markdown
Contributor

/review

@cmunley1

Copy link
Copy Markdown
Contributor

I believe task data schema is missing from the tests failure, could you add that?

Comment thread pyproject.toml Resolved
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-customer Waiting on the original author to respond label Oct 24, 2026

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

HOLD — one scoring-contract BLOCKER and two integration/privacy RISK findings need correction.

Reviewed all 58 changed files, including the omitted model adapter, and traced preparation/collation, generation, verification, resume, and health-accounting paths. The streamed reasoning alias changes preserve canonical judge fields and leave raw bytes unchanged by source inspection.

This was a read-only review: tests and private-data replay were not executed. Synthetic validation claims do not establish judge calibration or platform readiness.

Note: formal approval is not available for this request, so this review is posted as a comment only.

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

@svcnvidia-nemo-ci svcnvidia-nemo-ci added the benchmark-onboarding Self-contained benchmark onboarding label Oct 24, 2026
Keep preparation artifacts private, reject provider conversation state, persist the rollout inventory, and supply the task-data schema. Document private YAML overrides and limit automatic-edit exclusions to the two frozen source files.

Signed-off-by: ericyang0 <[email protected]>
Signed-off-by: Eric Yang <[email protected]>
@ericyang0
ericyang0 force-pushed the ericyang/agentic-if-realworld-gym branch from fe7bec5 to e692bb9 Compare October 26, 2026 19:30
@ericyang0

Copy link
Copy Markdown
Contributor Author

I believe task data schema is missing from the tests failure, could you add that?

Added the TaskData schema and a regression test using Gym's own schema validator. The test accepts all five synthetic examples and rejects missing identifiers, malformed hashes and verifier fields placed in the wrong location. The local checks pass; current-head CI still needs confirmation.

@cmunley1

Copy link
Copy Markdown
Contributor

/ok to test 1f4d541

@adil-a

adil-a commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

/ok to test 6d2de16

kajalj22
kajalj22 previously approved these changes Nov 5, 2026
Replace the resource and model server requirements files with managed pyproject.toml manifests and generated uv locks. Preserve the frozen jsonschema pin and Gym extras, inherit the shared resolver policy, and document the required uv version. Keep the nested frozen policy requirements unchanged.

Signed-off-by: ericyang0 <[email protected]>
@adil-a

adil-a commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

/ok to test 15b5fdc

Copy link
Copy Markdown
Contributor

✅ CI is green on nvidia-nemo/gym PR #5013 at 15b5fdc1f208 — still watching.

@kajalj22

kajalj22 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

/review role=automation reset=true

kajalj22
kajalj22 previously approved these changes Nov 5, 2026

@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 — two RISK findings affect observed adaptive runs: completed resume rejects fresh verification observations, and same-phase connection recovery reuses a capture identity.

Completed a fresh broad review of all 68 changed files across scoring/evidence contracts, adaptive delivery, and private preparation/installation. I verified both findings against the affected Gym wrappers and capture consumers. The existing driver tests bypass the HTTP verification wrapper and don't cover connection recovery through the adapter/capture path.

The earlier aggregation, reward-evidence, provenance and catalog findings are addressed in the inspected source. The preparation privacy, conversation-context and pre-dispatch inventory fixes also retain relevant regression assertions.

This was read-only source review. I didn't execute tests, install dependencies, access private data or reproduce the reported model runs. Generated lockfiles received targeted dependency/metadata inspection, not an audit of every distribution artifact.

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

raise ValueError("Saved result changed")
if state.get("result", {}).get("scoring_status") == "scored":
result = await verify(state["selected"], dataset.criteria[identifier], cached_only=True)
if result != state["result"]:

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.

RISK — exclude per-request observations from cached-grade equality

Failure: Complete an adaptive run with the documented observability_enabled=true, then repeat it with --resume. This comparison includes the entire HTTP verification result. The actual verification wrapper creates a fresh invocation UUID for each request and replaces ng_verifier_invocations. An unchanged cached grade therefore fails resume with Saved result differs from validated cached judge result. The driver regression calls the verifier directly and misses this HTTP behavior.

Correction: Could run_cell compare stable verification fields while retaining the original saved observations? Suggested replacement for the scored-result branch:

result = await verify(state["selected"], dataset.criteria[identifier], cached_only=True)

def stable(value):
    return {k: v for k, v in value.items() if k != "ng_verifier_invocations"}

if stable(result) != stable(state["result"]):
    raise ValueError("Saved result differs from validated cached judge result")
return state["result"]

This excludes only request-local observation evidence; response, reward, mask, judge identity and cache bindings must still match. Returning the saved result preserves its original grading provenance.

Preservation/acceptance — proposed, not executed: Run a complete synthetic adaptive case through ResourcesServer.setup_webserver() with observability and the rollout prefix enabled, then resume. Expect success, zero new policy/judge calls, and unchanged saved result/invocation evidence. Retain completed resume with observability disabled and the existing corruption rejections for raw policy bytes, judge results, reward, mask and request bindings. Those must still fail before new dispatch. Please verify the suggested code before adopting it.


async def generate(prepared, seed, cap, receipt_id):
attempt = copy.deepcopy(by_id[prepared["task_id"]])
attempt[ATTEMPT_INDEX_KEY_NAME] = PHASES.index((seed, cap))

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.

RISK — separate capture identities for same-phase connection recovery

Failure: With observability enabled, let the policy endpoint refuse its first connection, restore it, and explicitly resume. The runner allocates a new receipt, but this dispatch identity still depends only on the unchanged schedule phase. Both model calls share the same capture key, so the capture store appends both exchanges. Collection then attaches the earlier empty adapter response alongside the recovered response, while the selected trajectory references only the recovered call. The saved artifact consequently violates the one-owner-per-call check. This breaks capture/conformance evidence for a supported recovery, rather than changing the frozen grade.

Correction: Give every generate invocation a unique capture identity, including explicit retries of the same phase. Keep the seed/token-cap schedule separate from that identity. A receipt-derived explicit rollout ID is one option, but it also needs propagation into the verification body, which currently rebuilds identity from the inventory row. Preserve logical task/repeat accounting and retain earlier captures unchanged. The exact identity wiring needs checking against the inventory/health contract; a phase-index-only replacement isn't a complete patch.

Preservation/acceptance — proposed, not executed: Add an adapter-and-driver integration case with a not_dispatched connection failure followed by successful explicit resume. Expect identical (seed, max_tokens), distinct receipt and capture keys, unchanged failed receipt/capture bytes, one selected result, and no ownership or capture-identity findings. Repeat with two connection failures before success. Retain distinct identities across schedule phases, first-complete selection for both passing and failing answers, one logical inventory row per task, and zero-call completed resume after the separate cached-equality fix. Don't erase the earlier capture or advance the schedule merely to obtain a new identity.

Copy link
Copy Markdown
Contributor

💬 I haven’t been able to inspect the failing CI checks or their logs because the workstation’s session service is returning 503 with an invalid readiness state. I’ll resume the investigation when access recovers; the PR watch remains active.

Compare cached grades without request-local verifier observations and retain
the saved grading evidence. Count physical dispatches independently of the
adaptive phase so explicit connection recovery gets a separate capture key.

Add HTTP verifier and model-adapter regression coverage for resume, repeated
connection failures, capture ownership, inventory accounting and cache integrity.

Signed-off-by: ericyang0 <[email protected]>
@adil-a

adil-a commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

/ok to test a69c3bb

Bring in current upstream changes without modifying the benchmark, rubric,
or private-data boundaries. Validate component tests and synthetic resume.

Signed-off-by: ericyang0 <[email protected]>

Copy link
Copy Markdown
Contributor

The model provider is unavailable. Work is paused and automatic retries have stopped. Send a new message or retry when the provider is available to resume.

Update against current main while preserving the reviewed benchmark files,
frozen rubric and private-data boundary. Validate tests and synthetic resume.

Signed-off-by: ericyang0 <[email protected]>
@ericyang0

Copy link
Copy Markdown
Contributor Author

@kajalj22 can you help review this? Thank you!

Copy link
Copy Markdown
Contributor

The label application does not own this session.

Copy link
Copy Markdown
Contributor

I'll watch this ready-to-merge PR and report substantive progress. Running on nim-gpt-6-1-sol.

Treat read failures after successful policy SSE headers as incomplete delivery,
advancing only within the frozen five-phase schedule. Preserve complete saved
answers, partial bytes and receipts; keep ambiguous dispatch and judge handling.
Cover timeouts, disconnects, truncated payloads, capture/resume and exhaustion.

Signed-off-by: ericyang0 <[email protected]>

Copy link
Copy Markdown
Contributor

💬 Can an operator repair the merge-watch binding for #5013? Registration rejects watch/pr_merged/github-pr::None despite the supplied repository and PR number, so I can't confirm that the merge watch is armed.

@adil-a

adil-a commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

/ok to test 41d5361

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

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

This branch was previously deployed

1 inactive deployment
public — 41d5361a Deployed Nov 6, 2026 by copy-pr-bot[bot] via release / finalize / notify #10752
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 benchmark-onboarding Self-contained benchmark onboarding community-request Issue reported or requested by someone from the community feature New capabilities, enhancements, or enablement work 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.

8 participants