Hallucination-guarded OCR for AI agents

The problem: modern OCR fails silently. A vision-language model reading blurry handwriting will not return an error — it returns fluent, confident text that is simply wrong, sometimes in the wrong language entirely. A human spots this instantly. An agent pipeline ingests it and acts on it.

We measured this on real documents: on one handwritten Japanese note, a frontier OCR model output fluent Devanagari (Hindi) — zero overlap with the document — while a traditional OCR engine read it correctly. On a printed tax receipt, the same model subtly rewrote a legal notice into different (wrong) wording. Neither failure raises an exception. Both poison downstream automation.

What Mart402 does about it

Every POST /v1/parse OCR result carries machine-actionable quality signals:

{"ok": true, "route": "mistral",
 "ocr_quality": {"confidence": 0.9, "hallucination_suspected": false,
                 "flags": [], "chars": 1483},
 "consensus": {"verdict": "agree", "confidence": 0.86, "agreement": 0.91,
               "flags": [], "best_engine": "mistral"},
 "markdown": "..."}

How an agent should consume this

SignalAction
confidence ≥ 0.7, no flagsUse the text.
hallucination_suspectedDiscard; use consensus best_engine text (already applied) or re-scan.
disagree_review_recommendedQueue for human review; don't act on extracted numbers.

Try it

Free sandbox (identical API, Base Sepolia): mart402.dev. Production: pay per page via x402, $0.004–0.012/page, free quote first (/v1/parse/quote). Measured latency & success rate: /stats, independently probed by Market402.

Agent docs: /agents.md · /llms.txt · /catalog