Skip to content

feat(eval): add the HLE-Diamond benchmark with text and sandboxed search presets - #4727

Merged
cmunley1 merged 30 commits into
mainfrom
rshahbazyan/add-hle-diamond-benchmark
Oct 24, 2026
Merged

cmunley1 merged 30 commits into
mainfrom
rshahbazyan/add-hle-diamond-benchmark

Conversation

@rimashahbazyan

@rimashahbazyan rimashahbazyan commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds HLE-Diamond (dataset, announcement, 2026-09-22) to NeMo Gym as a benchmark family under benchmarks/hle_diamond/: the 1,000-question subset of Humanity's Last Exam split into 500 reasoning and 500 knowledge questions (272 with an image; 796 exact-match, 204 multiple choice), graded by the HLE judge prompt through equivalence_llm_judge, with accuracy sliced by partition. It ships the published no-tools setting as the default, a 728-row text variant, four sandboxed presets (OpenCode / Pi, with and without Tavily search), a composable dedicated-judge override, and small, config-guarded changes to two shared components that the benchmark needed, equivalence_llm_judge and tavily_search (listed with their blast radius below; no model-server change). The sole purpose of the benchmark is comparison with the published table, so every choice that touches the measured protocol follows upstream (centerforaisafety/hle) and every divergence is documented in the README.

No Gym GitHub issue exists for HLE-Diamond; the work is tracked in the internal Surveyor project (SCI2-377, work contract and decisions D1–D65). The one related open change is #4658 (HLE domain metrics), discussed under shared components.

Benchmark identity

Dataset cais/hle-diamond, split test, revision 04eeb7efa7e3e4f83a00cbd5ce436a38fd5dda23 (pinned in prepare.py; gated, downloaded at run time, never committed; data/.gitignore ignores *.jsonl)
Licence MIT per the dataset card, which also asks users not to publicly share, re-upload or redistribute the data
Size 1,000 rows: 500 reasoning / 500 knowledge; 272 image rows (153 / 119); 603 ids are in cais/hle, 397 are later HLE-Rolling additions
Upstream harness centerforaisafety/hle (MIT) at 22ed3074b1e7b134bcbc09028d0ba320839b0655 (pinned in build_search_exclusions.py and named in both prompt files)
Published no-tools line (reasoning high) GPT-6 Astra 59.9 (74.2 / 45.6), Gemini 4 Argon 56.9, Claude Opus 5.5 54.6 (62.4 / 46.8), GPT-6.1 Sol 53.2, ...; with tools GPT-6 Astra 82.9. One point per model, no spread, no run count, no judge named.

What changed and why

1. The benchmark (benchmarks/hle_diamond/, commits ba72010ef, cd5698c46, caaa8fcff, 3600bcce4, dab763955, eb3566c34, 1f2a85f43, 2d4818947, 9fa55f1fe)

  • Default = the full 1,000 rows with images (config.yaml, prompt_source: prepared): prepare.py bakes the prompt into responses_create_params.input via nemo_gym.vision_input.build_image_input, so image rows carry an input_image block. This inverts benchmarks/hle's convention (text default, config_vision variant) because HLE-Diamond's published numbers are over all 1,000 questions, images included; hle_diamond/text (text.yaml, 728 rows, raw fields + prompt_config) is the variant and its 728/1000 coverage is not comparable with the table (README > Scope).
  • Prompts verbatim from upstream (prompts/default.yaml, prompts/opencode.yaml): the HLE authors' SYSTEM_PROMPT byte for byte as the system message, a deliberate departure from the Gym paraphrase in hle/hle_verified (README > Prompting; tests assert the rendered string and the 1,000 materialized system messages equal the upstream text). Documented divergences that remain: detail: high on images (Gym's shared builder; upstream sends no detail), Responses API through a gateway instead of direct chat-completions, judge prompt as Gym's parser-adapted benchmarks/hle/prompts/judge.txt (same criteria; free-text Judgement: yes|no instead of upstream's structured correct field), judge call uncapped (upstream caps at 4,096 completion tokens).
  • Judge: defaults to policy_model exactly as benchmarks/hle/config.yaml (self-judged numbers are labelled as such). judge_openai.yaml is a composable non-benchmark override that defines hle_diamond_judge_model (openai_model on the policy gateway, model ${oc.env:HLE_DIAMOND_JUDGE_MODEL,azure/openai/o3-mini}) and repoints the single judge resources server every preset shares. It must travel as a raw +config_paths=[...] token under --benchmark (merges after the preset) and as --config under gym env start; the README explains why and tests compose both forms through the CLI's own flag translation (4d3f9a2b6, c99ffe134).
  • Partition slices: report_slice_fields: [partition] on the judge server emits slices/partition/{reasoning,knowledge}/mean/reward with question_count, promoted to key_metrics; headline stays mean/reward. Coverage (rows evaluated / 1000) is reported next to every number; ++count_missing_rollouts_as_zero=true gives upstream's denominator.
  • Fail-closed preparation: the corpus is validated (1,000 rows, 500 + 500 partitions, 272 image rows, unique ids) before anything is written; --limit N is the only subset mechanism and says loudly that the check was skipped; invalid arguments fail before any download. Dropped fields: rationale, author_name, canary, image previews.
  • Manifests manifest.yaml and text/manifest.yaml (experimental: true, licensing: MIT, modality: text, image) validate against the prepared files and pass test_current_benchmark_manifests_match_runtime_composition.
  • Search exclusions search_exclusions.json (220 domain + 118 url_substring rules) are generated by build_search_exclusions.py from upstream's docs/blocklist.json (pinned commit + SHA-256) unioned with benchmarks/hle/search_exclusions.json; the JSON records the four unrepresented upstream families and the SERP approximation.
  • Tests: tests/unit_tests/test_hle_diamond.py (58) and tests/unit_tests/test_hle_diamond_search_exclusions.py (33), mutation-checked as listed in README > Harness validation.

2. Shared-component changes (each flagged for maintainers)

Component Change Default Blast radius
resources_servers/equivalence_llm_judge/app.py (7a629effc, 9cf373fb4) report_slice_fields: list[str] emits slices/<field>/<label>/{question_count,rollout_count,mean/reward} after the parsing metrics and promotes the means to key_metrics [] (no metric change) None unless configured. Overlaps in intent with #4658 (report_hle_domains, domains/... by category, raw_subject, has_image); both hooks are additive and use different key prefixes, and the fields this benchmark carries are the ones that PR reads. Tested through compute_aggregate_metrics.
same file (7cc796ce4) LLMJudgeVerifyResponse gets model_config = ConfigDict(extra="allow") so /verify echoes the request's extra row fields always on Wire-shape change for every user of this server: saved rollout rows now carry the dataset's extra fields (uuid, partition, category, ...). Without it every slice reports missing_label_rollouts only. #4658 has the identical missing-echo gap and needs this to see its fields in a real run. Consumers that assumed a fixed key set should be checked.
same file (aba7718ff) judge_labels_case_insensitive: bool matches the two labels with str.casefold; recorded verdict_label keeps the configured spelling; labels differing only in case are rejected at config time False None for hle, hle_verified or any other config (byte-exact match preserved). On for every hle_diamond preset because o3-mini wrote Judgement: Yes on 1/1000 gold rows and 2/946 rows of the GPT-6 Astra run, each a verifier-side false negative upstream cannot have.
resources_servers/tavily_search/app.py (410f2e190, eab583d35) tavily_exclude_domains_limit (default 150, config-bounded 0 <= n <= 150; 0/null sends none) caps the provider-side exclude_domains; tavily_exclude_domains_priority (shell patterns, normalised like hostnames) orders the subset; one warning per server start names the domains not sent; the full domain + url_substring policy stays enforced locally on requested and returned URLs 150 + the default priority list Policies with more than 150 domains previously failed every web_search with HTTP 400 ("Max 150 domains are allowed"; probed 150 ok, 151 rejected); they now work. Policies within the limit are sent as the same set in priority-then-file order with duplicates removed (Gym's HLE list has 9 domains). Maintainer choice to confirm: the default priority list in a shared server names HLE-specific hosts (lastexam.ai, agi.safe.ai, safe.ai, scale.com, *.scale.com) next to generic ones (huggingface.co, hf.co, github.com, githubusercontent.com, archive.*). Tavily README + fern note updated.

Dropped after review (was in earlier revisions): an openai_model reasoning-item normaliser. responses_api_models/litellm_model already repairs the shape LiteLLM-style gateways return for the Claude and Gemini routes (null or absent summary -> [], output_text parts -> reasoning_text, in its _normalize_to_response), so the README now documents --model-type litellm_model for LiteLLM-proxy gateways and keeps openai_model for native OpenAI-compatible servers; git diff origin/main...HEAD -- responses_api_models/ is empty. litellm_model's start-up version check reads /health/readiness/details, which answers 403 to a key scoped to the model routes; the separate follow-up branch rshahbazyan/litellm-model-version-header-fallback adds a fallback to the x-litellm-version response header (Known gaps, item 12).

3. Sandboxed presets (opencode.yaml, opencode_search.yaml, pi.yaml, pi_search.yaml, sandbox_docker_local.yaml; d46ea86c9, 6e412daad, 92f662cbc)

  • All four run the 728 text rows (the adapters take a single input_text user turn; no images) with the verbatim instruction folded into the one user message after the harness's own system prompt; one repeat.
  • Reasoning effort travels on the harness's own knob, because ++responses_create_params.reasoning.effort decorates only Gym's run request: OpenCode opencode_config.provider.nemo_gym.models.dummy_model.options.reasoningEffort: high (verified in captures: reasoning_effort: high on 15/15 pilot requests and 218/218 across the with-tools pilot attempts); Pi thinking: high (--thinking high). Pi caveat: responses_api_agents/pi_agent/app.py registers the provider with compat.supportsReasoningEffort: False, so Pi never transmits the level today; label Pi runs "effort not transmitted (adapter)".
  • sandbox_docker_local.yaml is comparison infrastructure only: it adds a sandbox_docker provider block (the composed OpenSandbox sandbox: block cannot be removed by an override) and switches the two agents to network_access: inherit, so egress is unrestricted (verified: HTTPS to a public site succeeds inside the image). Restricted policies are honoured only by the OpenSandbox provider. Every number from this recipe carries the label "local Docker; egress not restricted".
  • SERP rules: upstream's 12 serp_url_patterns regexes are approximated by 14 url_substring rules keyed by the exact regex (a changed or new upstream pattern is reported and dropped, not silently approximated). Narrower than upstream on Google ccTLDs; wider on yandex. and startpage.com. Four upstream families are unrepresentable in Gym's two rule types (url_patterns 22, patterns_case_sensitive 4, answer_title_patterns 5, answer_title_allow_hosts 7): no query refusal, no title/snippet/page-text matching.
  • Sandboxed-adapter aggregate gap: the OpenCode and Pi adapters inherit BaseResponsesAPIAgent.aggregate_metrics and never call the judge server's compute_metrics, so sandboxed aggregates carry neither the partition slices nor judgement_parsing_issue_rate; both are computed post hoc from the rollouts (README > Reading sandboxed results). Shared-component gap, out of scope here.

Validation performed

All commands from the worktree root with its own .venv (import nemo_gym resolves inside the worktree), HEAD 996574e1c unless stated (the closing sweep ran at the pre-rewrite HEAD be18fd92c; the rewrite removed files only under responses_api_models/openai_model/ and the fern row, and added one docs commit).

  • Targeted suites (collected counts): tests/unit_tests/test_hle_diamond.py 58; tests/unit_tests/test_hle_diamond_search_exclusions.py 33; resources_servers/equivalence_llm_judge/tests/test_app.py 64 (case rule, legacy re-parse, config validator); resources_servers/tavily_search/tests/test_search_policy.py 44 (5 new: cap subset, priority order, bound, warning, local enforcement beyond the cap); responses_api_models/openai_model/tests 94 (untouched by this branch; the 12 normaliser tests of the earlier revision are gone); tests/unit_tests/test_environment_validation.py 43 (manifests). All pass; README > Harness validation lists the mutation checks (one changed prompt word, an effort knob lowered to medium, a broken count check, a dropped echo or slice hook, a README command switched to --config each fail a test).
  • Gates: ruff check + ruff format --check clean; pre-commit run --all-files clean; CI secrets scan exit 0 with the exact CI command: git diff --name-only --diff-filter=d --merge-base origin/main -z | xargs -0 .venv/bin/detect-secrets-hook --baseline .github/workflows/config/.secrets.baseline.
  • Closing sweep (pytest tests/unit_tests, 2026-10-17 05:40 UTC): 8,535 passed, 197 skipped, 18 failed in 6 m 42 s, ignoring two modules that need optional deps absent here (test_spans.py → opentelemetry, test_exporters.py → mlflow). All 18 failures are environment-dependent and untouched by the branch (no nemo_gym/ file changed): test_reward_profile histogram tests expect wandb, test_opensandbox_compose uid/network tests, test_sandbox_stop_retry (OpenSandbox), test_slurm_script multi-node chain. CI with the full dependency set is the authority.
  • Preparation and manifests: gym eval prepare --benchmark hle_diamond → Wrote 1000 problems ... (272 with an image); --benchmark hle_diamond/text → Wrote 728 problems ... (skipped 272 image questions); gym env validate --manifest passes for both; prepared rows re-counted (500/500, 272 input_image, unique ids, no dropped field leaked).
  • Model-free oracle sweep over the real HTTP /verify path (gym env start, --no-serve collection, gym eval aggregate; judge = a local oracle stub grading the filled judge prompt by normalised exact match): reference answer fed back 1000/1000 (500/500 per partition; 796/796 exactMatch, 204/204 MC); controls empty answer, Answer: None, wrong answer, reference + contradicting second Answer: line each 0/1000; slices 1.0 / 1.0 with question_count 500 each; a mixed file gives 0.5 / 1.0 / 0.0; uuid and partition echoed on every row. Evidence _session-evidence-2026-10-16/scratchpad/validation/model-free/REPORT.md (sha256 7486bcc9…34de).
  • Judge agreement on gold (o3-mini via judge_openai.yaml, 2026-10-16): 997/1000 (reasoning 497/500, knowledge 500/500), parsing-issue rate 0.001, mean judge output 180 tokens. Misses: one Judgement: Yes (verifier-side; removed by the case rule), one judge extraction error (dropped parenthesis), one rubric-style reference that even the reference fails (Known limitations). Controls on a stratified 100-row sample: another row's reference of the same answer type 0/100 false positives (0/80 exactMatch, 0/20 MC; _session-evidence-2026-10-16/scratchpad/fix3b/summary_other_gold_sample100.txt); Answer: None 2/100 (both MC items whose correct option starts with "None"; 11 such rows in the set); <gold>_wrong 14/80 exactMatch (weak control, kept as an upper bound on leniency); MC different letter 0/20.
  • Sandbox smoke and pilots: hle/opencode on the Docker provider 2/2 rows reward 1.0 (scratchpad/validation/smoke-hle-opencode/REPORT.md); hle_diamond/opencode 5-row pilot 5/5 correct, 3/5 rows made real tool calls, 15/15 OpenCode requests reasoning_effort: high, aggregate confirmed to lack slices (scratchpad/pilot/sandbox/REPORT.md, sha256 0327d447…48f1); no-tools 20-row pilots (scratchpad/pilot/no-tools/REPORT.md, sha256 5401911c…6c73): GPT-6 Astra 8/19 (1 row lost to the gateway timeout), Claude Opus 5.5 9/20 after the normaliser (0/20 before it), Gemini 4 Argon 9/16 scored with 4/20 lost to the timeout; with-tools 10-row pilot below.

Rollout evidence

All runs: one repeat, judge o3-mini via judge_openai.yaml (gateway alias; served snapshot not pinned; run date 2026-10-16), ++route_failures_to_sidecar=true, request shape ++responses_create_params.reasoning.effort=high and no temperature / top-p / output cap unless a labelled deviation is stated. Every accuracy is given over the scored rows and over all 1,000 with lost rows counted wrong (upstream's denominator); lost rows are the longest generations, so the over-scored figure is biased upward and the token mean downward. Full REPORT.md and SHA256SUMS sit in each run directory in the run directories, which are kept outside the repository.

Comparison, not reproduction; no test constructible. The blog publishes a bare point per model (no spread, run count or judge), so neither a paired nor a two-sample test exists. Removable and non-removable differences: Responses API through an internal LiteLLM gateway vs upstream's direct chat-completions; detail: high on image rows; judge alias vs the pinned o3-mini-2025-01-31 snapshot; free-text verdict parsing vs structured output; uncapped judge; "reasoning high" has a per-family meaning through the gateway (probe: honoured and echoed by the GPT models, honoured by Gemini, no measurable effect on Claude); the gateway's 360 s per-attempt limit removes the longest generations; n = 1. Read the rows below accordingly.

GPT-6 Astra, no tools (label "reasoning high": 1000/1000 requests carried effort high, 946/946 responses echoed it)

Run gpt-6-astra/20261016T1436Z/ (servers loaded 6421f1457, pre-rewrite id, c99ffe134 now: byte-exact judge labels, openai_model without any normaliser, which the GPT route does not need; wall 6,205 s at concurrency 32). 946 scored + 54 lost (53 gateway HTTP 408 at the 360 s per-attempt limit on all three retries, 1 provider 500). The 54 lost rows were re-requested outside the collector with the identical responses_create_params over a streaming transport and scored through the same /verify endpoint (background mode never completed on this gateway): 53/54 rescued, 1 still lost.

View Overall Reasoning Knowledge
Gym-native over scored rows 59.6 % (564/946) 76.2 % (345/453) 44.4 % (219/493)
Upstream convention, 54 lost rows wrong 56.4 % (564/1000) 69.0 % (345/500) 43.8 % (219/500)
Rescued full coverage, 1 still-lost row wrong 58.9 % (589/1000) 73.6 % (368/500) 44.2 % (221/500)
Published 59.9 74.2 45.6

Mean output tokens: native 3,705 over 946 rows (72 % of the published 5,171.7); merged 999 rows 4,894 (95 %); rescued rows alone 26,111 (max 54,157). Image rows 158/272 = 58.1 % with the rescue. Judge parsing issues 2/946, both Judgement: Yes with the judge's reasoning saying the answer matches (pre-case-rule code); counting them correct moves the rescued view to 59.1 / 73.8 / 44.4. Evidence: REPORT.md sha256 466ba460…b851, rescue/REPORT.md 23e48256…a098, rollouts.jsonl d3f47a5e…4f15, merged aggregate rescue/aggregate/merged_rollouts_aggregate_metrics.json 0fe181a9…81e7.

Claude Opus 5.5, no tools (label "effort not controllable via this gateway (adaptive default)"; deviation: max_output_tokens=32000 sent)

Run claude-opus-5-5/20261016T1714Z/ (servers loaded df68e5d52, pre-rewrite id, f383ec66f now minus that revision's openai_model normaliser: case rule on, openai_model with the normaliser equivalent to litellm_model's repair, so the numbers stand; 1,764 s at concurrency 32). Without an explicit cap the gateway's Anthropic default silently caps output at 4,096 tokens (pilot: 3/20 rows ended incomplete at exactly 4,096 with no answer), so the run sent 32,000, the largest value that fits the 360 s limit at the observed ~88–95 tok/s. 999 scored + 1 lost.

View Overall Reasoning Knowledge
Gym-native over scored rows 49.6 % (496/999) 57.1 % (285/499) 42.2 % (211/500)
Upstream convention, 1 lost row wrong 49.6 % (496/1000) 57.0 % (285/500) 42.2 % (211/500)
Labelled extra view: 940 status: completed rows only 52.5 % (494/940) 61.8 % (283/458) 43.8 % (211/482)
Published 54.6 62.4 46.8

Forced zeros from non-model causes, 58/1000: 36 truncations at the 32,000 cap (37 rows hit it, 1 had already answered), 21 content-filter cuts (22 rows ended incomplete with incomplete_details.reason = content_filter, 12 of them with 0 output tokens in ~1 s; 13 Biology/Medicine; 1 answered before the cut), 1 lost row (the set's only image over 8,000 px, provider 400; reported as lost, not resized). Gateway timeouts: 0 rows lost. 987 reasoning items normalised; 2 Judgement: Yes verdicts scored 1.0 by the case rule; 272/272 image requests carried input_image, 139/271 = 51.3 % correct. Mean output tokens 3,745 vs the published 9,614 (0.39×; not comparable under the cap and the filter). Digests: rollouts.jsonl ad904cc3…2194, aggregate 72fa6452…2701, REPORT.md c76c0697…d046.

Nemotron 3.5 Super VL, no tools (internal measurement; label "thinking on (model default); effort not controllable via this gateway")

Run nemotron-3.5-super-vl/20261016T2001Z/ (servers loaded df68e5d52, pre-rewrite id, f383ec66f now, i.e. openai_model with the earlier normaliser; 7,528 s at concurrency 16). No published Diamond number exists, so this is an author-reported internal measurement, not a comparison line. Labelled deviation: explicit temperature=1.0, top_p=0.95 per the model card and NVIDIA's own HLE recipe (omitting them leaves the backend default unverifiable); reasoning.effort=high kept for shape parity (accepted, echoed, no effect); no cap. 988 scored + 12 lost (11 gateway 408; 1 HTTP 415 on the set's only image/gif input).

View Overall Reasoning Knowledge
Gym-native over scored rows 8.9 % (88/988) 12.6 % (62/492) 5.2 % (26/496)
Upstream convention, 12 lost rows wrong 8.8 % (88/1000) 12.4 % (62/500) 5.2 % (26/500)

Image rows 12/271 = 4.4 %; text rows 76/717 = 10.6 %. Output tokens mean 32,021 / median 17,555 / max 203,026 (reasoning 99.3 % of output; 77 rows above 100k); 49 tasks saw at least one 408, 38 recovered on retry. Judge 988/988, 0 parsing issues; 24 refusals judged no. Digests: rollouts.jsonl d4dbabf4…e8c8, aggregate dc14656f…518c, REPORT.md 42d0653c…4826.

With tools: hle_diamond/opencode_search, GPT-6 Astra (label "local Docker; egress not restricted; comparison infrastructure only; scaffold differs from upstream's vendor CLIs")

  • 10-row pilot on the committed round-4 code 0c82b4c84 (pre-rewrite id; 574d339a0 now) (attempt 3; _session-evidence-2026-10-16/scratchpad/pilot/with-tools/REPORT.md, sha256 070c9b3f…ea0d): 10/10 scored, 7/10 correct (8 net of one verifier miss, P-T6 below); 130 web_search calls, 126 ok, 4 HTTP 400 from -site: operators (P-T5); wall 1,077 s; 0 URLs returned that the committed policy would block; longest verbatim question span in a query 7 words. Attempt 1 on df68e5d52 (pre-rewrite id; f383ec66f now) showed every web_search failing on Tavily's 150-domain limit (P-T1), which motivated 410f2e190; attempt 2 used a patched copy outside the repository (10/10, 9 correct) and is not evidence for the committed code.
  • Full 728-row run (text rows), complete: run gpt-6-astra-with-tools/20261017T0503Z (directory kept outside the repository) (REPORT.md sha256 b4a7d710…7ecf; run-time overrides: Docker network: host, tavily_exclude_domains_limit: 140 for -site: headroom, OpenCode agent.build.steps: 120, sandbox_timeout: 2400, 16 containers; two segments, 05:05–07:14 UTC on 0c82b4c84 (pre-rewrite id; 574d339a0 now) and 07:33–09:03 UTC on be18fd92c (pre-rewrite id; e6b60b2b9 now), 13,090 s collecting). Scored 728/728, lost 0, correct 620: 85.2 % (620/728) in both coverage views; reasoning 83.3 % (289/347), knowledge 86.9 % (331/381). A transient gateway authentication outage (06:28–07:13 UTC, 312 HTTP 401 lines) forced a stop; 15 poisoned rows were excised (byte-exact backup kept) and regenerated under the same protocol via --resume (14/15 correct); excluding them: 85.0 % (606/713). Four rows exhausted the per-row budget and score 0 (one overlapped the outage; two were search-heavy runaways with 201 and 255 searches; one hit the gateway's 1.05 M input-token context limit after 81 calls). Tools: 8,256 calls (web_search 5,542 with 8 -site: 400s, find_in_page 566, scroll_page 689, bash 1,064); 582/728 rows used a tool, 472 searched. Exclusions: 11 server-visible refusals, 0 policy-violating URLs via the Tavily tools on offline re-check; bash reached policy-blocked hosts in 16 rows (50 URLs), the egress caveat in action. Judge: 10 verdicts spelled Answer: yes scored 0 (verifier-side false negatives; sensitivity 86.5 %), 2 Judgement: Yes scored by the case-insensitive match. The published with-tools figure (82.9) is over all 1,000 questions including images through Codex CLI with web_search/web_fetch in a locked-down sandbox; this run covers the 728 text rows through OpenCode + Tavily with unrestricted egress, so it is a comparison of a different scaffold and item set, not a reproduction; no test is constructible.

Known gaps and open operator questions

  1. Gateway 360 s per-attempt limit (HTTP 408 litellm.Timeout): the model server (litellm_model inherits openai_model's retry layer) retries with a fresh generation, so answers needing more than six minutes are lost (GPT-6 Astra 54/1000, Nemotron 11/1000, Gemini pilot 4/20). Rescue through the same gateway is not generally feasible (background responses never completed; streams were closed at 390–650 s while others ran to 1,133 s). A Gemini 4 Argon full run was therefore not launched (projected ≥20 % loss). Raising the limit is a gateway-operator question.
  2. Claude default output cap 4,096 through the gateway when no cap is sent; the 32,000 workaround still truncated 37/1000 rows. 3. Content filter cut 22 Claude rows (provider/gateway side). 4. Image acceptance: the Nemotron route rejects GIF (1 row), the Anthropic route rejects images over 8,000 px (1 row); both reported as lost rows by kind, never resized.
  3. Tavily -site: operators count toward the 150 exclude_domains limit (P-T5), so a full-cap run loses queries that use them; the full run lowers the cap to 140 at run time. 6. Slot loss and over-blocking: 70 of the 220 domains (upstream's last 70 entries: social networks, Q&A sites, a CDN) are enforced only locally, costing result slots; yandex. and startpage.com block wider than upstream.
  4. Judge label drift (P-T6): a verdict written as Answer: Yes instead of Judgement: yes is no_verdict and scores 0; the case rule does not cover a changed label word (1/10 pilot rows). Verdict variance (P8): the same final answer judged differently depending on the explanation text (1/55 verdicts); no mitigation, to stay with upstream.
  5. Per-row budget is not in the committed presets (OpenCode default 400 steps / 14,400 s): one pilot row ran 128 model calls / 251 tool calls / 64 min (P-T3). The full run applies 120 steps / 2,400 s as run-time overrides and lists rows that hit them as execution failures scored 0.
  6. Reproduction-grade with-tools runs need OpenSandbox with network_access: model_and_tools: under local Docker the agent searched engines from bash, downloaded PDFs and a chess engine from a host the Tavily policy blocks, and scrolled result pages as a search engine (P-T2). 10. Sandboxed aggregates carry no slices (post hoc only). 11. Calibration error is not computed.
  7. Model server for the gateway is litellm_model, and its start-up gate. The documented path for LiteLLM-proxy gateways is --model-type litellm_model (it repairs the Claude and Gemini reasoning items; openai_model does not and rejects every such response). litellm_model refuses to start unless /health/readiness/details reports litellm_version >= 1.83.0 (the post-March-2026 supply-chain guard); a key scoped to the model routes gets 403 there, so with such a key the server fails before the first request. The recorded runs were made with openai_model plus a normaliser equivalent to litellm_model's repair (earlier revision of this branch), so they did not meet the guard and their numbers stand. Until the follow-up (rshahbazyan/litellm-model-version-header-fallback, reads it from the x-litellm-version header of a one-token chat-completion probe, the /v1/models route carrying no header on real deployments; minimum-version check kept) lands, a scoped key needs the gateway operators to open the health route to it; an operator question, not a Gym configuration.

Data and licensing

  • Code: Apache-2.0, SPDX headers on every new source file; DCO sign-off on all 28 commits.
  • Data: cais/hle-diamond is MIT per its card, which also asks users not to publicly share, re-upload or redistribute it. Nothing from the dataset is committed (prepared JSONL ignored by data/.gitignore; the benchmark directory carries no example rows); preparation downloads the pinned revision at run time with the user's own gated-access token.
  • Attributed third-party text: the prompt files reproduce the HLE authors' SYSTEM_PROMPT verbatim (MIT; commit named in each file); search_exclusions.json derives from upstream docs/blocklist.json (MIT; source block records repository, path, commit and licence); the judge prompt is reused from benchmarks/hle/prompts/judge.txt.
  • Rights gate: resolved. Legal review completed and the rights gate resolved on 2026-10-19 (recorded by the project owner); the one-week notice elapsed before this branch was pushed. The manifest declares licensing: MIT for the data itself and experimental: true; baselining is a maintainer step after merge.

User-facing compatibility and benchmark-result impact

  • No existing benchmark result changes: report_slice_fields and judge_labels_case_insensitive default off; hle and hle_verified configs are untouched.
  • No model-server change: responses_api_models/ is untouched. Gateway users take the existing --model-type litellm_model path (README > Quickstart > Model server).
  • Every equivalence_llm_judge consumer's rollout rows gain the request's extra row fields (additive keys).
  • tavily_search policies with more than 150 domains stop failing; policies within the limit are sent as the same set in a different order.
  • New benchmark names: hle_diamond, hle_diamond/text, hle_diamond/opencode, hle_diamond/pi in gym list benchmarks; hle_diamond/opencode_search and hle_diamond/pi_search are selectable but, like hle/*_search, not listed.

Follow-ups (not in this PR)

  • Coordinate with feat(eval): extend generic slice metrics and preserve HLE labels #4658: merge order, the shared extra="allow" echo, and whether slices/ and domains/ should become one namespace.
  • responses_api_agents/pi_agent: expose compat.supportsReasoningEffort so Pi transmits --thinking.
  • OpenCode/Pi sandboxed adapters: proxy aggregate_metrics to the resources server so sandboxed runs get slices and the parsing rate.
  • responses_api_models/litellm_model: fall back to the x-litellm-version response header when /health/readiness/details answers 403, keeping the >= 1.83.0 check (branch rshahbazyan/litellm-model-version-header-fallback).
  • Gemini 4 Argon no-tools run, blocked on the gateway's per-request limit; a with-tools run under OpenSandbox model_and_tools for a reproduction-grade number; a per-row budget in the committed presets if the full run confirms the need; Google ccTLD SERP coverage.

Checklist

  • Read the contributing guidelines; Conventional Commit titles throughout.
  • Change is focused: benchmark + the three shared-component changes it needs, each flagged above; no drive-by edits.
  • Tests added or updated and passing locally (counts above); model-free 1000/1000 gold sweep and 0/1000 controls; manifests validate.
  • pre-commit run --all-files, ruff, and the CI secrets scan pass locally.
  • All commits carry DCO sign-off (git commit -s).
  • Legal review complete; rights gate resolved (2026-10-19).

@rimashahbazyan
rimashahbazyan requested a review from Kipok October 19, 2026 05:04
@copy-pr-bot

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

def normalize_reasoning_items(response_dict: Dict[str, Any]) -> Dict[str, Any]:
"""Return ``response_dict`` with gateway-shaped ``reasoning`` output items repaired.

LiteLLM-style gateways (for example in front of Anthropic and Google models) emit Responses API

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.

Does https://github.com/NVIDIA-NeMo/Gym/tree/be18fd92cc90a48fbed3fe257fa889ce4c76bdcd/responses_api_models/litellm_model work instead? Also would suggest separating the model server changes (if needed still) into a separate PR, and making this a stacked PR of 2.

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.

Thanks, agreed on both points. I checked litellm_model against the captured responses that motivated the openai_model change, and here is where it lands.

litellm_model does cover the shapes. Its _normalize_to_response repairs exactly what normalize_reasoning_items repairs: a null summary on reasoning items and output_text parts that should be reasoning_text. Both captured gateway responses (Claude Opus 5.5 and Gemini 4 Argon) validate as NeMoGymResponse after passing through it. So the openai_model change is a duplicate, and I will drop it along with its flag, fixtures, and test module.

One blocker on our side. litellm_model refuses to start unless /health/readiness/details reports litellm_version >= 1.83.0. The LiteLLM proxy we run against issues virtual keys scoped to allowed_routes: ['llm_api_routes'], so that route returns 403 ("Virtual key is not allowed to call this route"). The public /health/readiness answers 200 but this deployment strips the version field from it. The proxy is 1.105.1, which it advertises in the x-litellm-version header on every normal response, so the safety requirement is met; the server just cannot see it through the route it checks.

How would you like me to proceed?

  1. Keep this PR benchmark-only, document --model-type litellm_model as the supported path for proxies like this one, and I resolve the health-route access with our proxy operators out of band. No model-server change in Gym.
  2. Same as 1, plus a small follow-up PR to litellm_model that falls back to the x-litellm-version response header (from a /v1/models call) when the health route returns 403, keeping the minimum-version guard intact. Scoped keys are the LiteLLM default recommendation, so other users will likely hit this too.
  3. A config flag on litellm_model to skip the version check. Simplest, but it weakens a deliberate guard, so I would only do it if you prefer it.

On stacking: with the openai_model change gone, the remaining shared edits are the equivalence_llm_judge additions (report_slice_fields, judge_labels_case_insensitive, extra="allow" on the verify response) and the Tavily exclude_domains 150-cap handling. Both are required for the benchmark to run. Happy to move them into a base PR and stack the benchmark on top if you want them reviewed separately; otherwise they stay here, flagged as they are in the description.

The recorded results are unaffected either way: the runs used openai_model plus the normaliser, which is behaviourally the same path litellm_model takes, and I will say so in the description.

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.

I think option 2 sounds good?

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.

Thanks!
Done as option 2. The openai_model change is gone from this PR, the README documents litellm_model as the model server for LiteLLM-proxy gateways, and the judge and Tavily changes stay as reviewed. The follow-up is #4869 : litellm_model reads the proxy version from the x-litellm-version header when the health route is forbidden to a route-scoped key.

One finding from verifying it live: GET /v1/models carries no version header on a real deployment, only model-call responses do, so the fallback sends a one-token chat completion and reads the header from that response, status regardless, keeping the 1.83.0 guard and failing closed without a header. It is a billed call at startup, logged as a warning; granting the key the health route avoids it entirely. With it, a 5-row HLE-Diamond smoke through litellm_model on a Claude route ran 5/5 with reasoning items accepted, while openai_model on the same route now fails validation as expected. Happy to switch the probe route or add a flag if you prefer.

@yaoyu-33 yaoyu-33 added area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers complexity:high Cross-component or shared-contract change with a large review surface feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer labels Oct 19, 2026
@github-actions github-actions Bot added the sla:review-overdue Review response is over the one-business-day SLA label Oct 20, 2026
rimashahbazyan and others added 21 commits October 21, 2026 10:24
…am HLE blocklist

Add benchmarks/hle_diamond/search_exclusions.json for the HLE-Diamond search
presets (SCI2-377, D2/D7) and the generator that produces it from the upstream
centerforaisafety/hle docs/blocklist.json at a pinned revision:

- upstream `domains` -> Gym `domain` rules (IDNA-normalised, lower-cased,
  validated as hostnames, deduplicated; anything the Tavily parser would
  reject or could never match is dropped and reported);
- upstream `url_prefixes` -> Gym `url_substring` rules (scheme and leading
  `www.` removed as upstream's matching does, deduplicated);
- union with benchmarks/hle/search_exclusions.json so Diamond is at least as
  strict as Gym's HLE list.

The five regex-based upstream families cannot be expressed in the Tavily
resource's domain/url_substring format; they are listed by name and count under
`unrepresented_upstream_rules`, which the parser ignores along with the
`source` attribution block (verified through URLExclusionPolicy in the tests).

Result: 220 domain rules, 104 url_substring rules, 0 dropped entries.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
…report_slice_fields

Add an opt-in `report_slice_fields` knob to the LLM judge server. For each
configured row field (HLE-Diamond uses `partition`) compute_metrics emits
slices/<field>/<label>/{question_count,rollout_count,mean/reward} plus a
missing-label count, and get_key_metrics promotes the slice means next to
mean/reward and judgement_parsing_issue_rate. The default (empty list)
leaves every existing metric unchanged. Additive to the domain slices in
PR #4658, which read the same row fields under domains/.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
…xed presets

Prepare cais/hle-diamond at a pinned revision into two datasets: the default
1000-question set with prepared multimodal inputs (272 image questions carry
an input_image block) and a 728-row text-only variant templated at rollout
time. Preparation validates the full corpus (1000 rows, 500/500 partitions,
272 image rows, unique ids) before writing and keeps --limit as the only
subset mechanism. Rows carry partition, category, raw_subject, has_image and
answer_type for analysis; rationale, author_name and canary are dropped.

Configs reuse the HLE prompts and judge from benchmarks/hle, slice accuracy by
partition, and mirror hle's OpenCode/Pi presets (with and without Tavily
search) on the text rows with the HLE-Diamond exclusion list. judge_openai.yaml
is a composable, non-benchmark override that grades every preset with a
dedicated OpenAI-compatible judge. Manifests cover the default and the text
variant.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
…n slices

Exercise prepare against an in-memory arrow dataset (row fields, the
input_image block, the text filter, fail-closed count/partition/image/id
checks, --limit boundaries, no download on invalid arguments), benchmark
discovery and the judge_openai override, the HLE judge prompt path, manifest
mirroring, and the partition slices through compute_aggregate_metrics.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
…kstart

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
…ponse

`LLMJudgeRunRequest` accepts extra dataset fields, but `LLMJudgeVerifyResponse`
inherited pydantic's default `extra="ignore"`, so `_make_response` silently
dropped `uuid`, `partition`, `category`, `raw_subject` and `has_image` from the
`/verify` reply. The saved rollout rows therefore never carried the label that
`report_slice_fields` reads, and a real hle_diamond run would have published
only `slices/partition/missing_label_rollouts`.

Allow extras on the response, as the other judge servers do, and test the
production row shape end to end: request -> `_make_response` -> JSON wire ->
`SimpleAgentVerifyResponse` -> `compute_aggregate_metrics`. Removing the
`extra="allow"` makes the test fail with `KeyError: 'uuid'`.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
… metrics

Initialising `metrics` from `_compute_slice_metrics` replaced the `if not
judged: return {}` block, the same lines that PR #4658 (report_hle_domains)
rewrites, so whichever landed second needed a manual one-line resolution.
Update `metrics` with the slices just before the final return instead: the
two hunks are now separated by unchanged lines and `git merge-file` against
origin/codex/hle-domain-metrics merges cleanly (exit 0).

The only behavioural change is the degenerate run in which no rollout was
judged: it now emits no metrics at all, as before the hook, and the test pins
that case for a server with `report_slice_fields: [partition]`.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
`UPSTREAM_COMMIT` was a 39-character string (a `b` missing after `b1e7`),
which GitHub does not resolve: the documented refresh path
`build_search_exclusions.py --download` failed with HTTP 404. Pin the real
head of centerforaisafety/hle main, 22ed3074b1e7b134bcbc09028d0ba320839b0655.

Verified: `--download` now fetches the blocklist, its SHA-256 matches the
pinned 3abaf35e..., and the policy regenerated from both the download and
the local upstream copy is byte-identical to the committed
search_exclusions.json (the embedded prefix `22ed3074` did not change). The
new test requires a full SHA-1 pin and fails against the truncated value.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
With `--text-only --limit N` the summary line reported
`len(source_rows) - len(rows)` as skipped image questions, which also counted
the text rows the limit trimmed (`prepare(text_only=True, limit=1)` on a
4-row corpus with one image printed "skipped 3 image questions"). Count the
image rows of the source directly and say when a limit was applied.

The `--limit` truncation itself had no test that could fail: the only test
used `limit=2` on a corpus whose text filter already left exactly two rows.
Use `limit=1` so the "filter first, then limit" order is pinned, add a
full-set `limit=1` case, and a limit above the corpus size that must write
every row and still warn about the skipped completeness check. Replacing
`rows = rows[:limit]` with `pass` now fails three tests.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
`python benchmarks/hle_diamond/prepare_text.py --limit 3` silently prepared
the full text set: the `__main__` block called `prepare()` without reading
`sys.argv`, although the README names `--limit N` as the one supported
subset mechanism and the file as a thin wrapper. Parse `--limit` through a
`main(argv)` entry point that shares the argument definition with
`prepare.py` and rejects any other argument instead of ignoring it. The
`gym eval prepare ++prepare_script_args.limit=N` path was unaffected.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
The README and prepare.py claimed the prompts were "reused unchanged" from
centerforaisafety/hle and called judge.txt "the official HLE judge prompt".
Gym's benchmarks/hle/prompts/default.yaml asks for "{your explanation for
your final answer}" / "{your succinct, final answer}" where upstream's
SYSTEM_PROMPT asks for "{your explanation for your answer choice}" / "{your
chosen answer}", and judge.txt renames upstream's structured fields to
Reasoning / Judgement / Confidence with a free-text verdict. Quote both
wordings, list the paraphrase and the `detail: high` image setting (upstream
sends none) as comparability caveats, and keep the shared files as the
deliberate choice; a verbatim-upstream prompt is recorded as an open
decision instead of being introduced here.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
The README named the exclusion list but not what it leaves unenforced: five
of upstream's seven blocklist families (serp_url_patterns, url_patterns,
patterns_case_sensitive, answer_title_patterns, answer_title_allow_hosts; 50
rules) have no equivalent in Gym's Tavily resource, which inspects hostnames
and URL substrings only, so no query, title, snippet or fetched-page check
runs and GitHub is blocked wholesale. Add the family-to-rule table, the
consequences (a weaker leakage policy than upstream's protocol, to be
labelled), the two-constant refresh procedure, and the two inherited
OpenReview `url_substring` rules whose 40-hex document ids are not secrets.

Also list tests/unit_tests/test_hle_diamond_search_exclusions.py in the
Tests and Harness validation sections, and correct the claim that a
`huggingface-cli login` token is not read: `datasets` falls back to the
cached credentials when env.yaml has no `hf_token` (verified against the
gated parquet with token=None vs token=False).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
…t the gates

The quickstart was described as "matching the published setting" while it
composed only config.yaml, whose judge is the policy model itself, and it
omitted `--split benchmark`, which `E2ERolloutCollectionConfig.split`
requires with no default. Put the dedicated judge and the split into the
command, state that self-judged and text-only numbers are not comparable,
and add the pilot gates: reasoning effort actually honoured (reasoning
tokens above zero, mean output tokens against the announcement's table),
the judge model and parsing rate, and coverage.

Coverage now names the Gym knobs that reproduce upstream's fixed
denominator (`++count_missing_rollouts_as_zero=true`,
`count_failure_classes_as_zero`, `coverage/imputed`) instead of leaving it
to manual bookkeeping, the with-tools section enumerates the concrete
departures from upstream's protocol (harness, Python 3.13 with specialist
solvers, Tavily caps, two of seven blocklist families, 728/1000 rows), and
the dataset-format section documents `prepare_text.py --limit N` and the
`++prepare_script_args.limit=N` path.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
Add benchmarks/hle_diamond/prompts/default.yaml and prompts/opencode.yaml
carrying the SYSTEM_PROMPT of centerforaisafety/hle's
hle_eval/run_model_predictions.py byte for byte (braces doubled only for
nemo_gym.prompt's str.format_map), attributed to the HLE authors (MIT), and
point prepare.py, text.yaml, the text manifest and the four sandboxed presets
at them instead of Gym's paraphrased benchmarks/hle/prompts files.

The sole purpose of this benchmark is comparison with the published
HLE-Diamond table, so the measured prompt must be upstream's; sharing one
prompt across hle, hle_verified and hle_diamond loses to fidelity (D24). The
judge prompt stays Gym's parser-adapted benchmarks/hle/prompts/judge.txt.

Both datasets were re-prepared: all 1000 rows carry the verbatim system
message and the 272 image rows keep their input_image block. Tests assert the
shipped file renders exactly the upstream string, the OpenCode variant folds it
after the question, and prepare bakes exactly it; the test fails when one word
of the prompt changes.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
… harnesses

Gym's ++responses_create_params.reasoning.effort decorates only Gym's run
request. OpenCode and Pi build their own model calls inside the sandbox, so
the Diamond "reasoning high" setting (D4) never reached the model on the
sandboxed presets: a model-call capture of the OpenCode request carried no
reasoning_effort (gateway default medium).

opencode.yaml (inherited by opencode_search.yaml) now deep-merges OpenCode's
per-model option provider.nemo_gym.models.dummy_model.options.reasoningEffort:
high into the generated OpenCode config, which OpenCode 1.17.11 maps to
reasoning_effort: high in its chat-completions body (verified in a capture).
pi.yaml (inherited by pi_search.yaml) sets thinking: high, the Pi --thinking
level that means high (levels: off, minimal, low, medium, high, xhigh, max).

Caveat recorded in the README: the Pi adapter configures its provider with
compat.supportsReasoningEffort false, and Pi's openai-completions path only
emits reasoning_effort when that flag is true, so Pi runs through this adapter
still do not transmit the level; the knob takes effect once the adapter
exposes the flag.

Tests resolve all four presets and assert the knobs are present and merged
into, not substituted for, the inherited harness config; lowering either knob
to medium fails them.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
benchmarks/hle_diamond/sandbox_docker_local.yaml runs the sandboxed presets
on the local Docker provider for smoke tests and pilots. It is not a
benchmark (no dataset; not listed by gym list benchmarks) and is headed with
the label every run through it must carry: comparison infrastructure only,
egress unrestricted.

The presets always compose the OpenSandbox provider config, whose block cannot
be removed or re-typed by an override (the resolver counts provider keys
regardless of value), so the file defines a second block, sandbox_docker (the
content of nemo_gym/sandbox/providers/docker/configs/docker.yaml), documents
the placeholder OPENSANDBOX_API_KEY / OPENSANDBOX_DOMAIN values composition
needs, and repoints hle_diamond_opencode_agent and hle_diamond_pi_agent at it
with network_access: inherit (restricted policies fail closed on non-OpenSandbox
providers). create.network: host is left commented as the option for hosts
whose firewall blocks bridge-to-host traffic. The environment note the model
reads is replaced so it is told the truth about internet access, in wording
that holds for the code-only and the search presets. Only the agent the
composed preset defines is started: a block without an entrypoint is neither a
server instance nor an almost-server (D27).

Tests compose each of the four presets with the override and assert
resolve_provider_config yields exactly the docker key with inherited
networking, the other harness's block stays inert, the preset knobs survive,
the note no longer claims internet is disabled, the file documents the
placeholder variables, and discovery still lists exactly the four benchmarks.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
…cal Docker recipe

Prompting now states that prompts/ carry upstream's SYSTEM_PROMPT verbatim
(D24), why that beats sharing benchmarks/hle's paraphrase, the system-versus-
user placement departures inherent to the sandboxed harnesses, and keeps the
detail: high image divergence and the judge.txt adaptation notes. A Reasoning
effort subsection records the gateway probe outcome (D26): GPT-6 Astra, GPT-6.1
Sol and Gemini 4 Argon honour reasoning.effort; the Claude models do not
through this gateway and must be labelled "effort not controllable via this
gateway (adaptive default)", never "reasoning high"; all run with the one D4
request shape. It also documents the harness knobs on the sandboxed path and
the Pi adapter's supportsReasoningEffort caveat.

Scoring records that the judge call is uncapped and sent at default effort
while upstream caps it at 4096 completion tokens (D25) and why.

Quickstart carries --split benchmark, the judge_openai.yaml composition and
the effort override on every run command, marks the run commands as not run
as written, and adds the exact local Docker recipe for the sandboxed presets
(placeholder OPENSANDBOX variables, OPENCODE_SANDBOX_IMAGE, the override file,
--limit, observability flags) under the egress label, plus a "Reading
sandboxed results" note (response.status is null; use the opencode_* / pi_*
fields; confirm num_tool_calls > 0 on a pilot row) and the ttl_s caveat of the
Docker provider when an entrypoint is set.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
…eset

Every documented run command passed judge_openai.yaml and
sandbox_docker_local.yaml with `--config`, and the README claimed `--config`
composes after the preset so the override's keys win. The opposite holds in
this Gym version: `eval run` lists CONFIG before BENCHMARK, main() translates
flags in that order and _merge_config_paths keeps it, and
load_extra_config_paths gives a later sibling precedence. Composed through the
real parser, the documented no-tools command resolved judge_model_server to
policy_model (the model under test graded itself, silently) and the Docker
recipe on the search presets kept network_access: model_and_tools (fails
closed on the Docker provider) and the "internet is disabled" note.

D31 (retracts D29): every documented command carries the overrides as the raw
'+config_paths=[...]' token, which the CLI appends after the --benchmark and
--model-type configs wherever it stands on the command line; the README, the
judge_openai.yaml header and the sandbox_docker_local.yaml header state that
`--config` merges before the preset and must not carry these files. The
fragments outside Quickstart now carry --split benchmark, and the Docker
header composes judge_openai.yaml as well.

Tests parse the README's run commands and compose them through
nemo_gym.cli.main's own flag translation (judge resolves to
hle_diamond_judge_model; the Docker override's provider, network_access and
note hold), keep one inverse case asserting the `--config` form loses, and
check every documented run line (README fragments and both override headers)
for --split benchmark and the raw token. Mutation-checked: the README on
`--config` fails the first test; dropping --split benchmark from the
Dedicated-judge fragment fails the third.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
…rgences precisely

Scoring > Dedicated judge: upstream pins the judge to o3-mini-2025-01-31,
whereas azure/openai/o3-mini is a gateway alias whose served snapshot is not
pinned and is not readable from judge_evaluations[*].response.model (the
requested id is echoed). The alias and the run date go next to every number;
the pilot checklist and judge_openai.yaml's header say the same.

Reasoning effort: the label is applied by model family from the probe, never
from reasoning_tokens (the Claude models report thousands at every setting);
the GPT models additionally echo response.reasoning.effort. The pilot
checklist names the families per label so a Claude pilot with large
reasoning_tokens can no longer pass as "reasoning high" (D26).

Prompting: benchmarks/hle_verified carries its own identical copy of the
paraphrased prompt rather than sharing benchmarks/hle's file, so the fidelity
argument is restated without the shared-prompt premise. The no-tools path
sends a Responses API request through the gateway while upstream calls
chat.completions directly, and upstream's output cap is a default of None
(--max_completion_tokens), not an absence.

Local Docker recipe (D32): the hle/opencode smoke verified only the
`network: host` form (bridge networking timed out on the ufw host). The
committed bridge default stays because it exposes the least, and the README
and the override's comment now say it is unverified and name the remedy.

Reading sandboxed results: response.status is null unless the output limit
was hit, when both adapters set incomplete / max_output_tokens; the Pi
reasoning_effort statement rests on inspecting pi_agent/app.py (reused by the
sandboxed adapter) and Pi 0.85.1, not on a capture, and says so.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
…behind judge_labels_case_insensitive

Add an opt-in `judge_labels_case_insensitive` knob to the LLM judge server.
When set, `_match_verdict_labels` searches the str.casefold forms of the
judge text and of the two labels, so "Judgement: Yes" counts as the
configured "Judgement: yes". The returned verdict is always the configured
label as written, so counting, the last-verdict rule and the conflicting /
repeated diagnostics are unchanged, and legacy rollouts re-parsed by
compute_metrics use the same setting. A config whose two labels differ only
in case is rejected when the knob is on, since no verdict could then be
told apart.

Default off: byte-exact matching, so hle and hle_verified behave as before.
hle_diamond enables it on its single shared judge server instance (every
preset composes config.yaml). Reason (D29): upstream's judge reads a
structured `correct: yes|no` field whose case cannot vary, while Gym finds
the label in free text; on the 1000 gold rows o3-mini wrote "Judgement: Yes"
once, which the byte-exact match scored 0 as no_verdict.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
…nd the full-run shape

Harness validation: the model-free gold sweep and controls through the real
/verify path with an oracle judge (gold 1000/1000 with 500/500 per partition
and 796/796 + 204/204 per answer type; empty, "Answer: None", wrong and
contradicting-second-answer controls 0/1000 each; partition slices 1.0 / 1.0
with question_count 500, and 0.5 with slices 1.0 / 0.0 on a mixed file), and
the judge property measured on gold with azure/openai/o3-mini (997/1000,
reasoning 497/500, knowledge 500/500, parsing-issue rate 0.001) with the three
misses classified: a verifier-side false negative on "Judgement: Yes" (now
removed by judge_labels_case_insensitive), a judge extraction error, and a
rubric-style reference. The 100-row negative controls are stated with their
weaknesses: the "_wrong" suffix control (14/100, all exactMatch, 14/80) is an
upper bound on leniency to decorated right answers, and the "Answer: None"
control is confounded on items whose correct option is literally "None".

Known limitations: the rubric-style row 67c0f062afa64ff0bf4ecf55; at least 11
of the 204 multiple-choice rows (listed) whose correct option begins with
"None", read from the prepared rows, which replaces the sample's count of two;
the Pi adapter not transmitting the thinking level ("effort not transmitted
(adapter)"); and the gateway's 360 s per-attempt timeout.

Running the full set: the `gym env start --config ... judge_openai.yaml` plus
`gym eval run --no-serve` shape that the pilot ran (D35), why `--config`
composes there while the --benchmark form needs the raw +config_paths token,
the --split-not-read note, the normalize_reasoning_items requirement for
Claude and Gemini through LiteLLM-style gateways, and the reporting rule
(D33): coverage, lost rows by kind, accuracy over scored rows and with lost
rows counted wrong, and the upward bias from losing the longest generations.

Scoring documents the case rule as the one departure from benchmarks/hle's
judge settings. The documented-command tests now also compose the full-set
pair through the CLI's own flag translation: the three --config files land
in order so the judge override wins (and the case rule is on), and the
collection command carries sidecar routing, reasoning.effort=high, one repeat
and no sampling flag.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Rima Shahbazyan <[email protected]>
@cmunley1

Copy link
Copy Markdown
Contributor

/ok to test 84ce4d5

@cmunley1
cmunley1 added this pull request to the merge queue Oct 24, 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/40048082970

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

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Oct 24, 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/40050481547

@cmunley1
cmunley1 added this pull request to the merge queue Oct 24, 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/40117212213

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

Merged via the queue into main with commit c374d58 Oct 24, 2026
66 of 69 checks passed
@cmunley1
cmunley1 deleted the rshahbazyan/add-hle-diamond-benchmark branch October 24, 2026 18:58

This branch was previously deployed

1 inactive deployment
public — 84ce4d52 Deployed Oct 24, 2026 by copy-pr-bot[bot] via release / finalize / notify #6973
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 complexity:high Cross-component or shared-contract change with a large review surface feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer sla:review-overdue Review response is over the one-business-day SLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants