madewithlaya

Catalog / Multilingual

0105GitHub

Does a typed-judgment model rerank Finnish legal passages better than a cross-encoder?

Postgres FTS, pgvector and RRF first stage; Jev, Voyage, GPT-4.1-mini, GPT-5.6-luna and open-weight Laya as rerankers on two Finnish legal corpora. Recall, MRR, nDCG, latency.

Open source ↗ github.comcost$/1000 queries reported per rerankertime-
laguagu/jev-rerank-benchREADME ↗
# jev-rerank-bench

Does reranking with a **typed-judgment model** beat a dedicated cross-encoder?

The picture is the problem. A corpus of Finnish collective agreements contains
hundreds of documents that repeat each other section for section, so
"32 § Ikääntyneiden työntekijöiden työajan lyhentäminen" exists, nearly word for
word, in dozens of them. The passage text does not identify the right answer —
the document it belongs to does. A bi-encoder embedding cannot see that
distinction, because it never sees the query and the passage at the same time.

That is what a reranker is for. This repository measures whether
[TypeSafe Jev](https://docs.typesafe.ai) — which returns a calibrated
probability instead of generated text — does it better than the alternatives, on
two Finnish legal corpora, over the same shortlists, with the same question.

## What it measures

| | |
| --- | --- |
| **First stage** | Postgres FTS (`ts_rank_cd`, `finnish`), pgvector HNSW, and RRF of both |
| **Rerankers** | Jev (noul / score / batched / cascade), Voyage `rerank-2.5`, `gpt-4.1-mini` via logprobs, `gpt-5.6-luna` graded, [Laya](https://github.com/NandhaKishorM/laya) open weights |
| **Metrics** | Recall@1/3/5/10, MRR@10, nDCG@10, shortlist ceiling, latency, \$/1000 queries, abstention curve |
| **Corpora** | `mupler` — [MuPLeR-fi](https://huggingface.co/datasets/mteb/MuPLeR-retrieval), 10 000 EU legal passages, 200 queries, EUPL-1.2, reproducible by anyone. `fi-tes` — 160 Finnish collective agreements and statutes, 37 440 chunks, 84 verified questions with section-level ground truth; not redistributable, so the code path is here and the documents are not. |

Every reranker receives the **identical shortlist**, and every model is asked the
**identical question** — 

Also filed under Multilingual

  1. 0115

    Laya fine-tuned for Burmese topic classification on SIB-200

    A Myanmar-language Laya checkpoint trained on Davlan/sib200, with a Gradio demo space from the same author.

    aungthuhein-dev · Multilingual · free

  2. 0114

    laya-ara: Laya fine-tuned for Arabic NLU on MASSIVE and XNLI

    An Arabic Laya checkpoint trained on AmazonScience/massive and facebook/xnli, with a companion laya-ara-rag ranking model from the same author.

    Wouze · Multilingual · free

  3. 0111

    Laya multilingual in LiteRT for Android and on-device

    Google's LiteRT community conversion of the multilingual checkpoint (tflite), tagged for Android text classification. An English LiteRT build is published alongside it.

    litert-community · Multilingual · free, on-device

  4. 0109

    Feishu message classification bench: Jev 64/64, Laya 20/64 on 64 frozen scenarios

    Synthetic Chinese workplace-chat scenarios with frozen inputs, prompts and labels. Reports classification quality, mis-generated tasks and latency: Jev 253 ms vs Laya 151 ms.

    Feng · Multilingual · 151 ms (Laya) vs 253 ms (Jev)