File size: 9,467 Bytes
8a7dfdd bb73d74 8a7dfdd bb73d74 8a7dfdd bb73d74 8a7dfdd bb73d74 8a7dfdd bb73d74 8a7dfdd bb73d74 8a7dfdd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | ---
license: apache-2.0
language:
- pl
task_categories:
- text-classification
tags:
- benchmark
- decision-model
- legal
- administrative
- polish
pretty_name: jerzyk-bench
size_categories:
- n<1K
annotations_creators:
- machine-generated
language_creators:
- machine-generated
- found
multilinguality:
- monolingual
configs:
- config_name: sad
default: true
data_files:
- split: test
path: data/sad_test.jsonl
- split: validation
path: data/sad_dev.jsonl
- config_name: adm
data_files:
- split: test
path: data/adm_test.jsonl
- split: validation
path: data/adm_dev.jsonl
- config_name: ksieg
data_files:
- split: test
path: data/ksieg_test.jsonl
- split: validation
path: data/ksieg_dev.jsonl
- config_name: email
data_files:
- split: test
path: data/email_test.jsonl
- split: validation
path: data/email_dev.jsonl
- config_name: sad_real
data_files:
- split: test
path: data/sad_real_test.jsonl
- split: validation
path: data/sad_real_dev.jsonl
- config_name: sad_real_fragmenty
data_files:
- split: test
path: data/sad_real_fragmenty_test.jsonl
- config_name: adm_real
data_files:
- split: test
path: data/adm_real_test.jsonl
---
# jerzyk-bench
**A Polish benchmark for decision models (typed questions with calibrated answers) on incoming correspondence:** court letters, administrative notices, accounting documents and customer e-mails, plus real court rulings and real public notices.
> 🇵🇱 Polski benchmark modeli decyzyjnych dla korespondencji: pisma sądowe, urzędowe, księgowe i e-maile klientów, plus prawdziwe orzeczenia i obwieszczenia urzędów. Pytania: rodzaj pisma, czy biegnie termin, pilność, dział.
## Files
| File | Documents | Source | Labels |
|---|---|---|---|
| `sad_test`, `adm_test`, `ksieg_test` | 120 each | generated by Bielik 11B v3 from recipes | by construction, automatically checked |
| `email_test` | 120 | written by Claude (Anthropic) from recipes | by construction, rule-checked, rules from `SPEC.md` |
| `sad_dev`, `adm_dev`, `ksieg_dev`, `email_dev` | 30 each | as above | as above |
| `sad_real_test` | 89 | real court rulings, SAOS 2024–2026 (already anonymised) | document type from SAOS metadata |
| `sad_real_fragmenty_test` | 31 | SAOS texts that start mid-text, with no header | reported separately (type often undecidable) |
| `sad_real_dev` | 120 | SAOS 2025–2026, disjoint from test | document type from metadata |
| `adm_real_test` | 56 | real public notices from 10 offices (samorzad.gov.pl), de-duplicated by template, personal data replaced with `[OSOBA]`/`[ADRES]` | labelled by Claude following `SPEC.md`, checked by two blind re-labellings and adjudicated; not human-reviewed |
Each line: `id`, `domain`, `split`, `state` (document text), `questions` (typed questions in the TypeSafe Jev `systemone` format), `expected` (gold answers), `source` (where applicable), `author`, `labels` and `note`.
## Questions
- `rodzaj` / `dzial` / `kategoria_kosztu`: choice from a fixed list.
- `termin`: yes/no. Does a deadline for the recipient's action run?
- `pilnosc`: score 0–3, from the deadline length counted from the letter date: 0 nothing to do, 1 no deadline or > 14 days, 2 8–14 days, 3 ≤ 7 days or immediately. E-mails have their own scale: blocked customer = 2; damage, threat of court or "today" = 3.
- E-mail: `rezygnacja` (terminates service or account; a single-purchase return does not count), `zdenerwowany` (upset; a threat of court or media counts).
Every rule and every decision taken while building the set is listed in `docs/SPEC.md` in the code repository.
Configurations on the Hub: `sad`, `adm`, `ksieg`, `email` (generated; `test` and `validation` = dev), `sad_real` (`test`, `validation`), `sad_real_fragmenty`, `adm_real`. Domain codes: `sad` court, `adm` administrative, `ksieg` accounting, `email` customer e-mail.
```python
from datasets import load_dataset
ds = load_dataset("trenify/jerzyk-bench", "adm_real", split="test")
```
## Personal data
- **Real court rulings** come from SAOS, where parties are already anonymised. Before publication we also replaced names of judges, prosecutors and court clerks with `[SĘDZIA]`, `[OSOBA]` and `[PROTOKOLANT]` (`scripts/anonymize_rulings.py`).
- **Real public notices** are official documents published by the offices. Names and addresses of private persons were replaced with `[OSOBA]` and `[ADRES]`. Names of offices, their official contact details and parcel numbers were kept.
- **Generated documents** use invented names and companies. PESEL numbers, phone numbers and e-mail domains were masked.
- **Check before publication.** All 296 real documents were then read in full by two independent automated read-throughs (Claude Opus and Claude Sonnet) looking for remaining personal data; 11 leaks were found and masked (`MANUAL_FIXES` in `scripts/anonymize_rulings.py`). Names of authors of cited legal commentaries were kept, as published literature. This was not a manual human review.
- Anonymisation can still miss something. If you find personal data in this dataset, write to [contact@trenify.org](mailto:contact@trenify.org) with the document id (please do not quote it in public discussions), and we will remove it.
- **Data protection and copyright requests** (for example from a person a document concerns): [contact@trenify.org](mailto:contact@trenify.org).
## Metrics
Accuracy per question, mean over domains, ±1 accuracy and MAE for scores, Brier score for yes/no, ECE (15 bins), and latency. See `scripts/evaluate.py` in the repository. **Do not train on the test split.** Use dev for model selection and calibration.
## Results
**Generated test set (480 documents)** — accuracy (%)
| Question | **Jerzyk 1.0** (322M) | basal-2.0-mini (1.5B) | Qwen3 8B | Bielik 11B v3 |
|---|---|---|---|---|
| Administrative: urgency | 77.5 | 61.7 | 41.7 | 54.2 |
| Administrative: document_type | 90.0 | 93.3 | 90.8 | 95.0 |
| Administrative: deadline | 82.5 | 79.2 | 83.3 | 83.3 |
| Customer e-mail: department | 93.3 | 88.3 | 89.2 | 89.2 |
| Customer e-mail: urgency | 79.2 | 75.0 | 70.0 | 80.0 |
| Customer e-mail: cancellation | 99.2 | 100.0 | 97.5 | 96.7 |
| Customer e-mail: upset | 91.7 | 90.8 | 77.5 | 85.8 |
| Accounting: cost_category | 97.5 | 95.0 | 85.8 | 75.8 |
| Accounting: urgency | 64.2 | 35.8 | 45.8 | 62.5 |
| Accounting: document_type | 94.2 | 91.7 | 95.8 | 95.8 |
| Accounting: deadline | 85.8 | 95.8 | 93.3 | 76.7 |
| Court: urgency | 80.8 | 42.5 | 40.0 | 54.2 |
| Court: document_type | 84.2 | 96.7 | 94.2 | 92.5 |
| Court: deadline | 93.3 | 84.2 | 82.5 | 82.5 |
| **Mean over domains** | **86.4** | **80.2** | **77.0** | **79.9** |
**Real documents (89 court rulings + 56 administrative notices)** — accuracy (%), 95% confidence interval in brackets
| Question | **Jerzyk 1.0** (322M) | basal-2.0-mini (1.5B) | Qwen3 8B | Bielik 11B v3 |
|---|---|---|---|---|
| Admin. notices (real): urgency | 58.9 (46–71) | 32.1 (21–45) | 50.0 (37–63) | 30.4 (20–43) |
| Admin. notices (real): document_type | 85.7 (74–93) | 78.6 (66–87) | 83.9 (72–91) | 85.7 (74–93) |
| Admin. notices (real): deadline | 71.4 (58–82) | 75.0 (62–84) | 64.3 (51–76) | 78.6 (66–87) |
| Court rulings (real): document_type | 98.9 (94–100) | 94.4 (88–98) | 100.0 (96–100) | 100.0 (96–100) |
| **Mean over domains** | **85.5** | **78.1** | **83.0** | **82.5** |
| | **Jerzyk 1.0** (322M) | basal-2.0-mini (1.5B) | Qwen3 8B | Bielik 11B v3 |
|---|---|---|---|---|
| ECE, real documents (lower = better) | 0.106 | 0.112 | 0.191 | 0.154 |
| Median latency per document (NVIDIA GeForce RTX 5080 Laptop GPU) | 0.02 s | 1.13 s (Apple M1, MLX) | 0.24 s | 0.41 s |
Models compared: [Jerzyk 1.0](https://huggingface.co/trenify/jerzyk-1.0) (calibrated); [basal-2.0-mini](https://huggingface.co/Remek/basal-2.0-mini-MLX-8bit) (MLX 8-bit, native `/v1/systemone`); [Qwen3 8B](https://huggingface.co/Qwen/Qwen3-8B-GGUF) and [Bielik 11B v3.0 Instruct](https://huggingface.co/speakleash/Bielik-11B-v3.0-Instruct-GGUF) (GGUF Q4_K_M in llama.cpp, zero-shot, answer chosen from option log-probabilities). *Mean over domains* averages the questions of each domain first, then the domains, so every domain counts equally.
## Caveats
- The generated sets use recipes, so their language is cleaner than real mail. Report real and generated results separately.
- The test documents for court, administrative and accounting were written by Bielik 11B, which may favour Bielik slightly.
- Urgency and deadline conventions are those of `SPEC.md`. A model that has not seen them is evaluated zero-shot.
## About
Jerzyk and jerzyk-bench are published by **Fundacja Trenify** (Trenify Foundation), a Polish non-profit foundation. Issues and pull requests are welcome on [GitHub](https://github.com/Trenify-Org/jerzyk). Contact: [contact@trenify.org](mailto:contact@trenify.org) (also for security, personal-data and copyright reports).
## Citation
```bibtex
@misc{jerzykbench2026,
title = {jerzyk-bench: a Polish benchmark for decision models on official correspondence},
author = {{Fundacja Trenify}},
year = {2026},
howpublished = {\url{https://huggingface.co/datasets/trenify/jerzyk-bench}}
}
```
## License
Apache 2.0. Court rulings (SAOS) and public notices are official documents (art. 4 of the Polish Copyright Act). Generated documents use invented names and data.
|