In short.
Pydantic Evals’ native evaluator guide is a reference for Python developers assessing AI applications, but it leaves installation, task execution and exact model costs unspecified. It documents deterministic checks, LLMJudge and GEval, OpenTelemetry span queries, and experiment metrics. Important details include skipped assertions when EqualsExpected receives no expected answer, optional context for model judges, and span checks that report whether a matching event exists. The page recommends ordering inexpensive checks before model judges, but does not establish that failed checks prevent later evaluators from running. No code was executed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete selected page at [https://pydantic.dev/docs/ai/evals/evaluators/built-in/index.md]: its documentation-index and request-parameter notices, evaluator descriptions, examples, tables and links. Those notices add no evidence about evaluator behavior. Linked pages, repository files, installation documentation and provider terms are excluded. All examples remain unexecuted; runtime behavior, automatic skipping of later evaluators, judge accuracy, measured performance, exact costs and licensing remain unverified or unknown.
The overview
identity
Native Evaluators is a documentation page for Pydantic Evals at [https://pydantic.dev/docs/ai/evals/evaluators/built-in/index.md]. It explains the library’s supplied evaluators through Python imports, configuration examples, parameter descriptions and return types.
The resource is a guide to a library feature. Its examples construct Case and Dataset objects and attach evaluators; they do not demonstrate a standalone application or a complete evaluation run.
assessment
The guide is useful for choosing checks once an evaluation task and representative cases have been defined. It distinguishes exact comparisons, content checks, type checks, timing thresholds, subjective judgments and checks of recorded internal behavior.
Its strongest practical details concern conditions that can produce misleading results: a missing expected answer creates no EqualsExpected assertion, finding an error span returns true, and judging against a reference requires explicitly including that reference. Installation, execution behavior and judgment accuracy remain unassessed.
users
Python developers building AI applications can use this page to choose checks for individual outputs. Developers evaluating classifications can also identify report evaluators for confusion matrices, precision and recall, ROC AUC and distribution comparisons.
Beginners get small configuration examples, but need familiarity with Python objects and imports. Developers inspecting tool use or internal model calls also need familiarity with tracing: spans are records of operations performed during a task.
capabilities
EqualsExpected compares an output with its case’s expected answer. Equals compares with an explicitly supplied value. Contains checks substrings, list or tuple membership, or dictionary key-value pairs. IsInstance checks type names through the inheritance hierarchy. MaxDuration compares recorded task duration with a threshold.
LLMJudge applies a rubric and can return a boolean assertion, a score from 0.0 to 1.0, or both, with configurable explanations and result names. GEval applies explicit evaluation steps and returns an integer score on a configured scale. HasMatchingSpan checks whether any recorded span matches a query.
For whole experiments, the page lists ConfusionMatrixEvaluator, PrecisionRecallEvaluator, ROCAUCEvaluator and KolmogorovSmirnovEvaluator. It identifies their outputs, but leaves their full parameters and examples to another page.
Using it
requirements
The examples require a Python environment where pydantic_evals is available. Supported Python versions, package versions, installation commands and dependency versions are not specified.
Model judges require access to a compatible model; credentials and provider configuration are not demonstrated. The page lists openai:gpt-5.2 as the default for LLMJudge and GEval. HasMatchingSpan explicitly requires the logfire SDK to be configured, but does not require a Pydantic Logfire account.
mechanism
Case evaluators inspect task results and associated context. Equality checks use Python’s == operator. Contains can optionally convert values to strings or ignore string case. IsInstance matches __name__ or __qualname__ across the type’s method resolution order; this is a type-name check, not validation of individual data fields.
LLMJudge evaluates against a rubric. Inputs and expected outputs are excluded from its prompt by default and must be included explicitly when needed. GEval uses supplied criteria, evaluation steps and an inclusive integer score range.
HasMatchingSpan returns true when at least one span matches. Report evaluators analyze experiment results and are supplied through Dataset’s separate report_evaluators parameter.
setup
The documented configuration pattern imports Case and Dataset from pydantic_evals, imports evaluator classes from pydantic_evals.evaluators, creates cases, and passes evaluator instances through Dataset’s evaluators parameter.
Choose comparison values, timing thresholds and judge rubrics explicitly. Enable include_input or include_expected_output when a model judge needs that context. Configure the logfire SDK before using span checks. The page does not show package installation, task invocation or evaluation-report execution.
example
The equality example defines Case(name='addition', inputs='2 + 2', expected_output='4') and attaches EqualsExpected() to a Dataset. Under the documented comparison, an output equal to the string '4' matches the reference; the string '14', the list ['4'], and the integer 4 do not. The example was not executed.
For an expected null result, Equals(value=None) creates an explicit comparison. Setting expected_output=None with EqualsExpected instead produces an empty result and contributes no assertion. For semantic comparison with a reference answer, the page demonstrates LLMJudge with both include_input=True and include_expected_output=True.
Assessment & evidence
limitations
EqualsExpected skips evaluation when expected_output is None. Contains returns a positive result when it finds a value, so a search for prohibited content needs additional logic to make presence a failure. Similarly, HasMatchingSpan configured to find errors returns true when an error exists.
MaxDuration passes when recorded duration is less than or equal to the threshold. Cancellation and timeout enforcement are not documented. The combined-evaluator example claims expensive judges run only after basic checks pass, but supplies no gating logic or execution evidence; ordering alone should not be assumed to provide that behavior.
Judge accuracy, consistency and resistance to misleading evaluated content are not established. For GEval with a model that cannot generate text, the page says the reason is None and the scale may contain at most 20 levels. No measured latency, reliability or benchmark results are provided.
reasoning
Choose checks according to the requirement being assessed. Equality suits stable reference answers; containment checks required content; type checks establish the output’s type name; duration checks assess recorded timing. These checks answer narrower questions than whether an answer is correct or useful.
Use LLMJudge when the requirement can be expressed as a rubric, and GEval when explicit evaluation steps and an integer scale fit the task. Use span queries when internal actions matter. An explanation from a model judge describes its assessment; this page supplies no evidence that the explanation or score is independently correct.
alternatives
Within the documented options, Equals supports an explicit comparison value, including None, while EqualsExpected takes its reference from each case. LLMJudge provides boolean or fractional scoring, while GEval provides a configured integer scale. Case evaluators assess individual results; report evaluators summarize experiments.
The page links to custom evaluators for requirements beyond the supplied checks. Their implementation details are outside this page. No competing evaluation libraries are described, so comparative cost, usability and accuracy are unknown.
evidence
The evidence is the complete Native Evaluators documentation page at [https://pydantic.dev/docs/ai/evals/evaluators/built-in/index.md], preserved as selected-page.txt. Its parameter definitions, examples, notes and tables support descriptions of intended behavior.
Linked API references and deeper guides are outside the available evidence. Documentation claims are not runtime results: nothing was installed or executed, and no judge outputs, traces or experiment reports were observed.
Access & freshness
costs
The quick reference labels deterministic checks, span checks and the listed report checks as free. It marks LLMJudge and GEval with '$$' and describes them as slow. These are qualitative labels, not prices or measured performance results.
Exact judge costs, token usage, provider rates and total evaluation costs are unknown. Task execution, computing resources and telemetry costs are not quantified. The stated absence of a Logfire account requirement does not establish pricing for other telemetry services.
rights
The supplied page contains no license or reuse terms for the documentation, code examples or underlying library. Commercial-use, modification and redistribution rights cannot be established from this evidence. No repository license or separate legal terms are included.
freshness
The page snapshot was captured on 26 November 2026 at 11:40:49 UTC. It supplies no publication date, package version or revision history that ties these APIs to a particular release.
The named model defaults and evaluator signatures describe that snapshot. Their availability and compatibility with an installed package or model provider remain unverified.
actions
Begin with representative cases and explicit requirements. Handle expected None values deliberately, and check whether a positive containment or span result means success or an unwanted condition. Specify judge context and output modes instead of assuming references are included.
Before adopting the examples, establish installation and execution instructions for the package version in use. Verify whether evaluator failures actually gate later judges, measure judge costs on representative cases, and compare judgments with human assessments. Consult the linked span and report guides when those features are needed; their full configuration is not supplied here.
