Skip to main content

3tears-evals

Evals for LLM features, from a classifier to a tool-using agent: it runs each version over the same cases and says what moved, with the uncertainty that says whether the move is real. Python 3.14+.

pip install 3tears-evals

Rung 0 is one TOML file and no Python. examples/1-triage/triage.toml triages 30 support emails, each with the triage a person gave it, three times each:

# Rung 0, no Python: python -m threetears.evals triage.toml
cases = "emails.jsonl"
grader = ["category", "urgent", "needs_human"]
recording = "recordings/triage-toml.jsonl"
k = 3

[runner]
model = "deepseek/deepseek-v4-flash"
prompt = "Triage this support email:\n\n{email}"

[runner.output]
category = ["billing", "bug", "account", "sales", "spam"]
urgent = "bool"
needs_human = "bool"

python -m threetears.evals examples/1-triage/triage.toml replays the recorded model, offline and free, and its first line says how it went:

triage: 16/30 cases passed; 14 misses: gdpr-delete, nonprofit, phish-suspend, phish-invoice, crash-at-checkout, and 9 more

Below it come each field's pass rate, each category label's precision and recall, the top misses with why each missed, and where its report page is. Then climb the ladder, one idea per rung:

Rung Example Climb it when
1 1-triage/triage.py Point it at your own function: 15 lines of Python.
2 2-replies/ When no code can grade the answer, let a model judge it, and check the judge against a person.
3 3-invoices/ Changing a prompt? Compare it against the current one, and get a report you can hand to a reviewer.
4 4-booking/ Is your agent doing the right thing to the world, not only saying it? Then serve your evals to the team.

Where the science lives:

Wiring it into your app (your store, your launcher, your world): Adopting the engine.

Install

pip install 3tears-evals is the base install. The FastMCP transport, for serving evals to an agent, is the [fastmcp] extra:

pip install "3tears-evals[fastmcp]"

To install a pre-release or an unreleased checkout, install from the repository at a tag instead:

pip install "3tears-evals @ git+https://github.com/pacepace/3tears.git@<tag>#subdirectory=packages/evals"

In a checkout of this repo, uv sync at the root does it, and the commands above run from packages/evals with uv run in front. threetears.evals.__version__ says which version is installed. The completion client (Model) is on the base install: it speaks each provider's HTTP API over httpx, with no SDK and no other 3tears package. The examples run on cheap models through OpenRouter (OPENROUTER_API_KEY); Model(id, provider="anthropic") (ANTHROPIC_API_KEY) and provider="openai" (OPENAI_API_KEY) are options, and base_url= takes any OpenAI-compatible endpoint. After a pip install, fetch the examples from the repository first (how).

The public API is still changing. From 0.70.0 only its host contract is promised: a name on it moves with a deprecation cycle, and any other declared name may change in any release, recorded in MIGRATIONS.toml. About 520 names are declared, mapped by rung; the rest a root exports are provisional (stability tiers).

What is different

  • A verdict, not a mean. Every version is run over the same frozen cases and tested case by case against a control, and evidence that cannot tell two versions apart says "not separated", never "no difference" (why).
  • Guardrails apart from capability. What a version must never do is decided on its own, so a gain cannot pay for a breach (why).
  • A judge is measured, not trusted. Every judged reading carries the evidence tier its judge's agreement with people and with itself reached (how).
  • An agent is graded on the world it leaves, a world your app declares, with checks proven to beat doing nothing and a conformance kit your app runs against its own world (what is new).

Docs

These links are relative to the package, so on GitHub each opens the page at the ref you are reading; on PyPI, where this README is the package's description, they do not resolve, so read the docs in the repository at your tag.

Climb

  • Building an inventory: what to test before a line of code, ending in rung 0; then which cases a classifier needs, and how many.
  • The ladder: rungs 1 to 4, through the four examples.
  • Concepts: the six concepts, and the glossary of every other word.

Go deeper

Background and reference

  • Design: the principles the engine keeps, why each concept is shaped as it is, and the prior art.
  • Open problems: known gaps.
  • The surface: the declared names on one page, by rung.
  • Reference: every declared name, setting, report field, goal-check builtin and action, generated from the code.

For experts

Capability API Doc Example
World contract World(State, tools=[...]), each case's world key, expression graders; on a host, WorldRegistry Evaluating a tool-using agent 4-booking/
World conformance kit check_world_conformance (threetears.evals.kernel.host) Step 5
Guardrails, decided apart from capability grader(fn, guard=...), Judge(guard={dim: ...}), Result.guardrails(); on a host, MetricDescriptor(guardrail=True), RubricDim(axis="boundary") Reading the guardrails 3-invoices/
Equivalence, the only verdict that says "good enough" grader("label", margin=0.05), grader(fn, margin=...), grader(rating, range=(1, 5)); on a host, MetricDescriptor.materiality_threshold and value_range Reading a comparison 3-invoices/
Typed verdicts and a CI gate Result.verdicts(), Result.gate(), python -m threetears.evals gate --fail-on regressed,breached gate 3-invoices/
Grids of factors arms named as k=v pairs ("prompt=v2, effort=low"), Result.against Start from the question 3-invoices/
Campaigns: one question over aspects, with floors that warn create_campaign (question, arms, aspects, floors, aspects_from), add_runs_to_campaign, set_campaign_control, exploratory Declare the campaign
One page per campaign, read by its kind (measurement, choice, change) campaign_report, Result.page, CampaignReport.write, campaign_readings The campaign's first screen 3-invoices/
A person's call, recorded against code's readings campaign_record (floors_overridden, bars_overridden) Recording the call
Cost against quality Answer, max_cost_usd=, the frontier Cost and budgets, the frontier
Judge calibration and evidence tiers Judge(labels=...), rate_result, judge_agreement, JudgeEvidenceTier Judges and calibration 2-replies/
Analysis written by a model over frozen evidence generate_analysis Having a model write the analysis llm_analysis.py
Cassettes World(tools=[...], recording=...); on a host, cassette_mode="capture" / "replay" Step 4, on a host
MCP threetears.evals.actions, mount_fastmcp (extra fastmcp) Serving 4-booking/serve.py
Keeping runs Eval(...).run(store=path) (by default .evals/evals.sqlite); any DocumentStore, proven with STORE_CONFORMANCE_CASES Keep your runs, the store
A complete host EvalHost, HostProfile, CandidateKind Adopting the engine courierhost, then toyhost

Import only from the public roots the reference lists: a module below a root is internal and may move. A public name that leaves a root is recorded with its new home in each release's notes (Upgrading: names that move).

Metadata

Release files for 3tears-evals 0.74.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for 3tears-evals 0.74.0
File Size Uploaded Provenance
3tears_evals-0.74.0.tar.gz 4.6 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for 3tears-evals 0.74.0
File Interpreter ABI Platform
3tears_evals-0.74.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.1 MB

Release files / 3tears_evals-0.74.0.tar.gz

Download URL 3tears_evals-0.74.0.tar.gz
Size 4.6 MB
Tags Source
SHA-256 checksum
How to use checksums
ba26928156e5da8c5c73d8aaceb56da186b136a65398dbc716510f3815fa69b5
BLAKE2b-256 checksum
How to use checksums
6053b48049b3f7339db62ad35f9f73b5a8392e089d964a1fe678f39486172649
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / 3tears_evals-0.74.0-py3-none-any.whl

Download URL 3tears_evals-0.74.0-py3-none-any.whl
Size 2.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e0711c8a1db7dfd38caed1c63c05a599ca1855bd1a7de8fc7835e6b107268f6e
BLAKE2b-256 checksum
How to use checksums
26a6b6de9dd73cf25ea8899e71c03271b71c2745bd0d53fd61c260c5083ef639
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for 3tears-evals 0.74.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for 3tears_evals-0.74.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page