af-component-evaluation
Homepage · Documentation · Support
Note
This project is in beta. APIs, configuration, and outputs may change between releases.
The agent evaluation component
Batch-tests agent responses at scale for DataRobot App Framework projects using the NeMo Evaluator BYOB (Bring Your Own Benchmark) framework. App developers use it to regression-test agents after model or prompt changes, run safety and quality checks, and compare versions against a fixed dataset. The evaluator treats the agent as a black box—only the final OpenAI-compatible response is scored.
This repository ships the Copier template (template/) that renders into a project, plus user-facing documentation in template/docs/evaluation/ (rendered to docs/evaluation/ in an installed project). The component runs in an isolated uv environment; the core CLI invokes it as a subprocess with no shared dependencies.
What it does: Sends each test prompt to the agent's OpenAI-compatible endpoint, then scores the response. It ships 10 isolated benchmarks—pick one per run via a pipeline YAML. Four are judge-based (LLM-as-judge: answer_quality, safety_refusal, faithfulness, response_acceptability) and six are judge-free (deterministic, no judge model needed: answer_correctness, response_similarity, instruction_following, prompt_injection, pii_leakage, tool_grounding). Output is normalized to a stable JSON schema.
- Prerequisites
- Quick start
- Component dependencies
- Authentication and configuration
- Documentation
- Troubleshooting
- Next steps and cross-links
- Contributing, changelog, support, and legal
Install the following tools before adding this component to a project or developing against this repository.
- Python 3.11+
uvanduvxinstalleddrinstalled (fordr component addanddr task)- A DataRobot account with API access and a valid API token (for judge-based benchmarks and dataset generation)
Add the component to a DataRobot App Framework project with the following command:
dr component add https://github.com/datarobot-community/af-component-evaluation .If additional control is needed, run Copier directly:
uvx copier copy datarobot-community/af-component-evaluation .After the wizard completes, the project contains the evaluation component ready for customization. Run a first evaluation from the component directory:
task install
task eval -- \
--endpoint http://localhost:8842/v1 \
--pipeline answer_quality.yaml \
--dataset user_datasets/sample_answer_quality.json \
--dry-runSet DATAROBOT_API_TOKEN and DATAROBOT_ENDPOINT in the project-root .env before judge-based runs. See Getting started for the full walkthrough.
This section lists required App Framework components and how to update or develop this component locally.
The following components must be applied to the project before this component:
| Name | Repository | Repeatable |
|---|---|---|
base |
https://github.com/datarobot-community/af-component-base | No |
Work on this repository directly from the repo root. The root Taskfile.yml delegates to template/[[ evaluation_app_name ]]/ so tasks run against the source template without a .rendered/ step.
| Command | Purpose |
|---|---|
task install |
Install dependencies and render pyproject.toml |
task test |
Run unit tests |
task lint |
Run ruff and mypy |
task render |
Render the Copier template to ./.rendered for inspection |
task eval -- --help |
Run the evaluation CLI against the source component |
Install pre-commit hooks once so formatting and secret checks run on commit:
uvx pre-commit installKey paths:
template/[[ evaluation_app_name ]]/—component source rendered into projectstemplate/docs/evaluation/—user-facing documentation shipped with the templateDEVELOPMENT.md—internals, output contract, and how to add benchmarks
All components should be regularly updated to pick up bug fixes, new features, and compatibility with the latest DataRobot App Framework.
For automatic updates to the latest version, run the following command in your project directory:
dr component update .datarobot/answers/evaluation-[[ evaluation_app_name ]].ymlIf you need more fine grained control and prefer using copier directly, you can run this to have more control over the process:
uvx copier update -a .datarobot/answers/evaluation-[[ evaluation_app_name ]].yml -ASet the following environment variables before running judge-based benchmarks or generating datasets:
export DATAROBOT_ENDPOINT=https://app.datarobot.com/api/v2
export DATAROBOT_API_TOKEN=YOUR_API_TOKENThese values can also live in a .env file at the project root instead of exporting them in the shell.
User-facing documentation ships with the component in template/docs/evaluation/ and is rendered to docs/evaluation/ in an installed project.
| Page | What it covers |
|---|---|
| Getting started | Install through the first completed run |
| Overview | Index of all evaluation docs |
| Benchmarks | The 8 built-in benchmarks and what each scores |
| Pipelines | Configuring a run with a pipeline YAML |
| Datasets | Test case format and required fields |
| Outputs | Result schema, scoring, inconclusive cases |
| Writing your own benchmark | Custom scorers |
| Troubleshooting | Judge-model gotchas and known limits |
| NAT vs. NeMo | How this differs from NVIDIA NAT /evaluate |
Developing this component itself is covered in DEVELOPMENT.md.
Common issues when running or developing this component:
| Symptom | Likely cause | Fix |
|---|---|---|
| Judge returns 400 on Bedrock models | NeMo sends both temperature and top_p |
Use an Azure GPT judge in the pipeline YAML |
| Wrong judge model name | LiteLLM datarobot/ prefix used against the gateway |
Use gateway catalog names (for example azure/gpt-5-5-2026-04-23) |
| Cases marked inconclusive on safety runs | Judge endpoint content-filtered the adversarial prompt | Expected behavior—see Outputs |
task eval cannot reach agent |
Agent not running or wrong port | Start the agent (dr run dev) and confirm http://localhost:8842/v1 |
Full troubleshooting guide: template/docs/evaluation/troubleshooting.md.
- Getting started—first evaluation run
- NAT vs. NeMo—when to use batch output testing vs. NAT
/evaluate - Writing your own benchmark—custom BYOB scorers
- DataRobot App Framework documentation—component model and CLI
- NeMo Evaluator BYOB—underlying benchmark framework
See AUTHORS and LICENSE for authorship and licensing.
To contribute, fork the repository, make changes on a branch, and open a pull request. Ensure task test passes before submitting. See CONTRIBUTING.md for additional guidelines, and DEVELOPMENT.md for component internals.
Release-by-release changes are recorded in CHANGELOG.md. The version in the root pyproject.toml is what gets tagged on merge, so a change that should ship bumps that version, runs uv lock, and files its changelog entry under the new number. CI enforces the entry, and the skip-changelog label waives it for changes with no user-visible effect.
For support, see the troubleshooting guide or contact DataRobot.