nvidia-profbench 25.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- core_evals/profbench/__init__.py +0 -0
- core_evals/profbench/framework.yml +98 -0
- core_evals/profbench/output.py +77 -0
- nvidia_profbench-25.11.dist-info/METADATA +316 -0
- nvidia_profbench-25.11.dist-info/RECORD +17 -0
- nvidia_profbench-25.11.dist-info/WHEEL +5 -0
- nvidia_profbench-25.11.dist-info/entry_points.txt +4 -0
- nvidia_profbench-25.11.dist-info/licenses/LICENSE +7 -0
- nvidia_profbench-25.11.dist-info/licenses/LICENSE-APACHE +201 -0
- nvidia_profbench-25.11.dist-info/top_level.txt +2 -0
- profbench/__init__.py +0 -0
- profbench/run_best_llm_judge_on_generated_reports.py +97 -0
- profbench/run_llm_judge_on_provided_reports.py +99 -0
- profbench/run_report_generation.py +253 -0
- profbench/score_llm_judge.py +97 -0
- profbench/score_report_generation.py +105 -0
- profbench/utils.py +120 -0
|
File without changes
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
framework:
|
|
2
|
+
name: profbench
|
|
3
|
+
pkg_name: profbench
|
|
4
|
+
full_name: ProfBench
|
|
5
|
+
description: Professional domain benchmark for evaluating LLMs on Physics PhD, Chemistry PhD, Finance MBA, and Consulting MBA tasks
|
|
6
|
+
url: https://github.com/nvidia/profbench
|
|
7
|
+
|
|
8
|
+
defaults:
|
|
9
|
+
command: >
|
|
10
|
+
{% if target.api_endpoint.api_key is not none %}
|
|
11
|
+
export API_KEY=${{target.api_endpoint.api_key}} &&
|
|
12
|
+
{% endif %}
|
|
13
|
+
{% if config.params.extra.run_generation %}
|
|
14
|
+
python -m profbench.run_report_generation \
|
|
15
|
+
--model {{target.api_endpoint.model_id}} \
|
|
16
|
+
--library {{config.params.extra.library}} \
|
|
17
|
+
--timeout {{config.params.request_timeout}} \
|
|
18
|
+
--parallel {{config.params.parallelism}} \
|
|
19
|
+
--retry-attempts {{config.params.max_retries}} \
|
|
20
|
+
--folder {{config.output_dir}}{% if target.api_endpoint.url is not none %} --base-url {{target.api_endpoint.url}}{% endif %}{% if config.params.extra.version is not none %} --version {{config.params.extra.version}}{% endif %}{% if config.params.extra.web_search %} --web-search{% endif %}{% if config.params.extra.reasoning %} --reasoning{% endif %}{% if config.params.extra.reasoning_effort is not none %} --reasoning-effort {{config.params.extra.reasoning_effort}}{% endif %}{% if config.params.limit_samples is not none %} --limit-samples {{config.params.limit_samples}}{% endif %}{% if config.params.temperature is not none %} --temperature {{config.params.temperature}}{% endif %}{% if config.params.top_p is not none %} --top-p {{config.params.top_p}}{% endif %}{% if config.params.max_new_tokens is not none %} --max-tokens {{config.params.max_new_tokens}}{% endif %} &&
|
|
21
|
+
GENERATION_OUTPUT=$(ls -t {{config.output_dir}}/*.jsonl | head -1) &&
|
|
22
|
+
{% endif %}
|
|
23
|
+
{% if config.params.extra.run_judge_generated %}
|
|
24
|
+
python -m profbench.run_best_llm_judge_on_generated_reports \
|
|
25
|
+
--filename $GENERATION_OUTPUT \
|
|
26
|
+
--api-key $API_KEY \
|
|
27
|
+
--model {{target.api_endpoint.model_id}} \
|
|
28
|
+
--library {{config.params.extra.library}} \
|
|
29
|
+
--timeout {{config.params.request_timeout}} \
|
|
30
|
+
--parallel {{config.params.parallelism}} \
|
|
31
|
+
--retry-attempts {{config.params.max_retries}} \
|
|
32
|
+
--output-folder {{config.output_dir}}/judgements{% if target.api_endpoint.url is not none %} --base-url {{target.api_endpoint.url}}{% endif %}{% if config.params.limit_samples is not none %} --limit-samples {{config.params.limit_samples}}{% endif %}{% if config.params.temperature is not none %} --temperature {{config.params.temperature}}{% endif %}{% if config.params.top_p is not none %} --top-p {{config.params.top_p}}{% endif %}{% if config.params.max_new_tokens is not none %} --max-tokens {{config.params.max_new_tokens}}{% endif %} &&
|
|
33
|
+
JUDGE_OUTPUT=$(ls -t {{config.output_dir}}/judgements/*.jsonl | head -1) &&
|
|
34
|
+
python -m profbench.score_report_generation $JUDGE_OUTPUT
|
|
35
|
+
{% endif %}
|
|
36
|
+
{% if config.params.extra.run_judge_provided %}
|
|
37
|
+
python -m profbench.run_llm_judge_on_provided_reports \
|
|
38
|
+
--model {{target.api_endpoint.model_id}} \
|
|
39
|
+
--library {{config.params.extra.library}} \
|
|
40
|
+
--timeout {{config.params.request_timeout}} \
|
|
41
|
+
--parallel {{config.params.parallelism}} \
|
|
42
|
+
--retry-attempts {{config.params.max_retries}} \
|
|
43
|
+
--folder {{config.output_dir}}{% if target.api_endpoint.url is not none %} --base-url {{target.api_endpoint.url}}{% endif %}{% if config.params.extra.reasoning %} --reasoning{% endif %}{% if config.params.extra.reasoning_effort is not none %} --reasoning-effort {{config.params.extra.reasoning_effort}}{% endif %}{% if config.params.extra.debug %} --debug{% endif %}{% if config.params.limit_samples is not none %} --limit-samples {{config.params.limit_samples}}{% endif %}{% if config.params.temperature is not none %} --temperature {{config.params.temperature}}{% endif %}{% if config.params.top_p is not none %} --top-p {{config.params.top_p}}{% endif %}{% if config.params.max_new_tokens is not none %} --max-tokens {{config.params.max_new_tokens}}{% endif %} &&
|
|
44
|
+
JUDGE_OUTPUT=$(ls -t {{config.output_dir}}/*.jsonl | head -1) &&
|
|
45
|
+
python -m profbench.score_llm_judge $JUDGE_OUTPUT
|
|
46
|
+
{% endif %}
|
|
47
|
+
|
|
48
|
+
config:
|
|
49
|
+
params:
|
|
50
|
+
limit_samples: null
|
|
51
|
+
max_new_tokens: 4096
|
|
52
|
+
temperature: 0.0
|
|
53
|
+
top_p: 0.00001
|
|
54
|
+
parallelism: 10
|
|
55
|
+
max_retries: 5
|
|
56
|
+
request_timeout: 600
|
|
57
|
+
extra:
|
|
58
|
+
run_generation: false
|
|
59
|
+
run_judge_generated: false
|
|
60
|
+
run_judge_provided: false
|
|
61
|
+
library: openai
|
|
62
|
+
version: lite # debug, lite, or full
|
|
63
|
+
web_search: false
|
|
64
|
+
reasoning: false
|
|
65
|
+
reasoning_effort: null # low, medium, high, or minimal
|
|
66
|
+
debug: false
|
|
67
|
+
|
|
68
|
+
target:
|
|
69
|
+
api_endpoint: {} # required to add: model_id, api_key; optional: url
|
|
70
|
+
|
|
71
|
+
evaluations:
|
|
72
|
+
- name: report_generation
|
|
73
|
+
description: Generate professional reports and evaluate them (full pipeline)
|
|
74
|
+
defaults:
|
|
75
|
+
config:
|
|
76
|
+
type: report_generation
|
|
77
|
+
supported_endpoint_types:
|
|
78
|
+
- chat
|
|
79
|
+
params:
|
|
80
|
+
extra:
|
|
81
|
+
run_generation: true
|
|
82
|
+
run_judge_generated: true
|
|
83
|
+
run_judge_provided: false
|
|
84
|
+
|
|
85
|
+
- name: llm_judge
|
|
86
|
+
description: Run LLM judge on provided ProfBench reports and score them
|
|
87
|
+
defaults:
|
|
88
|
+
config:
|
|
89
|
+
type: llm_judge
|
|
90
|
+
supported_endpoint_types:
|
|
91
|
+
- chat
|
|
92
|
+
params:
|
|
93
|
+
extra:
|
|
94
|
+
run_generation: false
|
|
95
|
+
run_judge_generated: false
|
|
96
|
+
run_judge_provided: true
|
|
97
|
+
|
|
98
|
+
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pathlib
|
|
18
|
+
import re
|
|
19
|
+
|
|
20
|
+
from nemo_evaluator.api.api_dataclasses import EvaluationResult
|
|
21
|
+
|
|
22
|
+
# This is the only required function
|
|
23
|
+
def parse_output(output_dir: str) -> EvaluationResult:
|
|
24
|
+
"""
|
|
25
|
+
Parse ProfBench evaluation output.
|
|
26
|
+
|
|
27
|
+
This function looks for *_eval.json files created by the scoring scripts.
|
|
28
|
+
"""
|
|
29
|
+
result_files = list(pathlib.Path(output_dir).rglob("*_eval.json"))
|
|
30
|
+
if not result_files:
|
|
31
|
+
raise FileNotFoundError(f"Failed to find `*_eval.json` with metrics in {output_dir}.")
|
|
32
|
+
if len(result_files) > 1:
|
|
33
|
+
raise ValueError(
|
|
34
|
+
f"More than 1 `*_eval.json` files found in {output_dir}. `output_dir` must contain a single evaluation."
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
result_file = result_files[0]
|
|
38
|
+
|
|
39
|
+
# Determine task name from filename
|
|
40
|
+
if "llm_judge_eval" in result_file.name:
|
|
41
|
+
task_name = "llm_judge"
|
|
42
|
+
elif "report_generation_eval" in result_file.name:
|
|
43
|
+
task_name = "report_generation"
|
|
44
|
+
else:
|
|
45
|
+
task_name = "profbench"
|
|
46
|
+
|
|
47
|
+
with open(result_file) as fp:
|
|
48
|
+
results = json.load(fp)
|
|
49
|
+
|
|
50
|
+
# Remove detail if present
|
|
51
|
+
if 'detail' in results:
|
|
52
|
+
results.pop('detail')
|
|
53
|
+
|
|
54
|
+
tasks = {}
|
|
55
|
+
metrics = {}
|
|
56
|
+
|
|
57
|
+
for metric_name, value in results.items():
|
|
58
|
+
# Skip _stderr fields as they are handled with their corresponding metrics
|
|
59
|
+
if metric_name.endswith("_stderr"):
|
|
60
|
+
continue
|
|
61
|
+
|
|
62
|
+
# Check if there's a corresponding _stderr field
|
|
63
|
+
stderr_key = f"{metric_name}_stderr"
|
|
64
|
+
if stderr_key in results:
|
|
65
|
+
metrics[metric_name] = dict(
|
|
66
|
+
scores={metric_name: dict(value=value, stats={"stderr": results[stderr_key]})}
|
|
67
|
+
)
|
|
68
|
+
else:
|
|
69
|
+
# Provide empty stats dict as required by EvaluationResult
|
|
70
|
+
metrics[metric_name] = dict(
|
|
71
|
+
scores={metric_name: dict(value=value, stats={})}
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
tasks[task_name] = dict(
|
|
75
|
+
metrics=metrics
|
|
76
|
+
)
|
|
77
|
+
return EvaluationResult(groups=tasks, tasks=tasks)
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nvidia-profbench
|
|
3
|
+
Version: 25.11
|
|
4
|
+
Summary: Professional domain benchmark for evaluating LLMs on Physics PhD, Chemistry PhD, Finance MBA, and Consulting MBA tasks
|
|
5
|
+
Author: NVIDIA Corporation
|
|
6
|
+
License: Apache License 2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/nvidia/profbench
|
|
8
|
+
Project-URL: Repository, https://github.com/nvidia/profbench
|
|
9
|
+
Project-URL: Documentation, https://github.com/nvidia/profbench/blob/main/README.md
|
|
10
|
+
Keywords: llm,evaluation,benchmark,professional,phd,mba
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Requires-Python: >=3.8
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
License-File: LICENSE-APACHE
|
|
19
|
+
Requires-Dist: openai>=1.71.0
|
|
20
|
+
Requires-Dist: datasets>=2.14.7
|
|
21
|
+
Requires-Dist: huggingface-hub>=0.33.1
|
|
22
|
+
Requires-Dist: numpy
|
|
23
|
+
Requires-Dist: scikit-learn
|
|
24
|
+
Requires-Dist: tqdm
|
|
25
|
+
Requires-Dist: nemo-evaluator
|
|
26
|
+
Requires-Dist: google-genai
|
|
27
|
+
Provides-Extra: google
|
|
28
|
+
Requires-Dist: google-genai; extra == "google"
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
31
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
32
|
+
Requires-Dist: black; extra == "dev"
|
|
33
|
+
Requires-Dist: flake8; extra == "dev"
|
|
34
|
+
Requires-Dist: mypy; extra == "dev"
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
# NVIDIA Evals Factory
|
|
38
|
+
The goal of NVIDIA Evals Factory is to advance and refine state-of-the-art methodologies for model evaluation, and deliver them as modular evaluation packages (evaluation containers and pip wheels) that teams can use as standardized building blocks.
|
|
39
|
+
|
|
40
|
+
# ProfBench
|
|
41
|
+
|
|
42
|
+
ProfBench is part of NVIDIA Evals Factory, providing standardized evaluation methodologies for assessing LLMs on professional domain tasks.
|
|
43
|
+
|
|
44
|
+
## Overview
|
|
45
|
+
|
|
46
|
+
ProfBench introduces over 3000 expert-authored response–criterion pairs across 40 tasks in four professional domains: **Physics PhD**, **Chemistry PhD**, **Finance MBA**, and **Consulting MBA**. It enables evaluation of open-ended, document-grounded professional tasks beyond exam-style QA or code/math-only settings.
|
|
47
|
+
|
|
48
|
+
**Key Features:**
|
|
49
|
+
- Realistic professional workflows requiring synthesis and long-form analysis
|
|
50
|
+
- Robust, affordable LLM-Judge combining Macro-F1 measure with Bias Index
|
|
51
|
+
- Achieves <1% cross-provider bias while reducing costs by 2-3 orders of magnitude
|
|
52
|
+
- Evaluation cost: ~$12 per run (vs ~$300 for HealthBench, ~$8000 for PaperBench with OpenAI o3)
|
|
53
|
+
|
|
54
|
+
Even frontier models find ProfBench challenging: the best report-generator GPT-5-high reaches only 65.9% overall, underscoring substantial headroom in realistic professional workflows.
|
|
55
|
+
|
|
56
|
+
## Quick Start Guide
|
|
57
|
+
|
|
58
|
+
NVIDIA Evals Factory provide you with evaluation clients, that are specifically built to evaluate model endpoints using our Standard API.
|
|
59
|
+
|
|
60
|
+
### Launching an Evaluation
|
|
61
|
+
|
|
62
|
+
#### List the Available Evaluations
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
$ nemo-evaluator ls
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Output:
|
|
69
|
+
```
|
|
70
|
+
profbench:
|
|
71
|
+
* report_generation
|
|
72
|
+
* llm_judge
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
#### Run the Evaluation of Your Choice
|
|
76
|
+
|
|
77
|
+
**LLM Judge Evaluation:**
|
|
78
|
+
```bash
|
|
79
|
+
export API_KEY=your_nvidia_api_key_here
|
|
80
|
+
|
|
81
|
+
nemo-evaluator run_eval \
|
|
82
|
+
--eval_type llm_judge \
|
|
83
|
+
--model_id meta/llama-3.1-70b-instruct \
|
|
84
|
+
--model_type chat \
|
|
85
|
+
--model_url https://integrate.api.nvidia.com/v1/chat/completions \
|
|
86
|
+
--api_key_name API_KEY \
|
|
87
|
+
--output_dir './results/profbench_llm_judge'
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Report Generation Evaluation:**
|
|
91
|
+
```bash
|
|
92
|
+
nemo-evaluator run_eval \
|
|
93
|
+
--eval_type report_generation \
|
|
94
|
+
--model_id meta/llama-3.1-70b-instruct \
|
|
95
|
+
--model_type chat \
|
|
96
|
+
--model_url https://integrate.api.nvidia.com/v1/chat/completions \
|
|
97
|
+
--api_key_name API_KEY \
|
|
98
|
+
--output_dir './results/profbench_report_generation'
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
#### Gather the Results
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
cat ./results/profbench_llm_judge/results.yml
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Example LLM Judge Output:**
|
|
108
|
+
```yaml
|
|
109
|
+
results:
|
|
110
|
+
tasks:
|
|
111
|
+
llm_judge:
|
|
112
|
+
metrics:
|
|
113
|
+
Overall:
|
|
114
|
+
scores:
|
|
115
|
+
Overall:
|
|
116
|
+
value: 65.3
|
|
117
|
+
Physics PhD:
|
|
118
|
+
scores:
|
|
119
|
+
Physics PhD:
|
|
120
|
+
value: 66.5
|
|
121
|
+
Chemistry PhD:
|
|
122
|
+
scores:
|
|
123
|
+
Chemistry PhD:
|
|
124
|
+
value: 60.3
|
|
125
|
+
Finance MBA:
|
|
126
|
+
scores:
|
|
127
|
+
Finance MBA:
|
|
128
|
+
value: 61.4
|
|
129
|
+
Consulting MBA:
|
|
130
|
+
scores:
|
|
131
|
+
Consulting MBA:
|
|
132
|
+
value: 63.4
|
|
133
|
+
BIAS-INDEX:
|
|
134
|
+
scores:
|
|
135
|
+
BIAS-INDEX:
|
|
136
|
+
value: 4.0
|
|
137
|
+
MF1-BI:
|
|
138
|
+
scores:
|
|
139
|
+
MF1-BI:
|
|
140
|
+
value: 61.3
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Example Report Generation Output:**
|
|
144
|
+
```yaml
|
|
145
|
+
results:
|
|
146
|
+
tasks:
|
|
147
|
+
report_generation:
|
|
148
|
+
metrics:
|
|
149
|
+
Overall:
|
|
150
|
+
scores:
|
|
151
|
+
Overall:
|
|
152
|
+
value: 11.4
|
|
153
|
+
Physics PhD:
|
|
154
|
+
scores:
|
|
155
|
+
Physics PhD:
|
|
156
|
+
value: 3.4
|
|
157
|
+
Chemistry PhD:
|
|
158
|
+
scores:
|
|
159
|
+
Chemistry PhD:
|
|
160
|
+
value: 7.1
|
|
161
|
+
Finance MBA:
|
|
162
|
+
scores:
|
|
163
|
+
Finance MBA:
|
|
164
|
+
value: 6.0
|
|
165
|
+
Consulting MBA:
|
|
166
|
+
scores:
|
|
167
|
+
Consulting MBA:
|
|
168
|
+
value: 28.9
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Command-Line Tool
|
|
172
|
+
|
|
173
|
+
Each package comes pre-installed with a set of command-line tools, designed to simplify the execution of evaluation tasks through the `nemo-evaluator` interface.
|
|
174
|
+
|
|
175
|
+
### Commands
|
|
176
|
+
|
|
177
|
+
#### 1. List Evaluation Types
|
|
178
|
+
```bash
|
|
179
|
+
nemo-evaluator ls
|
|
180
|
+
```
|
|
181
|
+
Displays the evaluation types available within the ProfBench harness.
|
|
182
|
+
|
|
183
|
+
#### 2. Run an Evaluation
|
|
184
|
+
|
|
185
|
+
The `nemo-evaluator run_eval` command executes the evaluation process. Below are the flags and their descriptions:
|
|
186
|
+
|
|
187
|
+
**Required Flags:**
|
|
188
|
+
- `--eval_type <string>` - The type of evaluation to perform (`llm_judge` or `report_generation`)
|
|
189
|
+
- `--model_id <string>` - The name or identifier of the model to evaluate
|
|
190
|
+
- `--model_url <url>` - The API endpoint where the model is accessible
|
|
191
|
+
- `--model_type <string>` - The type of the model to evaluate, currently either `chat`, `completions`, or `vlm`
|
|
192
|
+
- `--output_dir <directory>` - The directory to use as the working directory for the evaluation. The results, including the `results.yml` output file, will be saved here
|
|
193
|
+
|
|
194
|
+
**Optional Flags:**
|
|
195
|
+
- `--api_key_name <string>` - The name of the environment variable that stores the Bearer token for the API, if authentication is required
|
|
196
|
+
- `--run_config <path>` - Specifies the path to a YAML file containing the evaluation definition
|
|
197
|
+
- `--overrides <string>` - Override configuration parameters (e.g., `"config.params.limit_samples=10"`)
|
|
198
|
+
- `--dry_run` - Print the final run configuration and command without executing the evaluation
|
|
199
|
+
|
|
200
|
+
#### Example
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
nemo-evaluator run_eval \
|
|
204
|
+
--eval_type llm_judge \
|
|
205
|
+
--model_id meta/llama-3.1-70b-instruct \
|
|
206
|
+
--model_type chat \
|
|
207
|
+
--model_url https://integrate.api.nvidia.com/v1/chat/completions \
|
|
208
|
+
--output_dir ./evaluation_results
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
If the model API requires authentication, set the API key in an environment variable and reference it using the `--api_key_name` flag:
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
export API_KEY="your_api_key_here"
|
|
215
|
+
|
|
216
|
+
nemo-evaluator run_eval \
|
|
217
|
+
--eval_type llm_judge \
|
|
218
|
+
--model_id meta/llama-3.1-70b-instruct \
|
|
219
|
+
--model_type chat \
|
|
220
|
+
--model_url https://integrate.api.nvidia.com/v1/chat/completions \
|
|
221
|
+
--api_key_name API_KEY \
|
|
222
|
+
--output_dir ./evaluation_results
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Configuring Evaluations via YAML
|
|
226
|
+
|
|
227
|
+
Evaluations in NVIDIA Evals Factory are configured using YAML files that define the parameters and settings required for the evaluation process. These configuration files follow a standard API which ensures consistency across evaluations.
|
|
228
|
+
|
|
229
|
+
**Example of a YAML config:**
|
|
230
|
+
|
|
231
|
+
```yaml
|
|
232
|
+
config:
|
|
233
|
+
type: llm_judge
|
|
234
|
+
params:
|
|
235
|
+
parallelism: 10
|
|
236
|
+
limit_samples: 30
|
|
237
|
+
max_new_tokens: 4096
|
|
238
|
+
temperature: 0.0
|
|
239
|
+
top_p: 0.00001
|
|
240
|
+
target:
|
|
241
|
+
api_endpoint:
|
|
242
|
+
model_id: meta/llama-3.1-70b-instruct
|
|
243
|
+
type: chat
|
|
244
|
+
url: https://integrate.api.nvidia.com/v1/chat/completions
|
|
245
|
+
api_key: API_KEY
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
The priority of overrides is as follows:
|
|
249
|
+
|
|
250
|
+
1. Command line arguments
|
|
251
|
+
2. User config (as seen above)
|
|
252
|
+
3. Task defaults (defined per task type)
|
|
253
|
+
4. Framework defaults
|
|
254
|
+
|
|
255
|
+
**`--dry_run` option** allows you to print the final run configuration and command without executing the evaluation.
|
|
256
|
+
|
|
257
|
+
**Example:**
|
|
258
|
+
```bash
|
|
259
|
+
nemo-evaluator run_eval \
|
|
260
|
+
--eval_type llm_judge \
|
|
261
|
+
--model_id meta/llama-3.1-70b-instruct \
|
|
262
|
+
--model_type chat \
|
|
263
|
+
--model_url https://integrate.api.nvidia.com/v1/chat/completions \
|
|
264
|
+
--output_dir ./evaluation_results \
|
|
265
|
+
--dry_run
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## FAQ
|
|
269
|
+
|
|
270
|
+
### Deploying a Model as an Endpoint
|
|
271
|
+
|
|
272
|
+
NVIDIA Evals Factory utilize a client-server communication architecture to interact with the model. As a prerequisite, the model must be deployed as an endpoint with a NIM-compatible API.
|
|
273
|
+
|
|
274
|
+
Users have the flexibility to deploy their model using their own infrastructure and tooling.
|
|
275
|
+
|
|
276
|
+
Servers with APIs that conform to the OpenAI/NIM API standard are expected to work seamlessly out of the box.
|
|
277
|
+
|
|
278
|
+
### Evaluation Types
|
|
279
|
+
|
|
280
|
+
**1. LLM Judge (`llm_judge`)**
|
|
281
|
+
|
|
282
|
+
Evaluates model responses against expert-authored criteria across professional domains.
|
|
283
|
+
|
|
284
|
+
- Assesses professional reasoning, extraction accuracy, and writing style
|
|
285
|
+
- Provides domain-specific scores (Physics PhD, Chemistry PhD, Finance MBA, Consulting MBA)
|
|
286
|
+
- Includes bias metrics (BIAS-INDEX, MF1-BI) to measure self-enhancement bias
|
|
287
|
+
|
|
288
|
+
**2. Report Generation (`report_generation`)**
|
|
289
|
+
|
|
290
|
+
End-to-end evaluation pipeline for professional report writing.
|
|
291
|
+
|
|
292
|
+
- Generates professional reports from prompts
|
|
293
|
+
- Uses LLM-as-a-judge to evaluate generated reports
|
|
294
|
+
- Scores across domains and skill dimensions (Reasoning, Extraction, Style)
|
|
295
|
+
|
|
296
|
+
### Metrics Explained
|
|
297
|
+
|
|
298
|
+
**Domain Scores:** Performance on specific professional domains:
|
|
299
|
+
- Physics PhD
|
|
300
|
+
- Chemistry PhD
|
|
301
|
+
- Finance MBA
|
|
302
|
+
- Consulting MBA
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
### Supported Libraries
|
|
306
|
+
|
|
307
|
+
- **`openai`** - OpenAI API and OpenAI-compatible endpoints (NVIDIA NIM, OpenRouter, vLLM, etc.)
|
|
308
|
+
|
|
309
|
+
**Note:** Web search features are only available with Google GenAI library. This feature will raise `NotImplementedError` if used with OpenAI or OpenRouter APIs.
|
|
310
|
+
|
|
311
|
+
### Contributing
|
|
312
|
+
|
|
313
|
+
This software is distributed as a pip wheel only. The source repository is internal to NVIDIA and not publicly accessible. For issues or questions, please refer to the NVIDIA support channels.
|
|
314
|
+
|
|
315
|
+
### License
|
|
316
|
+
This software is distributed under the terms of both the MIT license and the Apache License (Version 2.0). See LICENSE and LICENSE-APACHE for details.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
core_evals/profbench/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
core_evals/profbench/framework.yml,sha256=jEA-sJU0aghJ1hZ_NIx_4ptRGXDeJOl4HzYUc4bziZY,5530
|
|
3
|
+
core_evals/profbench/output.py,sha256=A4NyYvQGA1BWSxF4jRIx6v5ewVUW5hQyGWchhqUtiC4,2707
|
|
4
|
+
nvidia_profbench-25.11.dist-info/licenses/LICENSE,sha256=XceIwpnulSX-tAU4MME1jFKcZ6kG5GExHiIAqJ8NX_w,1066
|
|
5
|
+
nvidia_profbench-25.11.dist-info/licenses/LICENSE-APACHE,sha256=cSWJDwVqHyQgly8Zmt3pqXJ2eQbZVYwN9qd0NMssxXY,11336
|
|
6
|
+
profbench/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
profbench/run_best_llm_judge_on_generated_reports.py,sha256=G09xMPdM507vsf4IACuuC1RGAJ7GmcAUHHUWahsUWZA,5012
|
|
8
|
+
profbench/run_llm_judge_on_provided_reports.py,sha256=_BBfm2-xg1vKngPH6Ob6g0uDUivgACz8b1StPWmo4dA,5527
|
|
9
|
+
profbench/run_report_generation.py,sha256=AfZIyrAWTeJm3I4NpVtdoTx2v2psbFvgXaagNqyAaSQ,11864
|
|
10
|
+
profbench/score_llm_judge.py,sha256=CpT1HHI3fRda0h7k7fgUUBtptmC54Fhu11GbdIE-qz8,3870
|
|
11
|
+
profbench/score_report_generation.py,sha256=v9w15qGrh4Wn8E5QTSD3asz8iU5Kc8EQBfHT9US81dQ,4729
|
|
12
|
+
profbench/utils.py,sha256=Vqbq6M9KSkdCPQAr0vxYdX4uSySovoywRoFhTnVbgiY,5679
|
|
13
|
+
nvidia_profbench-25.11.dist-info/METADATA,sha256=QvVMQtaRloQkwpfN2o0-FPAFsHTrNFc8Yq7-tSVz16U,10360
|
|
14
|
+
nvidia_profbench-25.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
15
|
+
nvidia_profbench-25.11.dist-info/entry_points.txt,sha256=AYZANph5MOOjCEj6bfLvAJgBCF45sfIUskE8zxzZRY4,167
|
|
16
|
+
nvidia_profbench-25.11.dist-info/top_level.txt,sha256=X-IIup1giKjIVInf1m4vXX4FH1-dVqHtDSEIlL2UR_g,21
|
|
17
|
+
nvidia_profbench-25.11.dist-info/RECORD,,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright 2025 NVIDIA Corporation
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|