Repository navigation
Conversation
…+ sandbox code-exec tool) (#1911) What Adds litmus_agent, a domain-agnostic answer-verification resources server — the generic generalization of the chemistry-specific rdkit_chemistry scorer (keeps the scoring path, drops everything RDKit/domain-specific). - Extracts the model's final answer, pulls a value via the requested answer_format regex (the fmt_00–fmt_30 wrapper family), and scores it against expected_answer via a small answer_type taxonomy (float/bool/string). Reward 1.0 on match, else 0.0. - Swappable reward rules: exact / isclose / abs_window / rel_window / bool_eq / string_eq. - Domain fields (smiles, property, …) are pass-through (extra="allow") — accepted and echoed, never required or interpreted. The example dataset uses chemistry only to illustrate this. - Optional sandbox-backed stateful Python code-exec tool when sandbox_provider is set — provider-neutral via nemo_gym.sandbox. Two configs: litmus_agent.yaml (OpenSandbox) and litmus_agent_apptainer.yaml (local Apptainer; no service/API key). Why Reusable scoring for any benchmark whose tasks reduce to "match the expected answer," with optional tool use. Backs the litmus-bench chemistry eval but isn't tied to it. Tests resources_servers/litmus_agent/tests/test_app.py — 71 tests (answer extraction/parsing, all reward rules, verify paths, and the sandbox code-exec tool: session isolation, state-persistence across cells, output truncation, session cleanup/shutdown). All pass; ruff-format clean; DCO-signed; verified: false set per new-env policy. Notes - New environment starts verified: false. - OpenSandbox config uses workdir: /tmp (OpenSandbox doesn't create the workdir, unlike Apptainer). - Runtime-only dependency: exercising tool rows against NVIDIA-hosted gpt-oss needs the Responses-API compat fix (#1909 / PR #6595). Disjoint files — no code dependency; only needed for live e2e. --------- Signed-off-by: OliviaViessmann <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
… (#2008) Follow-up to #1911, which was squash-merged just before the final data-validation commit landed. As a result, `main` currently **fails** `gym env test` data validation for `litmus_agent`: - `example.jsonl` has 6 rows; the validator (`nemo_gym/cli/env.py`) requires exactly 5. - `example_metrics.json` is missing. This PR applies only that missing fix: - Drop the 6th (`mcp-python` tool-use) row so the example set is the 5 direct rows that have rollouts. - Add the generated `example_metrics.json` (`gym dataset collate --mode example_validation`). The tool path remains covered by unit tests and documented in the README/configs. Verified locally: ``` gym env test +entrypoint=resources_servers/litmus_agent +should_validate_data=true # -> The data for resources_servers/litmus_agent has been successfully validated! ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: OliviaViessmann <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Contributor
|
🌿 Preview your docs: https://nvidia-preview-ffrujeri-agent-skill-evaluation-framework.docs.buildwithfern.com/nemo/gym Here are the markdown pages you've updated: |
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
…l-evaluation-framework
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NeMo Gym is adding foundational Agent Skills that teach coding agents how to use Gym correctly. We need a reproducible benchmark that measures whether these skills improve agent output compared with the same agents operating without them.
This design proposes:
nemo-gym-create-environmentthat can be extended to the remaining foundational skills.The benchmark will use Gym's existing skill-loading, rollout, sandbox, and reward infrastructure rather than introducing a separate evaluation framework.
Motivation
The foundational skills described in #1235 are intended to improve coding agents at workflows such as:
The issue proposes evaluating agents with and without skills loaded and comparing output quality across four dimensions:
Prompt-only judging is insufficient for these workflows. Most outputs are code, configuration, tests, datasets, or runnable commands. The benchmark should execute those artifacts wherever possible and reserve LLM judging for dimensions that cannot be checked deterministically.
Current State
Canonical skill source
Agent skills now have one canonical source under:
Claude Code and legacy Codex discovery paths use compatibility links. Agent-specific metadata such as
agents/openai.yamlremains colocated with the canonical skill.Runtime skill loading
NeMo Gym already supports skills as a run-level evaluation variable:
The current implementation:
skills_refonto materialized inputs and rollout results;The source dataset remains skill-agnostic.
Sandbox infrastructure
nemo_gym.sandboxalready provides provider-neutral lifecycle and execution APIs:SandboxandAsyncSandbox;SandboxSpec;Mini-SWE and other coding environments provide examples of clean workspaces, patch capture, hidden checks, and sandbox cleanup.
Missing pieces
The repository does not yet provide:
Goals
Non-goals
Proposed Architecture
The central design decision is to use separate agent and verifier sandboxes. The agent never receives hidden tests, and the verifier never trusts the agent's modified workspace.
Repository Structure
The benchmark, verifier, and driver are generic to agent-skill evaluation. The first check suite and dataset focus on
nemo-gym-create-environment.Sandboxed Agent Execution
Configuration
Sandbox execution should be an opt-in mode of the existing Claude Code agent. Host execution remains the default.
An agent configuration will identify:
Example:
Clean workspace
The sandbox image contains:
The workspace used for evaluation must not contain the repository's built-in skill directories. Otherwise, the baseline can discover the treatment skill from the checkout. Before running the agent, the fixture must remove or exclude:
Any other auto-discovered instructions must be identical between discovery-control and treatment arms.
Agent lifecycle
For each rollout:
Start a new
AsyncSandbox.Initialize a clean workspace from the pinned fixture.
Apply task-specific setup files or a setup patch.
Create a fresh runtime configuration directory.
Stage the selected skill bundle when the arm requires it.
Run the coding-agent CLI inside the sandbox.
Capture stdout, stderr, exit status, usage, timing, and trajectory.
Capture all repository changes, including new files:
git add -N . git diff --binaryReturn the patch as a rollout artifact.
Stop the sandbox in
finally.The host checkout must remain unchanged.
Runner result
The sandbox runner should return a structured result such as:
Patch size limits and clear errors are required for malformed or oversized submissions.
Sandboxed Verification
Verifier lifecycle
For each agent patch:
finally.The verifier must not reuse the agent sandbox. This prevents the agent from:
Hidden-check storage
Dataset rows should contain identifiers, not hidden test contents:
{ "verifier_metadata": { "fixture_id": "create-environment-sql", "check_suite_id": "create-environment-sql-v1" } }The resources server resolves those identifiers to server-side fixtures and checks.
Task Schema
Example dataset row:
{ "task_id": "create-env-sql-001", "category": "create-environment", "task_type": "implementation", "responses_create_params": { "input": [ { "role": "user", "content": "Create a NeMo Gym resources server for SQL generation using the supplied test database." } ] }, "verifier_metadata": { "fixture_id": "create-environment-sql", "check_suite_id": "create-environment-sql-v1" } }The prompt should not name the target skill in the primary benchmark. This tests automatic discovery and activation from realistic user language. Explicit skill invocation can be measured separately.
Initial
nemo-gym-create-environmentTasksFirst vertical-slice task
The first real task should be:
The fixture provides:
Hidden checks validate:
verify()behavior for successful SQL;Additional task families
After the vertical slice works, add:
Maintain separate development and held-out validation splits.
Deterministic Checks
The create-environment verifier should support:
gym dataset collateexample validation;Examples of convention checks include:
httpxin asynchronous Gym server paths;ray.get()in async code;/runand verification paths where required;Scoring
Report dimensions independently:
task_successcorrectnesscompletenessconvention_complianceguidance_qualitynegative_control_successelapsed_secondstoken_usageturns_usedtask_successis the primary metric. Correctness is a hard gate. A high rubric score cannot compensate for broken code.A composite score may be included for convenience, but all component scores must remain visible.
A/B Experiment Design
Arms
Use three arms:
Bare baseline
Discovery control
Treatment
The primary causal comparison is treatment minus discovery control. Bare baseline minus discovery control measures the effect of enabling the runtime's discovery mode.
Skill bundles
skills.pathpoints to a directory containing one or more skill directories. It does not point directly to a singleSKILL.mddirectory.The driver snapshots canonical skills into an experiment-local bundle:
This prevents the evaluated bytes from changing during a run and gives the experiment an immutable content hash.
Controlled variables
All arms use the same:
Arm order should be randomized. Sampling seeds should be recorded and reused where supported.
Experiment Driver
The first implementation should be benchmark-local:
Do not add a generic
gym eval comparecommand until the benchmark-local design has been validated.Manifest
Example:
Driver lifecycle
(task_id, rollout_index).Outputs
Statistical Comparison
Align paired outcomes by task and rollout index.
Report:
Bootstrap by task rather than by rollout. Multiple rollouts for the same task are not independent tasks.
For binary task success, paired methods such as McNemar's test can be included once the validation set is large enough. Effect size and confidence intervals are more important than a standalone p-value.
Skill Acceptance Criteria
A skill is ready to ship when:
Exact numerical thresholds should be set after the development benchmark establishes baseline variance.
Security and Reliability
Sandboxed agents execute generated code and must be treated as untrusted.
Requirements:
finally;A CLI agent inside the sandbox needs access to its model endpoint. Initial Docker development may use bridge networking, but production evaluation should restrict egress to required endpoints or use an authenticated model proxy.
Implementation Plan
Phase 0: Canonical skill source
Status: complete.
.agents/skills/.Phase 1: Sandboxed Claude Code runner
sandbox_runner.py.Acceptance criteria:
Phase 2: Generic skill verifier
resources_servers/agent_skills/.Acceptance criteria:
Phase 3: First create-environment benchmark
nemo-gym-create-environment.Acceptance criteria:
skills_ref;Phase 4: A/B driver and reporting
comparison.jsonandreport.md.Acceptance criteria:
Phase 5: Expand coverage
Proposed Work Items
nemo-gym-create-environmentskill.Open Questions
claude_code_agent, or become a separate genericsandboxed_cli_agentafter the first runtime?gym eval compare?Recommended Starting Point
Begin with the smallest complete infrastructure boundary:
This proves isolation, skill staging, artifact capture, verification, and A/B execution before the project invests in complex environment-generation tasks.