Skip to content

EvalCheckRegistry

Namespace AgentPrism · Assembly AgentPrism.Core.dll

Converts the declarative check definitions in EvalSuite.Checks into AI.EvalCheck instances.

public sealed class EvalCheckRegistry

objectEvalCheckRegistry

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

The six built-in check kinds map directly to Microsoft.Agents.AI.EvalChecks factories: nonEmpty, containsExpected, keywords, toolCalled, toolCallsPresent, hasImageContent. Any other kind name is looked up among the custom checks registered with IAgentPrismBuilder.AddEvalCheck(...); if not found there either, an AgentPrismException is thrown (the code-only tools rule - checks are declarative, never silently ignored).

toolCallArgsMatch is intentionally not supported: EvalCase only carries the expected tool names, not the expected arguments needed for a full argument match.

EvalCheckRegistry(IEnumerable<AgentPrismEvalCheckRegistration>)

Section titled “ EvalCheckRegistry(IEnumerable<AgentPrismEvalCheckRegistration>)”

Creates a new registry from a set of registrations.

public EvalCheckRegistry(IEnumerable<AgentPrismEvalCheckRegistration> registrations)

registrations IEnumerable<AgentPrismEvalCheckRegistration>

Custom check registrations.

ArgumentNullException

registrations is null.

AgentPrismException

The same kind name is registered more than once.

Converts a suite’s EvalSuite.Checks field into an array of AI.EvalCheck instances.

public IReadOnlyList<EvalCheck> BuildChecks(JsonElement checks)

checks JsonElement

JSON array carrying the check definitions.

IReadOnlyList<EvalCheck>

The ordered list of checks. Returns an empty list when the payload is undefined or empty.

AgentPrismException

A definition does not carry a kind field, or points to an unknown kind name.