Learning resourcesReviewed · Pydantic

Pydantic Evals: Multi-Run Evaluation

Multi-Run Evaluation is a Pydantic Evals guide for Python developers measuring variation in AI tasks, but its examples use a deterministic function. It explains the repeat parameter, grouping runs by their original case and calculating averages that give each original case equal weight.

Researched 15 Nov 2026

In short.

Multi-Run Evaluation is a practical guide for Python developers repeating AI evaluations, but it does not demonstrate variability with a real model. It documents repeat on evaluate() and evaluate_sync(), individual run naming, grouped results and two-level averaging. It is useful for understanding these APIs; statistical uncertainty, suitable repeat counts, costs and package compatibility are not established. No examples were executed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage is limited to the complete selected page at [https://pydantic.dev/docs/ai/evals/how-to/multi-run/index.md], including its examples and introductory documentation-index and query-parameter notices. Linked documentation indexes, API references, concurrency, metrics and Logfire pages are excluded. Package installation, release compatibility, model behavior and runtime results were not assessed. Nothing was executed.

The overview

Identity

This is a focused Pydantic Evals documentation guide at [https://pydantic.dev/docs/ai/evals/how-to/multi-run/index.md]. It teaches repeated evaluation of dataset cases through Python examples using pydantic_evals. The resource is the guide itself; it does not provide a standalone evaluation application.

Assessment

The guide is useful when one result per input is insufficient to understand an AI task's behavior. Its strongest contribution is explaining how repeated runs remain individually accessible while being summarized by original case.

It establishes how the documented APIs organize results, but does not establish how many repetitions produce a reliable estimate for a particular task. Its examples demonstrate API mechanics rather than measured improvements in AI reliability.

Users

The guide fits Python developers and evaluation engineers who already have a task function and a collection of evaluation inputs. Beginners need familiarity with imports, functions and dataset cases; experienced developers get details about grouping, exceptions and averaging.

It is particularly relevant when the same input can produce different outputs. Readers seeking model integration, evaluator design or an introduction to Python will need material beyond this page.

Capabilities

Both evaluate() and evaluate_sync() accept repeat. With repeat greater than one, runs receive indexed names such as greeting [1/5], while source_case_name preserves the original case name.

case_groups() exposes results organized by original case. Each ReportCaseGroup provides its name, individual runs, runs that raised exceptions and a summary containing aggregated scores, metrics, labels, assertions and durations.

Using it

Requirements

The examples require a Python environment where pydantic_evals is available, Case and Dataset objects, and a task function. The expected-output example additionally imports EqualsExpected from pydantic_evals.evaluators.

The page does not specify installation commands, supported Python versions, package versions, hardware requirements or provider credentials. Requirements for any real model called by a task are not established.

Mechanism

The repeat parameter runs each original case multiple times. Individual results remain available through report.cases, and case_groups() organizes them using the original case identity.

For repeat greater than one, averages() first averages runs within each case group and then averages the group summaries. The documentation says this gives each original case equal weight despite differing numbers of successful or failed runs. It does not specify how entirely failed groups or missing metrics are handled.

Setup

With pydantic_evals available, import Case and Dataset, create named cases, define a task function and pass repeat to dataset.evaluate_sync() or dataset.evaluate(). The guide demonstrates dataset.evaluate_sync(task, repeat=3).

For expected-output scoring, supply expected_output on each case and evaluators=[EqualsExpected()] on the dataset. Installation, asynchronous task implementation and model connection setup are outside the instructions supplied here.

Example

The basic example defines greeting and farewell cases, applies a task that returns inputs.upper(), and uses repeat=5. The documented result is ten report cases: two original cases multiplied by five repetitions.

A grouping example uses repeat=3 and shows two groups containing three runs each. A separate EqualsExpected example shows an overall assertion rate of 1.0 for uppercase transformations. These are examples and displayed outputs from the page; nothing was executed. The deterministic task does not illustrate varying model responses.

Assessment & evidence

Limitations

The page shows averages but does not demonstrate variance, confidence intervals, convergence checks or a method for choosing repeat counts. Repetition alone therefore does not establish a particular level of statistical confidence.

The examples contain no real model calls or demonstrated exception cases. Behavior for entirely failed groups, missing metric values and practical performance limits is not explained. Concurrency controls are linked but not described in this page.

Reasoning

An implication of the documented structure is that an overall mean should be read alongside individual groups and failures: an aggregate can conceal a weak case or intermittent errors.

Equal weighting gives each original case the same influence. That does not automatically represent production input frequency or business impact. Choosing representative cases and interpreting their importance remain separate evaluation decisions.

Alternatives

The documented simpler option is single-run evaluation: omit repeat or set repeat=1. In this mode, names have no repetition index, source_case_name is None and case_groups() returns None.

The page links to related guides for concurrency, custom metrics and Logfire visualization. These are complementary topics; their contents are outside the supplied evidence. No comparison with other evaluation libraries is provided.

Evidence

The evidence consists of the complete Pydantic-hosted Multi-Run Evaluation page, including Python examples, displayed outputs, API descriptions and links. It directly supports the documented parameter, grouping and aggregation behavior.

It supplies no independent benchmarks, production case studies or measured model variability. The displayed outputs are documentation examples, not results from an executed assessment.

Access & freshness

Costs

The basic example expands two cases into ten runs. This implies more task work than a single pass and can increase compute use or API charges if the task calls a paid model.

The page supplies no prices, token counts, billing rules or measured runtime comparisons. Actual monetary cost, execution time and the effect of concurrency are unknown.

Rights

The supplied page does not state a licence or explicit reuse and redistribution terms for its prose or examples. Those rights, and the underlying package's licence, are unknown from this page.

Freshness

The supplied page was captured on 15 November 2026 at 05:52:13.520 UTC. Its source snapshot is identified by SHA-256 ac52a9190eb0f9b8ee6126a6fdbcd6c4eaa3abd6c3412b24beffcb1b6a67ff42.

The page states no publication date, update date or compatible Pydantic Evals release. Compatibility with a particular installed version and changes after capture are unknown.

Actions

For an existing evaluation, add a modest repeat count and inspect report.case_groups(), each group's runs and failures, and report.averages(). Compare individual case behavior with the overall result before drawing conclusions.

Choose repetitions according to observed variation and available compute budget; the guide supplies no recommended count. Confirm package compatibility and consult the linked concurrency guide before increasing execution volume [https://pydantic.dev/docs/ai/evals/how-to/concurrency/]. That linked guide was not assessed.

Evidence for this report

selected-page.txtselected · checked 2026-11-15