Skip to content

Add IHEval (Instruction Hierarchy Evaluation) benchmark #1463

Description

@bzantium

Summary

Add IHEval (Instruction Hierarchy Evaluation), a benchmark that measures whether a model respects the system > user > tool instruction hierarchy. It is structured as a benchmark group with 9 sub-benchmarks across 4 categories — rule-following, task-execution, safety, tool-use — each evaluated under aligned / conflict / reference settings.

Proposed design

  • Benchmark group under nemo_skills/dataset/iheval/ (mirrors the mmau-pro pattern): IS_BENCHMARK_GROUP + 9 sub-benchmarks + a group SCORE_MODULE that emits an overall score, per-category and per-setting averages, and the conflict gap (reference - conflict), per aggregation mode (so iheval:N surfaces pass@1[avg-of-N] at the group level too).
  • Data: prepare.py downloads per-variant input_data.json from the zhihz0535/IHEval HF mirror via hf_hub_download; the generated test.jsonl is gitignored (not committed). Rows carry a pre-built OpenAI-style messages list (multi-turn dialogues + tool_calls / tool results), so generation runs with ++prompt_format=openai.
  • Scoring: the rule-based scorers are packaged as a standalone, pip-installable Apache-2.0 package — https://github.com/bzantium/iheval — consumed via a thin lazy-import evaluator wrapper, pinned in the Dockerfile. Rationale: upstream IHEval is CC BY-NC-ND with no installable package; the rule-following checkers derive from Google IFEval (Apache-2.0), and the task-execution / safety / tool-use scorers are independent re-implementations of the documented rule-based metrics.
  • Metrics: IHEvalMetrics builds on the base pass@k machinery, so iheval:N yields pass@1[avg-of-N], with per-setting and per-variant breakdowns.

Usage

ns eval --benchmarks iheval ...            # all 9 sub-benchmarks
ns eval --benchmarks iheval.safety_hijack  # a single sub-benchmark

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions