hung-k-nguyen's picture
Card: how the hallucination benchmark requests are set
e6982ac verified
|
Raw History Blame Contribute Delete
9.83 kB
---
license: other
license_name: nutrient-commercial
pipeline_tag: image-text-to-text
language:
- en
tags:
- document-ai
- decision-model
- system-one
- grounding
- document-classification
- document-split
- object-detection
- token-classification
- hallucination-detection
- pii-detection
- open-vocabulary
- calibrated-confidence
metrics:
- accuracy
- f1
- roc_auc
---
# nutrient-document-decision-v2 · _commercial_
**Ask a document anything typed (yes/no, pick-one, a score, where on the page, which words) and get every answer
from one read, each with a confidence you can trust.**
`nutrient-document-decision-v2` is a document specialist in a field of generalists. It reads page images and text
once and answers any number of typed questions about them. No text is generated. v2 adds **boxes** (find and label
regions on a page), **spans** (find and label exact words in a text field), **page-stream splitting that follows your
instructions**, and confidence scores **calibrated per output type**: across many answers, 0.8 means right about 80% of
the time.
- 🎯 **Try it:** [nutrient-document-decision-v2-demo](https://huggingface.co/spaces/nutrientdocs/nutrient-document-decision-v2-demo)
- 🏆 **Leaderboards:** [grounding](https://huggingface.co/spaces/nutrientdocs/grounding-leaderboard) ·
[document classification](https://huggingface.co/spaces/nutrientdocs/document-classification-leaderboard) ·
[open-vocabulary classification](https://huggingface.co/spaces/nutrientdocs/doc-openvocab-leaderboard) ·
[document split](https://huggingface.co/spaces/nutrientdocs/doc-split-leaderboard)
- 📄 **Previous version:** [nutrient-document-decision](https://huggingface.co/nutrientdocs/nutrient-document-decision) (v1)
## What it answers
| Question type | Answer |
|---|---|
| `noul` | yes / no, with the probability of yes |
| `choice` | one of your options, with a probability per option |
| `score` | a value on an ordinal scale, with probabilities |
| `boxes` | regions on a page, optionally labelled (one box: `max_boxes: 1`), each with a confidence (right place *and* right label) and a label confidence |
| `spans` | exact character spans in a text field, optionally labelled, each with a confidence (overlaps a correct span by ≥ 50%) and a label confidence |
One request can mix all of them, over one page or a stream of pages, with the questions written in plain language.
## Results
Same benchmark, same scorer, same rows for every column unless a note says otherwise. **v1** is the previous version;
the **specialist** is the separately trained Nutrient model for that one task; **best other** is the strongest
non-Nutrient system on that leaderboard.
<!-- RESULTS-TABLE:START -->
### Grounding: is a claim supported by its source? (ROC AUC)
| | **v2** | v1 | specialist ([grounding-en](https://huggingface.co/nutrientdocs/grounding-en) / [grounding-multilingual](https://huggingface.co/nutrientdocs/grounding-multilingual)) | best other |
|---|---|---|---|---|
| English (5,000 pairs) | **0.941** | 0.923 | 0.925 | 0.884 (Jev TypeSafe) |
| Multilingual (8,421 pairs) | 0.949 | 0.949 | **0.965** | 0.916 (Jev TypeSafe) |
### Document classification, image + OCR (macro-F1)
| Track | **v2** | v1 | specialist ([document-classification-v2](https://huggingface.co/nutrientdocs/document-classification-v2)) | best other |
|---|---|---|---|---|
| DocLayNet | **0.995** | 0.914 | 0.968 | 0.832 (Claude Opus 4.5 / 5, Gemini Flash, GPT-sol) |
| Forms | **1.000** | 0.997 | **1.000** | **1.000** (several) |
| OOD (unseen document types) | 0.768 | 0.632 | **0.946** | n/a |
| OOV (unseen label wording) | **0.919** | 0.812 | 0.830 | n/a |
| Tobacco3482 | 0.834 | **0.940** | 0.735 | 0.894 (OpenAI Decisions, gpt-6-luna) |
### Open-vocabulary / figure classification (top-1, 9,375 images)
| Track | **v2** | v1 | specialist ([doc-img-classification](https://huggingface.co/nutrientdocs/doc-img-classification)) | best other |
|---|---|---|---|---|
| Broad (48 labels) | **0.944** | 0.911 | 0.880 | 0.822 (OpenAI Decisions, gpt-6-luna) |
| Specialized | **0.891** | 0.827 | 0.713 | 0.596 (OpenAI Decisions, gpt-6-luna) |
| Synonym (label-wording robustness) | 0.848 | 0.833 | 0.730 | **0.880** (OpenAI Decisions, gpt-6-luna) |
### Document split: page-stream boundaries (F1)
| Stream | **v2** | v1 | specialist ([doc-split-v2](https://huggingface.co/nutrientdocs/doc-split-v2)) | best other |
|---|---|---|---|---|
| our-200 | 0.936 | **0.962** | 0.944 | 0.942 (GPT-sol) |
| OpenPSS-short | 0.624 | **0.683** | 0.652 | 0.598 (Gemini Flash) |
| OpenPSS-long | 0.923 | **0.959** | 0.891 | 0.244 (Gemini Flash) |
| TABME++ | **0.994** | 0.960 | 0.943 | n/a |
| Tobacco800 | **0.990** | 0.987 | 0.969 | n/a |
| val-full | 0.926 | **0.958** | 0.917 | n/a |
### Hallucinated spans: which words of an answer does the context not support? (LettuceDetect v2 test)
| | **v2** | Vela 3.1-fast | Vela 3-fast | LettuceDetect v2 (mmBERT-base) |
|---|---|---|---|---|
| Example F1 | **89.5** | 87.7 | 87.2 | 84.7 |
| Character span F1 | 59.1 | **66.4** | 65.4 | 62.7 |
| RAGTruth example F1 / span F1 | **79.1** / 50.1 | 78.1 / 57.5 | n/a | 79.2 / **58.9** (LettuceDetect-large v1) |
v2: all 10,698 test answers (prose and code), measured by us. The other columns are the numbers reported on the
[vela3.1-fast](https://huggingface.co/vllm-sr/vela3.1-fast) model card, on its 8,490 "clean" answers of the same test
(RAGTruth row: the RAGTruth answers), so the rows are not identical. v2 detects *that* an answer hallucinates as well
or better; it marks *which* words less precisely. v2 on non-English answers: example F1 95.4. Requests set `min_spans: 1`, and an
answer counts as hallucination-free when the model reports nothing found (`p_null` above 0.5).
### PII signal: does a text contain personal data? (ROC AUC, router-signal-suite test, same 3,000 rows)
| | **v2** | Vela (released) | mmBERT-32K (released) |
|---|---|---|---|
| All 3,000 texts | **0.946** | 0.943 | 0.920 |
| 1,502 texts from sources v2 never trained on | **0.947** | 0.946 | 0.923 |
Models trained on this suite's own training split score higher (0.96–0.99): they learn the suite's labelling
convention. The table compares released models only.
### New in v2 (this model only)
**Page-stream splitting that follows instructions:** "split at every page", "one document per type", "keep
attachments with their parent", "group all pages of a type together"… Accuracy per page decision:
| Instruction family | Accuracy |
|---|---|
| Default splitting (stream / by type) | 0.902 / 0.813 |
| Split every page | 1.000 |
| Group pages of a type | 0.945 |
| *Held-out wordings and families:* attach to type / group by type / group several types / only before / every page | 0.897 / 0.819 / 0.777 / 0.832 / 0.897 |
**Boxes:** precision / recall of the boxes returned at the default 0.5 confidence threshold, held-out pages (40 per
source; a box counts when it overlaps a true box at IoU ≥ 0.5 with the right label): DocLayNet layout 0.84 / 0.83,
PubLayNet 0.83 / 0.80, DocGenome 0.85 / 0.86, objects in photos (RefCOCO) 0.78 / 0.83, form fields (CommonForms)
0.82 / 0.51, extraction fields 0.56 / 0.43.
**Policy decisions (JevBench):** accuracy easy 1.000 / original 0.903 / hard 0.604.
**Calibration:** expected calibration error on held-out validation data, mean over sources (lower is better):
| Output | ECE |
|---|---|
| yes / no · choice · score | 0.044 · 0.069 · 0.046 |
| boxes · box label | 0.026 · 0.069 |
| span (the whole span) · span words · span label | 0.034 · 0.026 · 0.041 |
| "nothing to find" (boxes · spans) | 0.004 · 0.012 |
<!-- RESULTS-TABLE:END -->
**Speed** (one NVIDIA RTX PRO 6000, batch 1): document classification 8.3 pages/s (p50 116 ms), grounding 10.7
pairs/s, hallucinated spans 8.3 answers/s (p50 91 ms), PII 11.1 texts/s, document split 2.3–7.3 pages/s.
## Where v1 is still stronger
v2 trades some page-stream splitting accuracy for instruction-following: on the standard streams it trails v1 by
0.03–0.06 F1 (our-200, OpenPSS, val-full) while beating it on TABME++ and Tobacco800. On Tobacco3482 classification
v1 leads (0.940 vs 0.834). v1 remains available for those workloads.
## Intended use & limits
Built for document-heavy workflows (contracts, filings, forms, invoices, mixed page streams, RAG answers) where one
calibrated pass has to answer several typed questions about the same document. Not a chat assistant: it returns typed
answers, not prose.
- Calibration is per output type, not per document source: on a source very different from its training data a
confidence can drift. Contract-clause spans in particular are over-confident (right far less often than their
confidence suggests), so validate before relying on them unattended.
- Returned spans and boxes carry their own confidence; filter on it (0.5 is the default threshold).
- Text in images is read from the page; very small print lowers box confidence.
## License & data
Commercial. Benchmarked on publicly available evaluation sets; see the linked leaderboards and benchmark datasets for
sources and licenses per track.
> ### 📩 Get access
>
> `nutrient-document-decision-v2` is commercial and its weights are not downloadable here. To run it on-prem,
> **contact Nutrient: [nutrient.io/contact-sales](https://www.nutrient.io/contact-sales/).**
## About the author
<a href="https://nutrient.io/">
<img src="https://avatars2.githubusercontent.com/u/1527679?v=3&s=200" height="80" />
</a>
This project is maintained and funded by [Nutrient](https://nutrient.io/) - The deterministic document infrastructure enterprises run their highest-stakes workflows on: replayable output, clear exceptions, and full audit trails on the messy, regulated documents where AI alone breaks.