Benchmarks/Routing

A TF-IDF router instead of an LLM call

Can a classic classifier route requests instead of an LLM?

0.628 msmedian latency per decision, $0

Short answer: TF-IDF plus logistic regression routed doc snippets into 5 categories in 0.628 ms per call at no API cost, with 0.600 accuracy against a 0.498 majority baseline. Its confidence tracked observed accuracy closely below 0.8.

Tested 27 September 2026 · Read the full write-up · small stand-in experiment inside an analysis post

Calibration: claimed confidence vs observed accuracy↑ higher is better
0.000.250.500.751.00score0.2-0.40.2-0.40.4-0.60.4-0.60.6-0.80.6-0.80.8-1.00.8-1.0mean confidence, 0.2-0.4: 0.363mean confidence, 0.4-0.6: 0.505mean confidence, 0.6-0.8: 0.698mean confidence, 0.8-1.0: 0.883observed accuracy, 0.2-0.4: 0.368observed accuracy, 0.4-0.6: 0.51observed accuracy, 0.6-0.8: 0.673observed accuracy, 0.8-1.0: 0.769
  • mean confidence
  • observed accuracy

What the numbers say

  • Good enough to gate or pre-route, not to replace a model on hard cases.
  • Above 0.8 confidence it was overconfident (0.883 claimed vs 0.769 observed).

Results

accuracy0.600
macro F10.427
majority-class baseline (always predict tutorial)0.498
median latency, transform + predict, single snippet0.628ms
cost$0 (local compute, no API call)

Calibration

0.2-0.4570.3630.368
0.4-0.62490.5050.510
0.6-0.82140.6980.673
0.8-1.01170.8830.769

Setup

Analysis post. Own experiment: TF-IDF (scikit-learn 1.9.1 TfidfVectorizer) + LogisticRegression, Python 3.12.14, on the FastAPI English docs corpus (130 of 151 files map to 5 section categories; 2,187 heading-paragraph snippets, 1,550 train / 637 test, split by file). Not tested: Jev itself. No TypeSafe or OpenRouter API key was available in this environment, so no call was made to `typesafe/jev-1.13` or any LLM JSON-mode baseline. Every Jev number below is vendor-reported or reported by a named third party, with a link.

Reproduce it

More benchmarks

All benchmarks →