Learning resourcesReviewed · Pydantic

Pydantic Evals Third-Party Integrations

This Pydantic Evals guide helps Python developers reuse Ragas and DeepEval scoring metrics, with extra dependencies and LLM calls to manage. It demonstrates an asynchronous Ragas Faithfulness adapter and a synchronous DeepEval GEval adapter built on the Evaluator base class.

Researched 26 Nov 2026

In short.

Pydantic Evals’ Third-Party Integrations is a guide for Python developers adding Ragas or DeepEval metrics to evaluation datasets, with separate package installations and additional LLM usage required. Its examples translate evaluation inputs and outputs into upstream metric objects, then return scores, explanations and pass/fail results through Pydantic Evals. The page recommends native evaluators when they cover the task and external adapters when a specific upstream implementation matters. It does not establish supported package versions, complete judge configuration or monetary costs. 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/framework-integrations/index.md]: its integration pattern, both adapters, dataset example and dependency notes. The page also contains a documentation-index link and request-query-parameter notice; these provide no evidence of adapter behavior. All linked pages, repositories and upstream documentation are excluded. No code was executed, and installation, runtime behavior, package compatibility, provider configuration and pricing remain unverified.

The overview

Identity

Third-Party Integrations is a Pydantic Evals documentation guide at [https://pydantic.dev/docs/ai/evals/evaluators/framework-integrations/index.md]. It teaches developers to wrap external scoring libraries with Pydantic Evals’ Evaluator interface.

The resource consists of explanatory guidance and Python examples for Ragas and DeepEval. These libraries are optional additions rather than dependencies installed with pydantic-evals.

Assessment

The guide is useful when a team already uses Ragas or DeepEval and wants those metrics in Pydantic Evals reports. Its compact adapters make the data mapping visible, including how retrieved context, generated answers and expected answers reach the upstream library.

It is a focused integration guide, not a complete evaluation project. The examples leave model configuration and other project settings to the developer, and the supplied evidence contains no execution results or compatibility verification.

Users

The intended readers are Python developers evaluating LLM applications, especially teams maintaining an existing scoring suite or comparing against work that uses a particular upstream metric.

The Ragas example is relevant to applications that answer using retrieved documents: it passes those documents to a faithfulness metric alongside the answer. Beginners will need familiarity with Python classes, dataclasses and asynchronous functions to adapt both examples.

Capabilities

The Ragas adapter wraps Faithfulness for a SingleTurnSample and returns a numeric score with an explanation. The DeepEval adapter wraps GEval with configurable metric name, criteria and threshold, returning a named score and pass/fail value.

The page says external and native evaluators can coexist in one dataset. It also describes extending the pattern to other metrics, including answer relevancy, context precision and hallucination metrics, but does not provide complete adapters for each.

Using it

Requirements

The examples assume a Python environment with pydantic_evals available. Ragas and DeepEval must be installed separately; neither is included with pydantic-evals or provided through one of its dependency groups.

The shown Ragas adapter expects retrieved context in case metadata under context by default. DeepEval requires a metric name and judging criteria, while its wrapper defaults the threshold to 0.5. The page does not specify Python versions, compatible package versions, model providers, credentials or complete judge setup.

Mechanism

Each adapter subclasses Evaluator and reads an EvaluatorContext containing inputs, output, expected output and metadata. It converts the relevant fields into the upstream library’s format, invokes that metric and returns values Pydantic Evals accepts: numbers, booleans, EvaluationReason objects or dictionaries of these.

RagasFaithfulness reads metadata, converts a context string into a one-item list, constructs a SingleTurnSample and awaits single_turn_ascore. DeepEvalGEval constructs an LLMTestCase, calls measure synchronously and returns the score with its reason plus bool(metric.success). Both examples construct a metric inside each evaluate call.

Setup

The documented installation commands are pip install ragas and pip install deepeval; install the library needed for the chosen adapter. Define the corresponding Evaluator subclass and attach an instance to the dataset’s evaluators list.

For Ragas, populate metadata with retrieved passages and adjust context_field if needed. For DeepEval, supply metric_name and criteria and choose an appropriate threshold. Base Pydantic Evals installation, judge-model configuration and provider authentication are not explained on this page.

Example

The supplied dataset example is named rag_eval. It contains the question “What is the capital of France?”, metadata containing the passage “Paris is the capital of France.”, and RagasFaithfulness() in its evaluator list.

This demonstrates attaching context and an evaluator to a case. It does not include an answer-producing function, a dataset evaluation call or a resulting score, so it establishes no measured outcome for any answer.

Assessment & evidence

Limitations

Although the introductory Ragas text allows context in inputs or metadata, the shown implementation reads only metadata and defaults missing context to an empty list. Both adapters convert application inputs and outputs to strings, so structured data may require a more deliberate mapping.

The DeepEval example supplies expected_output to LLMTestCase but lists only INPUT and ACTUAL_OUTPUT in evaluation_params; reference-based judging is not demonstrated. Its conversion of metric.success to a boolean also requires compatibility verification against the chosen DeepEval version.

The DeepEval example is synchronous, while the Ragas example is asynchronous. The page supplies no measurements of concurrency, latency, reliability or scoring accuracy, and no supported version matrix.

Reasoning

The documented reason to use these adapters is access to a specific upstream implementation, such as maintaining parity with an existing evaluation suite or reproducing a published benchmark’s metric choice. That benefit must be weighed against additional dependencies and model configuration.

Reusing the metric implementation alone does not establish equivalent results: the adapters determine which data and settings reach it. The page provides no comparison showing that these wrappers reproduce scores from another evaluation setup.

Alternatives

The page recommends a native rubric-based LLMJudge or a custom Pydantic Evals evaluator when either covers the use case. It describes these options as simpler and requiring no additional scoring-framework dependencies.

Ragas and DeepEval are alternatives within the external-adapter approach, and their evaluators can be combined with native ones. The linked native-evaluator guidance and upstream documentation are outside the supplied evidence, so their detailed capabilities are not assessed here.

Evidence

The source is the complete Third-Party Integrations documentation page at [https://pydantic.dev/docs/ai/evals/evaluators/framework-integrations/index.md]. It contains two adapter implementations, a Ragas dataset example and notes about optional dependencies and LLM usage.

The findings describe the documentation and visible code. No code was executed, no package installation was attempted, and linked API references, repositories and documentation pages were not assessed.

Access & freshness

Costs

The page explicitly says Ragas and DeepEval make their own LLM calls, adding API usage when their evaluators run. This usage can be additional to calls made by the application being evaluated.

Provider choice, call counts, token consumption, prices and any service charges are unspecified. Monetary cost is unknown, and the page provides no basis for estimating a per-case or per-dataset total.

Rights

The supplied page contains no explicit license or reuse terms for its documentation or code examples. It also does not establish the licenses governing Pydantic Evals, Ragas or DeepEval.

Permission to copy, modify or redistribute the page or its examples is therefore unknown from this evidence. The installation instructions and linked repositories do not supply license terms within the selected page.

Freshness

The source capture is dated 26 November 2026 at 14:05:00.217 UTC. The page itself supplies no publication date, update date or package version pins.

It is unknown which released combinations of Pydantic Evals, Ragas and DeepEval support the illustrated imports and method calls. The capture date does not establish current compatibility.

Actions

First decide whether a specific upstream metric is necessary or whether a native evaluator covers the task. For an external adapter, identify compatible package versions and configure the metric’s judge model and credentials before evaluating a dataset.

For Ragas, supply retrieved passages through the metadata field read by the adapter. For DeepEval, verify the required test-case fields, evaluation parameters and pass/fail interface, particularly when judging against an expected answer. Before wider use, check a small set of known cases and measure actual API usage; the page supplies no expected scores or cost estimates.

Evidence for this report

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