Skip to main content

routeval

Evals for AI pipelines that route.

For pipelines with more than one path — a model cascade, an abstain, a human handoff, a cache — routeval replays your golden set through your real pipeline and tells you whether the routing earned its money: cost per correct decision, deflection quality, and the lucky hits your accuracy number is hiding.

Why not promptfoo or DeepEval? They score outputs. They can't tell you that 40 of your 184 wins took the wrong path to get there.

Status

Pre-v0.1 — planning complete, build in progress. The launch essay is the spec; the run.json schema is the API.

The contract (all of it)

You write one function. It returns an answer, the route it took, and what it cost (or model + tokens, and routeval prices it). You point the harness at a JSONL golden set of {input, expected} — optionally with expected_route. You get a terminal report, a versioned run.json, and CI exit codes.

Metrics are tiered by what you've labelled:

Tier Needs You get
1 expected answers only per-route accuracy/cost/latency, cost-per-correct-decision, deflection rate, error accounting
2 + expected_route labels routing 2×2, lucky-hit rate, escalation precision/recall
3 (v0.2) nothing — spends budget counterfactual routing: force-run sampled items down the other path, measure what it buys

Errors are never swallowed: accuracy is computed over attempted items, and failures are listed. (If your pipeline crashed on 10% of the golden set, that's a result, not an inconvenience.)

Hello world (zero API keys)

pip install routeval
routeval init      # scaffolds a toy two-route pipeline + 20-item golden set
routeval run       # full routing-economics report, no keys required

What this is not

Not a framework. Not a judge. Not a dashboard. Not hosted. It composes with pytest, promptfoo, and whatever judge you already trust.

MIT. Extracted from Quorum, where these metrics killed a threshold-tuning project in one afternoon (22% lucky-hit rate, a flat cost-quality frontier, and a 0.44-accurate escalation stage that no threshold could fix).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

routeval-0.0.1.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

routeval-0.0.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file routeval-0.0.1.tar.gz.

File metadata

  • Download URL: routeval-0.0.1.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.4

File hashes

Hashes for routeval-0.0.1.tar.gz
Algorithm Hash digest
SHA256 dde4d1c2860f2662d144c8176266bbd584844587a272824a65270905a5ac3421
MD5 2ed022090eaf7ab90e16142b84b32749
BLAKE2b-256 b2a581ad0027d427c12079239944566034e09c4f69dc3d1f07f21bc73de98f9a

See more details on using hashes here.

File details

Details for the file routeval-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: routeval-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.4

File hashes

Hashes for routeval-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b2168344670c0c1a671bf5ec5c247a2975cf1fd01c3d0c00f8a83f2d6543f409
MD5 eef64c0e07c7b8c1e5e876ee6e69ba6e
BLAKE2b-256 2ef4b64c5764f829d8ce07a212424c7ed3ce8ecae4289fbfb16dbea15b34ae0d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page