--- 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 | 42.5 | 54.2 | | Administrative: document_type | 90.0 | 92.5 | 90.8 | 95.0 | | Administrative: deadline | 82.5 | 79.2 | 84.2 | 83.3 | | Customer e-mail: department | 93.3 | 88.3 | 89.2 | 88.3 | | Customer e-mail: urgency | 79.2 | 74.2 | 70.8 | 80.8 | | Customer e-mail: cancellation | 99.2 | 100.0 | 97.5 | 96.7 | | Customer e-mail: upset | 91.7 | 90.8 | 77.5 | 85.0 | | Accounting: cost_category | 97.5 | 95.0 | 85.0 | 75.8 | | Accounting: urgency | 64.2 | 35.8 | 48.3 | 63.3 | | Accounting: document_type | 94.2 | 91.7 | 95.8 | 95.8 | | Accounting: deadline | 85.8 | 95.8 | 94.2 | 77.5 | | Court: urgency | 80.0 | 42.5 | 38.3 | 54.2 | | Court: document_type | 84.2 | 96.7 | 94.2 | 92.5 | | Court: deadline | 93.3 | 85.0 | 83.3 | 82.5 | | **Mean over domains** | **86.4** | **80.1** | **77.3** | **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) | 37.5 (26–51) | 48.2 (36–61) | 32.1 (21–45) | | Admin. notices (real): document_type | 85.7 (74–93) | 76.8 (64–86) | 83.9 (72–91) | 85.7 (74–93) | | Admin. notices (real): deadline | 73.2 (60–83) | 76.8 (64–86) | 62.5 (49–74) | 82.1 (70–90) | | Court rulings (real): document_type | 98.9 (94–100) | 93.3 (86–97) | 100.0 (96–100) | 100.0 (96–100) | | **Mean over domains** | **85.8** | **78.5** | **82.4** | **83.3** | | | **Jerzyk 1.0** (322M) | basal-2.0-mini (1.5B) | Qwen3 8B | Bielik 11B v3 | |---|---|---|---|---| | ECE, real documents (lower = better) | 0.104 | 0.127 | 0.197 | 0.142 | | Median latency per document (all models on the same computer) | 0.05 s | 0.28 s | 1.75 s | 3.01 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. > **Note.** These results were measured on the benchmark text before anonymisation of the real documents (names of judges, officials and private persons replaced with placeholders such as `[SĘDZIA]` and `[OSOBA]`). On the published, anonymised text Jerzyk 1.0 scores 85.5% instead of 85.8% on real documents. The other models will be re-measured on the published text in a later update. ## 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.