BelegBench
🇨🇭 CH · 🇩🇪 DE · 🇦🇹 AT — Belege in DE / FR / IT
BelegBench ist der Benchmark hinter Belegant — der On-Prem Beleg-AI für den DACH-Raum. Von den Machern von German-OCR.
Benchmark für die Extraktion von Rechnungen, Gutschriften und Kleinbetragsbelegen aus der Schweiz, Deutschland und Österreich — 100 % synthetisch, mit vollständiger Ground Truth, prüfsummen-korrekten Kennungen (IBAN, QR-Referenz, RF, CHE-UID, USt-IdNr., ATU) und echten, scannbaren QR-Codes (Swiss QR bzw. EPC-QR/GiroCode).
Datensatz: huggingface.co/datasets/keyvan-ai/belegbench
— Configs ch, de, at (v2, 3 × 3 334 = 10 002 Belege) und ch-v1 (300 Belege, v1-Referenz).
Warum
Bisher gab es kein öffentliches Benchmark für Belege mit den Spezifika aller drei Länder — QR-IBAN und QR-Referenz (CH), § 14 UStG-Pflichtangaben, Steuernummer-Landesformate und § 13b (DE), § 11 UStG, UID-Pflicht über 10 000 € und 13 %-Satz (AT) — und vor allem keines, das misst, was für Treuhänder und Steuerberater zählt: die Halluzinationsrate. Die Ground Truth enthält nur, was auf dem Beleg gedruckt ist; jedes „ergänzte" Feld ist eine Halluzination.
Benchmark laufen lassen
pip install belegbench
# HF-Datensatz, Config de, 300 Belege, Belegant-Pipeline (Schema + QR-Oracle + Verifier)
python -m belegbench.run_eval --model belegant-4b --base-url http://localhost:11434/v1 --config de --n 300 --mode verified
# rohes Basismodell, Config ch
python -m belegbench.run_eval --model qwen3.5:4b --config ch --n 300 --mode raw
Modi: raw (Prompt + freies JSON) · schema (Constrained Decoding mit striktem JSON-Schema) ·
verified (Schema + QR-Oracle-Merge + deterministischer Verifier = Belegant-Pipeline).
Metriken (belegbench/metrics.py): Field-Level Exact Match, Halluzinationsrate, Verify-Catch-Rate,
Parse-Fehler, Latenz — gesamt und je Feld. Ergebnisse landen als JSON in belegbench/results/.
Ergebnisse
v2 (CH / DE / AT, je n = 100, Modus verified)
| Modell | Modus | Config | n | Field-EM | Halluzinationsrate | Parse-Fehler |
|---|---|---|---|---|---|---|
| German-OCR-3-8 | verified | ch | 97 | 95.8 % | 6.7 % | 0/97 |
| German-OCR-3-8 | verified | de | 100 | 95.5 % | 4.7 % | 0/100 |
| German-OCR-3-8 | verified | at | 100 | 95.3 % | 5.0 % | 0/100 |
Je Feld (Field-EM, Auszug):
| Feld | AT | CH | DE |
|---|---|---|---|
invoice_number |
99 % | 99 % | 99 % |
invoice_date |
99 % | 99 % | 99 % |
total |
98 % | 98 % | 100 % |
creditor_iban |
98 % | 98 % | 97 % |
supplier_vat_uid |
93 % | 93 % | 92 % |
due_date |
81 % | 77 % | 81 % |
line_item_count |
100 % | 99 % | 100 % |
vat_rates |
98 % | 96 % | 99 % |
payment_reference |
96 % | – | 98 % |
customer_number |
96 % | 91 % | 94 % |
v1 (CH, n = 300, fairer 4B-Vergleich — Config ch-v1)
| Modell | Field-EM | Halluzinationsrate | Parse-Fehler |
|---|---|---|---|
| Belegant-4B | 84.7 % | 0.0 % | 3/300 |
| Qwen3.5-4B (roh) | 75.8 % | 1.2 % | 15/100 |
| gemma3:4b (roh) | 16.5 % | 15.9 % | 76/100 |
Trilingual: FR 81.4 %, IT 83.0 %. Viral-Grafik: belegbench/viral_table.html.
Paket
belegbench/schema.py— Extraktionsschema (35 Felder, pydantic) + striktes JSON-Schema für Constrained Decodingbelegbench/checks.py— deterministische Prüfungen (IBAN mod-97, QRR, RF/ISO 11649, CHE-UID, DE USt-IdNr., ATU), QR-Oracle-Parser (SPC/EPC), Verifierbelegbench/metrics.py— Field-EM / Halluzinationsrate / Verify-Catch-Ratebelegbench/run_eval.py— Eval-Harness (OpenAI-kompatible Endpoints, Ollama, vLLM, llama.cpp)
Lizenz
Apache-2.0 · von den Machern von German-OCR
Metadata
Release files for belegbench 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| belegbench-0.2.0.tar.gz | 18.3 kB | With provenance | Details for belegbench-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| belegbench-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for belegbench-0.2.0-py3-none-any.whl |
Total release size: 36.8 kB
Release files / belegbench-0.2.0.tar.gz
| Download URL | belegbench-0.2.0.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f8d907c8cc6146e5cb046b074a15c7725b7d1465a7c468777f3475ef7c75ce3
|
|
BLAKE2b-256 checksum How to use checksums |
47be6faa7c2c51143b0cbdf282ea8af415fc7a1ea077997955a735a92dc078c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.
Transparency logRelease files / belegbench-0.2.0-py3-none-any.whl
| Download URL | belegbench-0.2.0-py3-none-any.whl |
|---|---|
| Size | 18.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
09a2582d6dd089d9da2fe5282d317fdceb099080df09427cfc03068c039e0dfc
|
|
BLAKE2b-256 checksum How to use checksums |
4d2750e1041a33cc93c2333fdf9faa763f74cd3df8367b6a0d8565d42752faf8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.
Transparency logSecurity for belegbench 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for belegbench-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.