Skip to main content
Every evaluator in multivon-eval inherits from Evaluator. You can build your own with a few lines.

The base class

self._result(score, reason) handles the threshold comparison and returns an EvalResult.

Example: sentence count

Declare custom grader dependencies (development)

The 0.19.0 comparison gates require a contract for custom graders, including simple classes defined outside Multivon. This makes unrecorded callbacks and hidden configuration visible instead of treating equal class names as proof of compatibility. For the self-contained example above:
The version identifies your complete implementation. Update it when behavior changes; list model/data/helper revisions and named files when applicable. Portable instance configuration is also captured. See dependency contracts for file hashes, snapshot timing and limits. Grading remains usable without a contract, but an unknown contract cannot pass a verified comparison gate.

Example: LLM-based custom check

For a custom LLM criterion, reuse CheckEvaluator so your check participates in configured judge routing, error accounting, cost tracking, and UNKNOWN verdict handling:
If you implement a provider call yourself, set uses_llm_judge = True, raise JudgeUnavailable when no verdict can be obtained, and explicitly handle usage tracking and configuration. Do not turn an unparseable reply into a quality failure. Grader prompts can themselves be manipulated by the output being graded; test adversarial outputs and review disagreements.

EvalResult fields

Accessing case fields

When required evidence is absent, return self._skipped("missing final state") instead of fabricating a pass or failure. Skipped scores are placeholders. A case with another applicable grader can still be evaluated; enforce coverage for every required check in your application’s release policy.