Repository navigation
feat: add SECQUE and FinanceBench benchmarks, remove duplicate finance_sec_search environment - #2158
Conversation
…e_sec_search environment Signed-off-by: Ushnish De <[email protected]>
|
/claude review |
Signed-off-by: Ushnish De <[email protected]>
## Summary - Bumps `/claude review` workflow from FW-CI-templates `v1.7.0` → `v1.8.4` - `v1.7.0` had a bug where Claude generated the review but never posted it to the PR (see #2158 — workflow reported success, no comment appeared) - Fixed upstream in FW-CI-templates by [fix: allow Claude review top-level PR comments (#523)](NVIDIA-NeMo/FW-CI-templates#523) and [fix: Claude review comment identity and publish contract (#525)](NVIDIA-NeMo/FW-CI-templates#525) ## Test plan - [ ] Trigger `/claude review` on a test PR and confirm a comment is posted 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Kajal Jain <[email protected]> Co-authored-by: Claude Sonnet 4.6 (1M context) <[email protected]>
…forms Signed-off-by: Ushnish De <[email protected]>
…cebench-signed Signed-off-by: Ushnish De <[email protected]>
|
/claude review |
|
i would make sure the license of secque matches the usptream, and consider pin the hf dataset reference @ushnish-de |
|
/claude review |
|
SHIP WITH CARE — reorganization + two new benchmark recipes, no runtime code paths changed. This PR (a) moves Correctness of the verifier — OK. The new recipes map Config resolution — OK. The finance benchmark configs drop the Deps — OK. RISK — silent empty-context on schema drift. Both new NOTE — no |
…o#2167) ## Summary - Bumps `/claude review` workflow from FW-CI-templates `v1.7.0` → `v1.8.4` - `v1.7.0` had a bug where Claude generated the review but never posted it to the PR (see NVIDIA-NeMo#2158 — workflow reported success, no comment appeared) - Fixed upstream in FW-CI-templates by [fix: allow Claude review top-level PR comments (NVIDIA-NeMo#523)](NVIDIA-NeMo/FW-CI-templates#523) and [fix: Claude review comment identity and publish contract (NVIDIA-NeMo#525)](NVIDIA-NeMo/FW-CI-templates#525) ## Test plan - [ ] Trigger `/claude review` on a test PR and confirm a comment is posted 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Kajal Jain <[email protected]> Co-authored-by: Claude Sonnet 4.6 (1M context) <[email protected]>
…e_sec_search environment (NVIDIA-NeMo#2158) # Add SECQUE and FinanceBench benchmarks; consolidate `finance_sec_search` layout Adds two open-book financial Q&A benchmark recipes and finishes moving `finance_sec_search` onto Gym's canonical two-folder layout (`resources_servers/` + `benchmarks/`). No resource server Python changes — the new benchmarks are configs, prompts, and prepare scripts that reuse the existing `equivalence_llm_judge` server. The one behavioral change is to the `finance_sec_search` judge prompt, described below. ## Changes **New: `benchmarks/secque/`** — [README](benchmarks/secque/README.md) - 565-question open-book financial analysis benchmark ([SECQUE](https://huggingface.co/datasets/nogabenyoash/SecQue), MIT). The authors publish it as an evaluation benchmark, so it ships as a benchmark dataset only and is not used for training - `prepare.py` downloads the Hugging Face split and converts it to Gym JSONL - `config.yaml` inherits `equivalence_llm_judge_simple_agent` and defines an isolated judge server with a finance-specific prompt and `[[2]]`/`[[0]]` verdict labels - `prompts/judge.txt` grades on a 0-2 rubric measuring correctness rather than completeness, tolerant of non-essential rounding. Only `[[2]]` scores 1.0 - The judge sees the full generation rather than a regex-extracted span **New: `benchmarks/financebench/`** — [README](benchmarks/financebench/README.md) - 150-question open-book benchmark ([FinanceBench](https://huggingface.co/datasets/PatronusAI/financebench), CC BY-NC 4.0) - Same structure, judge prompt, and 0-2 rubric as SECQUE - `prepare.py` merges the multiple evidence entries per question into one context block **Configurable judge model (both new benchmarks)** - Each config defines a `judge_model` server, following the existing `physics_judge` and `tavily_search` convention - Defaults to the policy model via `${oc.select:judge_model_name,${policy_model_name}}`, so single-model setups need no extra configuration - Setting `judge_model_name` (plus `judge_base_url` / `judge_api_key` if the endpoint differs) pins the judge to a fixed model, keeping scores comparable across policy models **Grounding requirement in the `finance_sec_search` judge** - `prompt_templates/finance_sec_search_judge.yaml` now makes grounding the first grading priority: an answer that restates general financial concepts without filing-specific figures, dates, or disclosures scores `[[0]]` even when conceptually correct - Without this, a model can score well from parametric knowledge alone and never exercise the retrieval tools, which defeats the point of the benchmark - Expands accepted filing types beyond 10-K/10-Q to 8-K, DEF 14A, S-1, 20-F, and 6-K, since many questions are answerable only from those - Adds a worked ungrounded-answer example and annotates the existing examples with the filing each is grounded in - Aligns the public judge with the prompt that produced the existing `finance_sec_search` evaluation numbers **Removed `environments/finance_sec_search/`** - Deleted a duplicate standalone `config.yaml`, a stale `prepare.py`, and copies of prompts, scripts, and example fixtures that already live under `resources_servers/finance_sec_search/` - All five example files were verified byte-identical to the resource server's copies; the environment's `example_metrics.json` already pointed at `resources_servers/finance_sec_search/data/example.jsonl`, so it was never an independent fixture set - `finance_sec_search` is an eval and external-SDG environment with no Gym-managed train/validation split, so it doesn't need an `environments/` entry **Cleaned up `benchmarks/finance_sec_search/`** — [README](benchmarks/finance_sec_search/README.md) - Removed hardcoded `search_judge_model_base_url` / `search_judge_model_api_key` / `search_judge_model_name` defaults from both variant configs; these belong in `env.yaml`, and the empty-string API key default was a footgun **Documentation** - `benchmarks/finance_sec_search/README.md`: links to the resource server, adds a model configuration section, corrects the `parse_html_page` description (it fetches arbitrary URLs and SEC caching is opt-in), clarifies that Tavily isn't needed at prepare time - [`resources_servers/finance_sec_search/README.md`](resources_servers/finance_sec_search/README.md): documents the opt-in `use_cache` behavior, which was previously described as always-on, replaces stale SECQUE prepare instructions with a pointer to the new benchmark, and documents the `binary` vs `scaled` reward modes and the new grounding requirement in the Verification section - All three benchmark READMEs document both the single-command and server-plus-client run forms - Both new benchmark READMEs note that gold evidence is supplied in the prompt, so results measure reasoning over the correct context rather than retrieval - `benchmarks/{secque,financebench,finance_sec_search}/data/.gitignore`: ignore generated `*_metrics.json` alongside `*.jsonl` ## Running Each README documents both forms. A single command serves and collects: ```bash gym eval prepare --benchmark secque gym eval run --benchmark secque --split benchmark --model-type openai_model --output results/secque/rollouts.jsonl ``` Substitute `financebench` or `finance_sec_search/config_no_web_search` for `secque`. To reuse one server across several runs, `gym env start --benchmark <name>` in one terminal and `gym eval run --no-serve --agent <agent> --input <jsonl>` in another; the READMEs give the exact agent and input per benchmark. Add `--limit 1` for a quick end-to-end check. Model configuration goes in `env.yaml` at the repo root — see any of the READMEs above. ## Test plan - [x] `pre-commit run --all-files` - [x] `pytest tests/unit_tests -q -m "not sandbox"` - [x] `gym list benchmarks` shows `secque`, `financebench`, and both `finance_sec_search` variants - [x] End-to-end runs against `gpt-5-mini`: SECQUE 0.789 (565 questions), FinanceBench 0.940 (150 questions) - [x] End-to-end `finance_sec_search` run under the grounded judge prompt: 0.44 (50 questions), down from 0.48 under the previous prompt --------- Signed-off-by: Ushnish De <[email protected]> Co-authored-by: Christian Munley <[email protected]>
Add SECQUE and FinanceBench benchmarks; consolidate
finance_sec_searchlayoutAdds two open-book financial Q&A benchmark recipes and finishes moving
finance_sec_searchonto Gym's canonical two-folder layout(
resources_servers/+benchmarks/). No resource server Python changes — thenew benchmarks are configs, prompts, and prepare scripts that reuse the
existing
equivalence_llm_judgeserver. The one behavioral change is to thefinance_sec_searchjudge prompt, described below.Changes
New:
benchmarks/secque/— README(SECQUE, MIT). The
authors publish it as an evaluation benchmark, so it ships as a benchmark
dataset only and is not used for training
prepare.pydownloads the Hugging Face split and converts it to Gym JSONLconfig.yamlinheritsequivalence_llm_judge_simple_agentand defines anisolated judge server with a finance-specific prompt and
[[2]]/[[0]]verdict labels
prompts/judge.txtgrades on a 0-2 rubric measuring correctness rather thancompleteness, tolerant of non-essential rounding. Only
[[2]]scores 1.0New:
benchmarks/financebench/— README(FinanceBench,
CC BY-NC 4.0)
prepare.pymerges the multiple evidence entries per question into onecontext block
Configurable judge model (both new benchmarks)
judge_modelserver, following the existingphysics_judgeandtavily_searchconvention${oc.select:judge_model_name,${policy_model_name}}, so single-model setupsneed no extra configuration
judge_model_name(plusjudge_base_url/judge_api_keyif theendpoint differs) pins the judge to a fixed model, keeping scores comparable
across policy models
Grounding requirement in the
finance_sec_searchjudgeprompt_templates/finance_sec_search_judge.yamlnow makes grounding thefirst grading priority: an answer that restates general financial concepts
without filing-specific figures, dates, or disclosures scores
[[0]]evenwhen conceptually correct
never exercise the retrieval tools, which defeats the point of the benchmark
and 6-K, since many questions are answerable only from those
with the filing each is grounded in
finance_sec_searchevaluation numbersRemoved
environments/finance_sec_search/config.yaml, a staleprepare.py, andcopies of prompts, scripts, and example fixtures that already live under
resources_servers/finance_sec_search/copies; the environment's
example_metrics.jsonalready pointed atresources_servers/finance_sec_search/data/example.jsonl, so it was never anindependent fixture set
finance_sec_searchis an eval and external-SDG environment with noGym-managed train/validation split, so it doesn't need an
environments/entry
Cleaned up
benchmarks/finance_sec_search/— READMEsearch_judge_model_base_url/search_judge_model_api_key/search_judge_model_namedefaults from bothvariant configs; these belong in
env.yaml, and the empty-string API keydefault was a footgun
Documentation
benchmarks/finance_sec_search/README.md: links to the resource server, addsa model configuration section, corrects the
parse_html_pagedescription (itfetches arbitrary URLs and SEC caching is opt-in), clarifies that Tavily isn't
needed at prepare time
resources_servers/finance_sec_search/README.md:documents the opt-in
use_cachebehavior, which was previously described asalways-on, replaces stale SECQUE prepare instructions with a pointer to the
new benchmark, and documents the
binaryvsscaledreward modes and the newgrounding requirement in the Verification section
server-plus-client run forms
so results measure reasoning over the correct context rather than retrieval
benchmarks/{secque,financebench,finance_sec_search}/data/.gitignore: ignoregenerated
*_metrics.jsonalongside*.jsonlRunning
Each README documents both forms. A single command serves and collects:
Substitute
financebenchorfinance_sec_search/config_no_web_searchforsecque. To reuse one server across several runs,gym env start --benchmark <name>in one terminal andgym eval run --no-serve --agent <agent> --input <jsonl>in another; the READMEs give the exact agent and input per benchmark.Add
--limit 1for a quick end-to-end check. Model configuration goes inenv.yamlat the repo root — see any of the READMEs above.Test plan
pre-commit run --all-filespytest tests/unit_tests -q -m "not sandbox"gym list benchmarksshowssecque,financebench, and bothfinance_sec_searchvariantsgpt-5-mini: SECQUE 0.789 (565 questions),FinanceBench 0.940 (150 questions)
finance_sec_searchrun under the grounded judge prompt:0.44 (50 questions), down from 0.48 under the previous prompt