Skip to content

feat(rollout): default prompt_config from agent dataset catalog#1097

Draft
gwarmstrong wants to merge 1 commit intoNVIDIA-NeMo:mainfrom
gwarmstrong:georgea/rollout-prompt-config-from-catalog
Draft

feat(rollout): default prompt_config from agent dataset catalog#1097
gwarmstrong wants to merge 1 commit intoNVIDIA-NeMo:mainfrom
gwarmstrong:georgea/rollout-prompt-config-from-catalog

Conversation

@gwarmstrong
Copy link
Copy Markdown
Contributor

Summary

ng_collect_rollouts previously required users to pass +prompt_config=<path> on every invocation, even when the agent's YAML already declared the prompt_config for that dataset. Since agents' datasets: [...] catalogs (BenchmarkDatasetConfig) already contain {jsonl_fpath, prompt_config} pairs, we can look up the match automatically.

When +prompt_config is not explicitly set AND +agent_name is, this change looks up the matching dataset entry in the agent's catalog (by jsonl_fpath) and uses its declared prompt_config. Explicit user overrides still win; no match still falls back to previous behavior.

Why

Without this, a migration author running a benchmark with raw JSONL fields (e.g. {question, expected_answer}) hits KeyError: 'responses_create_params' inside _preprocess_rows_from_config, even though the agent's YAML was already wired up with the right prompt for that exact JSONL. Now the intent declared in YAML is honored automatically.

Before / after usage

Before (AIME25 rollouts):

ng_collect_rollouts \
  +agent_name=aime25_math_with_judge_simple_agent \
  +input_jsonl_fpath=benchmarks/aime25/data/aime25_benchmark.jsonl \
  +output_jsonl_fpath=aime25_rollouts.jsonl \
  +prompt_config=benchmarks/aime25/prompts/default.yaml   # <-- required, even though it's in the agent YAML

After:

ng_collect_rollouts \
  +agent_name=aime25_math_with_judge_simple_agent \
  +input_jsonl_fpath=benchmarks/aime25/data/aime25_benchmark.jsonl \
  +output_jsonl_fpath=aime25_rollouts.jsonl
  # prompt_config is inferred from the agent's dataset catalog

Passing +prompt_config=<path> explicitly still works and takes precedence.

Behavior

Scenario Outcome
Explicit +prompt_config=X, catalog has Y X used (explicit wins)
No +prompt_config, catalog has entry matching input's jsonl_fpath Catalog prompt_config used
No +prompt_config, no matching catalog entry prompt_cfg stays None; rows must have pre-rendered responses_create_params.input (previous behavior)
No +prompt_config, no +agent_name (row-level agent_ref) Fallback skipped entirely; previous behavior

Test plan

Unit tests added in tests/unit_tests/test_rollout_collection.py::TestPromptConfigFromCatalog:

  • test_explicit_prompt_config_wins_over_catalog - explicit +prompt_config overrides catalog
  • test_catalog_fallback_used_when_input_matches - matching jsonl_fpath uses catalog prompt_config
  • test_no_match_leaves_prompt_cfg_none - no match keeps prompt_cfg as None (legacy pre-rendered rows keep working)
  • test_no_agent_name_leaves_prompt_cfg_none - without agent_name, fallback is skipped
  • test_multiple_catalog_entries_picks_matching - correct entry is selected among multiple datasets
  • pytest tests/unit_tests/ - full unit test suite (203 tests passing)
  • ruff check + ruff format --check on changed files

ng_collect_rollouts previously required users to pass
+prompt_config=<path> on every invocation, even when the
agent YAML already declared the prompt_config for the
dataset. This change looks up the matching dataset entry
(by jsonl_fpath) in the agent's catalog and uses its
prompt_config when the user hasn't explicitly overridden.

Explicit +prompt_config= still takes priority. Falls back
to None (previous behavior) when no catalog match, so rows
with pre-rendered responses_create_params.input keep working.

Signed-off-by: gwarmstrong <gwarmstrong@users.noreply.github.com>
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Apr 17, 2026

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.

@gwarmstrong gwarmstrong marked this pull request as draft April 17, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant