Examples#

Six runnable examples: two score responses with a published detector, three train a detector of your own, and one scores live Langfuse traces. Installation is in Installation and the scikit-learn behaviour the notebooks rely on is in scikit-learn compatibility; the training workflow is in Training a detector.

Notebook

Shows

Needs

Score responses with EPR

EPR scoring at sequence and token level, against a published detector

Network, for the detector

Score responses with WEPR

WEPR with the risky spans highlighted token by token

Network, for the detector

Train a WEPR detector from answers that are already judged

Training a detector from answers that are already judged

Nothing: it runs on the shipped fixtures

Train a WEPR detector from unjudged answers, judged on your machine

Training from unjudged answers, graded by a local encoder judge

A ~420 MB judge download, once

Train a WEPR detector from an endpoint alone: generate, judge, fit

Training from an endpoint alone: generate, judge, fit

An endpoint returning top_logprobs, and its API key

Score Langfuse traces with a detector

Scoring live Langfuse traces through HallucinationEvaluator

[adapters], a logprobs-capable endpoint, a Langfuse project

Run one locally with uv sync --group notebooks, then uv run jupytext --to ipynb docs/examples/<name>.md; every page also offers its notebook as a download or in Colab. The pipeline and Langfuse notebooks need a live endpoint, so the build never runs them.