TypeSafe’s reranking cookbook asks Jev whether a court passage supports the specific legal proposition surrounding a missing citation. BM25, a keyword-based search method, first builds a shortlist. Jev scores each candidate, and code sorts the scores.
Find broadly, then ask a precise question
- The vendor example uses 40 queries against 3,565 court-opinion passages pooled from CLERC, a legal retrieval dataset.
- BM25 supplies 30 candidates per query. In TypeSafe’s saved example, every shortlist includes the labeled source passage.
- A
Noul, Jev’s yes/no probability answer, scores each query–candidate pair. The criteria distinguish supporting the cited proposition from merely discussing a similar topic. - The implementation makes 1,200 separate scoring calls with a thread pool. Its model is pinned to
jev-1.14.0.
The saved answers reproduce the ranking improvement
A local replay rebuilt BM25 rankings and sorted TypeSafe’s cached scores. It recovered these counts:
| Labeled passage appears in | BM25 alone | After Jev reranking |
|---|---|---|
| First place | 2 of 40 | 12 of 40 |
| First five | 6 of 40 | 23 of 40 |
| First ten | 15 of 40 | 26 of 40 |
Those first-place counts match the vendor’s 5% → 30% headline. Network access and the model-call method were blocked during replay. This checks the published evidence’s internal consistency; fresh Jev inference and performance were not reproduced.
Retrieval still sets the ceiling
Reranking can only reorder retrieved candidates. The example’s complete shortlist coverage makes it a favorable test of the second stage; a passage missed by first-stage search remains missing.
The typed probability gives code a sortable value. Correct source selection still needs labeled checks, and these ranking counts do not establish probability calibration. The cookbook also provides no measured comparison with a specialist reranker or an end-to-end speed or cost result.
Verification: read the full cookbook and its implementation at 02060f5; replayed all saved scoring pairs locally. The exercise covers one small vendor-selected dataset slice.