DocOracle-v1 is a compact Hugging Face transformer router for synthetic business-document workflows. It classifies synthetic invoices, inbox requests, and RFQs into operational decisions used by an agentic back-office benchmark.
The model is part of PerimeterReasoner-AgentBench, a public-safe benchmark for local-first business-document agents. The benchmark combines deterministic extraction, relational memory, fake ERP actions, human-review routing, audit traces, exact metrics, and this optional learned routing layer.
Labels
DocOracle-v1 predicts one of four workflow labels:
Label
Meaning
auto_approve
Route a valid invoice to automatic approval.
human_review
Route a risky, incomplete, unsupported, unknown, or ambiguous case to human review.
draft_created
Route a resolved inbox/order request to fake ERP order-draft creation.
draft_quote
Route a resolved RFQ request to quote drafting.
Label Examples
auto_approve
The model should predict auto_approve when an invoice is complete, uses a supported currency, includes a purchase order, and is below the review threshold.
Reason: the amount is above the automatic approval threshold.
Another example:
text
1From: buyer@unknown.example
2Subject: New order
34Please send 20 boxes of our usual premium filters next Tuesday.
Reason: the sender/customer cannot be resolved from memory.
draft_created
The model should predict draft_created when an inbox/order request has enough information to create a fake ERP order draft.
text
1From: purchasing@marinello.example
2Subject: Repeat order
34Please send 20 boxes of our usual premium filters next Tuesday.
5Use our normal shipping method.
Reason: the customer, product alias, quantity, and shipping preference can be resolved.
draft_quote
The model should predict draft_quote when a customer is asking for pricing and the RFQ has enough information to prepare a quote draft.
Customer asks for a quote for 100 industrial sensors, delivery in Zurich, payment terms NET 45.
Reason: the product exists, the quantity is present, and the payment terms are supported.
Technical Details
Architecture: BertForSequenceClassification
Base checkpoint: google/bert_uncased_L-2_H-128_A-2
Library: Hugging Face transformers
Checkpoint format: model.safetensors
Task: synthetic workflow routing / text classification
Training mode: full fine-tuning for the compact CPU-friendly checkpoint
Optional repo support: PEFT/LoRA training path and ModernBERT LoRA showcase path
Training Data
The model was trained only on synthetic examples generated by the benchmark. The data covers three task families:
invoice validation
inbox-to-ERP order drafting
RFQ triage
The generated split is balanced across the four workflow labels.
Split
Examples
Train
576
Test
144
No customer documents, real invoices, private prompts, credentials, or production code are included.
Evaluation
Evaluation was run on the synthetic test split.
Metric
Value
Accuracy
0.9792
Macro F1
0.9791
The deterministic rule-based benchmark remains the reference baseline. DocOracle-v1 is useful for comparing learned routing behavior against exact, reproducible rules.