Skip to main content

Belegant

Belegant

🇨🇭 Schweiz · 🇩🇪 DE · 🇫🇷 FR · 🇮🇹 IT · 🇦🇹 AT

On-Prem Document-AI für Schweizer Belege & QR-Rechnungen — DE / FR / IT. Liest IBAN, Betrag, MWST und Positionen aus einem Beleg-Bild und prüft jedes Feld deterministisch mit der Prüfschicht belegant-verify. Läuft lokal beim Kunden, keine Cloud. Von den Machern von German-OCR.

Installation

pip install belegant

Lokaler Assistent

belegant serv --port 8700     # Web-Assistent auf http://127.0.0.1:8700

Beleg hochladen → strukturiertes JSON plus deterministische Prüfung: IBAN/QR-IBAN, QR-Referenz (Modulo-10 rekursiv), Creditor Reference (ISO 11649), MWST-Arithmetik (8.1 / 2.6 / 3.8 %), CHE-UID, Swico-S1 und ein QR-Oracle-Abgleich. Was einen Check nicht besteht, wird geflaggt — nie still ausgegeben.

CLI

belegant extract rechnung.png    # extrahierter, geprüfter Beleg als JSON

Modell-Backend

Belegant spricht Belegant-4B (multimodal, 4B) über Ollama oder vLLM an — OpenAI-kompatibel. Konfiguration über Umgebungsvariablen (siehe .env.example):

BELEGANT_BASE_URL=http://127.0.0.1:11434/v1
BELEGANT_MODEL=belegant-4b

Prinzip

LLM proposes, verifier disposes. Das Modell extrahiert, belegant-verify prüft jedes Feld gegen Prüfsummen, Arithmetik und den konventionell dekodierten QR-Code. Ergebnis: 0 % Halluzination auf validierten Feldern — lieber ein ehrliches null als eine erfundene IBAN.

BelegBench v1

Fairer 4B-Vergleich, n = 300, 100 % synthetisch, DE / FR / IT.

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: DE 84.7 % · FR 81.4 % · IT 83.0 % — je 0 % Halluzination.

Takeaway: +9 Punkte in der 4B-Klasse und als einziges Modell mit 0 % Halluzination (die Treuhänder-Metrik) — bei ~3 s pro Beleg, lokal, auf einem 4B.

Credits & Danksagung

Basiert auf Qwen3.5-4B von Alibaba Cloud · Qwen Team (Apache-2.0) — grosser Dank ans Qwen-Team.

Lizenz

Apache-2.0

Metadata

Release files for belegant 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for belegant 0.1.0
File Size Uploaded Provenance Actions
belegant-0.1.0.tar.gz 34.3 kB With provenance Details for belegant-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for belegant 0.1.0
File Interpreter ABI Platform Actions
belegant-0.1.0-py3-none-any.whl Python 3 none any Details for belegant-0.1.0-py3-none-any.whl

Total release size: 72.7 kB

Release files / belegant-0.1.0.tar.gz

Download URL belegant-0.1.0.tar.gz
Size 34.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7d7618281320ea3f5c3058e523119250ac440e963dc283ba18ae2ffc87eb15b9
BLAKE2b-256 checksum
How to use checksums
7d6f407c109cfe4a1f998c96d94790b873e4463212ea09794ca4b0363bfc7918
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 6, 2026.

Transparency log

Release files / belegant-0.1.0-py3-none-any.whl

Download URL belegant-0.1.0-py3-none-any.whl
Size 38.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce9a7c6a52242dcda6805263fa9d0404bf785546f7d988fb4d6132c9693820d5
BLAKE2b-256 checksum
How to use checksums
fea497455462b9e32ae74db13d2809f842582df33020edd9b534c445f6399700
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 6, 2026.

Transparency log

Security for belegant 0.1.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.

Select from 2 files

Attestation for belegant-0.1.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 Jul 6, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page