# MentorEvaluator class

> The MentorEvaluator class of Novior.MentorAgent.Evaluation: Prompt / regression evaluation harness (roadmap #10). Runs each EvalCase through the configured…

- URL: https://docs.mentoragent.net/api/novior-mentoragent-evaluation/mentorevaluator
- Verified with: MentorAgent 1.2.0
- Last updated: 2026-10-27
- Packages: Novior.MentorAgent

Prompt / regression evaluation harness (roadmap \#10). Runs each [`EvalCase`](https://docs.mentoragent.net/api/novior-mentoragent-evaluation/evalcase) through the configured `ChatClient`, reading the provider's real per-case token usage, applies a built-in non-empty check and an optional lightweight LLM-as-judge, and returns a [`MentorEvalReport`](https://docs.mentoragent.net/api/novior-mentoragent-evaluation/mentorevalreport) that fails when a run exceeds a token budget or drops below a quality threshold — so you can gate CI on it. When the developer supplies native checks/evaluators ([`MentorEvalOptions.Checks`](https://docs.mentoragent.net/api/novior-mentoragent-evaluation/mentorevaloptions#checks) / [`MentorEvalOptions.Evaluators`](https://docs.mentoragent.net/api/novior-mentoragent-evaluation/mentorevaloptions#evaluators), e.g. `EvalChecks`, `FoundryEvals`, MEAI quality/safety), the Agent Framework's native evaluation runs on top and its verdicts also gate the report. Uses only already-referenced packages (`Microsoft.Agents.AI`). Point it at your mentor's `ChatClient` and pass your system instructions to catch prompt regressions; for full-pipeline token checks, drive the orchestrator instead and assert on `IMentorMetrics.GetSnapshot()`.

## Definition

Namespace: `Novior.MentorAgent.Evaluation`. Package: `Novior.MentorAgent`.

`public sealed class MentorEvaluator`

```shell
dotnet add package Novior.MentorAgent
```

## Constructors

`public MentorEvaluator(IOptions<MentorOptions> options, ILogger<MentorEvaluator> logger)`

## Methods

### `RunAsync`

`public Task<MentorEvalReport> RunAsync(IEnumerable<EvalCase> cases, MentorEvalOptions? evalOptions = null, CancellationToken ct = default)`

---

- Previous: [MentorEvalResult record](https://docs.mentoragent.net/api/novior-mentoragent-evaluation/mentorevalresult.md)
- Next: [EndpointRouteBuilderExtensions class](https://docs.mentoragent.net/api/novior-mentoragent-extensions/endpointroutebuilderextensions.md)
